summaryrefslogtreecommitdiff
path: root/src/tibtype.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tibtype.h')
-rw-r--r--src/tibtype.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/tibtype.h b/src/tibtype.h
index 68549b7..9361687 100644
--- a/src/tibtype.h
+++ b/src/tibtype.h
@@ -1,6 +1,6 @@
/*
* libtib - Read, write, and evaluate TI BASIC programs
- * Copyright (C) 2015-2016 Delwink, LLC
+ * Copyright (C) 2015-2017 Delwink, LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -27,96 +27,96 @@
#include "tibexpr.h"
enum tib_type
- {
- TIB_TYPE_NONE=0,
- TIB_TYPE_COMPLEX,
- TIB_TYPE_STRING,
- TIB_TYPE_LIST,
- TIB_TYPE_MATRIX
- };
+{
+ TIB_TYPE_NONE = 0,
+ TIB_TYPE_COMPLEX,
+ TIB_TYPE_STRING,
+ TIB_TYPE_LIST,
+ TIB_TYPE_MATRIX
+};
union variant
{
- gsl_complex number;
- char *string;
- gsl_vector_complex *list;
- gsl_matrix_complex *matrix;
+ gsl_complex number;
+ char *string;
+ gsl_vector_complex *list;
+ gsl_matrix_complex *matrix;
};
typedef struct
{
- enum tib_type type;
- union variant value;
- size_t refs;
+ enum tib_type type;
+ union variant value;
+ size_t refs;
} TIB;
TIB *
-tib_empty (void);
+tib_empty(void);
TIB *
-tib_copy (const TIB *t);
+tib_copy(const TIB *t);
void
-tib_incref (TIB *t);
+tib_incref(TIB *t);
void
-tib_decref (TIB *t);
+tib_decref(TIB *t);
TIB *
-tib_new_complex (double real, double imaginary);
+tib_new_complex(double real, double imaginary);
TIB *
-tib_new_str (const char *value);
+tib_new_str(const char *value);
TIB *
-tib_new_list (const gsl_complex *value, size_t len);
+tib_new_list(const gsl_complex *value, size_t len);
TIB *
-tib_new_matrix (const gsl_complex **value, size_t w, size_t h);
+tib_new_matrix(const gsl_complex **value, size_t w, size_t h);
enum tib_type
-tib_type (const TIB *t);
+tib_type(const TIB *t);
gsl_complex
-tib_complex_value (const TIB *t);
+tib_complex_value(const TIB *t);
const char *
-tib_str_value (const TIB *t);
+tib_str_value(const TIB *t);
const gsl_vector_complex *
-tib_list_value (const TIB *t);
+tib_list_value(const TIB *t);
const gsl_matrix_complex *
-tib_matrix_value (const TIB *t);
+tib_matrix_value(const TIB *t);
int
-tib_toexpr (struct tib_expr *dest, const TIB *src);
+tib_toexpr(struct tib_expr *dest, const TIB *src);
TIB *
-tib_add (const TIB *t1, const TIB *t2);
+tib_add(const TIB *t1, const TIB *t2);
TIB *
-tib_sub (const TIB *t1, const TIB *t2);
+tib_sub(const TIB *t1, const TIB *t2);
TIB *
-tib_mul (const TIB *t1, const TIB *t2);
+tib_mul(const TIB *t1, const TIB *t2);
TIB *
-tib_div (const TIB *t1, const TIB *t2);
+tib_div(const TIB *t1, const TIB *t2);
TIB *
-tib_pow (const TIB *t, const TIB *power);
+tib_pow(const TIB *t, const TIB *power);
TIB *
-tib_root (const TIB *t, gsl_complex root);
+tib_root(const TIB *t, gsl_complex root);
TIB *
-tib_factorial (const TIB *t);
+tib_factorial(const TIB *t);
TIB *
-tib_log (const TIB *t);
+tib_log(const TIB *t);
TIB *
-tib_toradians (const TIB *t);
+tib_toradians(const TIB *t);
#endif