/* Complete list of global C function prototypes for Mathomatic. */ /* This file was created with the cproto utility by running the "./update" script. */ /* This file is required to compile Mathomatic quietly with the -Wall compiler option. */ /* am.c */ void display_startup_message(MathoMatic* mathomatic, FILE *fp); void error(MathoMatic* mathomatic, const char *str); void reset_error(MathoMatic* mathomatic); void warning(MathoMatic* mathomatic, const char *str); void error_huge(MathoMatic* mathomatic); void error_bug(MathoMatic* mathomatic, const char *str); void check_err(MathoMatic* mathomatic); int get_screen_size(MathoMatic* mathomatic); int malloc_vscreen(MathoMatic* mathomatic); int init_mem(MathoMatic* mathomatic); int check_gvars(void); void init_gvars(MathoMatic* mathomatic); void clean_up(MathoMatic* mathomatic); void set_sign_array(MathoMatic* mathomatic); int next_sign(MathoMatic* mathomatic, long *vp); void clear_all(MathoMatic* mathomatic); int alloc_espace(MathoMatic* mathomatic, int i); int alloc_to_espace(MathoMatic* mathomatic, int en); int alloc_next_espace(MathoMatic* mathomatic); int next_espace(MathoMatic* mathomatic); void copy_espace(MathoMatic* mathomatic, int src, int dest); int solved_equation(MathoMatic* mathomatic, int i); int found_var(token_type *p1, int n, long v); int var_in_equation(MathoMatic* mathomatic, int i, long v); int search_all_for_var(MathoMatic* mathomatic, long v, int forward_direction); void rename_var_in_es(MathoMatic* mathomatic, int en, long from_v, long to_v); int subst_var_with_exp(MathoMatic* mathomatic, token_type *equation, int *np, token_type *expression, int len, long v); int min_level(MathoMatic* mathomatic, token_type *expression, int n); int get_default_en(MathoMatic* mathomatic, char *cp); int get_expr(MathoMatic* mathomatic, token_type *equation, int *np); int prompt_var(MathoMatic* mathomatic, long *vp); int not_defined(MathoMatic* mathomatic, int i); int current_not_defined(MathoMatic* mathomatic); char *get_string(MathoMatic* mathomatic, char *string, int n); int get_yes_no(MathoMatic* mathomatic); int return_result(MathoMatic* mathomatic, int en); void free_result_str(MathoMatic* mathomatic); int is_all(char *cp); int get_range(MathoMatic* mathomatic, char **cpp, int *ip, int *jp); int extra_characters(MathoMatic* mathomatic, char *cp); int get_range_eol(MathoMatic* mathomatic, char **cpp, int *ip, int *jp); char *skip_space(char *cp); char *skip_comma_space(char *cp); long decstrtol(char *cp, char **cpp); int isdelimiter(int ch); char *skip_param(char *cp); int strcmp_tospace(char *cp1, char *cp2); int level_plus_count(token_type *p1, int n1, int level); int level1_plus_count(MathoMatic* mathomatic, token_type *p1, int n1); int var_count(token_type *p1, int n1); int no_vars(token_type *source, int n, long *vp); int exp_contains_infinity(token_type *p1, int n1); int exp_contains_nan(token_type *p1, int n1); int exp_is_numeric(token_type *p1, int n1); int exp_is_absolute(token_type *p1, int n1); int check_divide_by_zero(MathoMatic* mathomatic, double denominator); int load_rc(MathoMatic* mathomatic, int return_true_if_no_file, FILE *ofp); /* cmds.c */ int plot_cmd(MathoMatic* mathomatic, char *cp); int version_cmd(MathoMatic* mathomatic, char *cp); long max_memory_usage(MathoMatic* mathomatic); int show_status(FILE *ofp); int version_report(MathoMatic* mathomatic); int solve_cmd(MathoMatic* mathomatic, char *cp); int sum_cmd(MathoMatic* mathomatic, char *cp); int product_cmd(MathoMatic* mathomatic, char *cp); int for_cmd(MathoMatic* mathomatic, char *cp); int optimize_cmd(MathoMatic* mathomatic, char *cp); int output_current_directory(MathoMatic* mathomatic, FILE *ofp); int fprintf_escaped(FILE *ofp, char *cp); void output_options(MathoMatic* mathomatic, FILE *ofp, int all_set_options); int skip_no(char **cpp); int save_set_options(MathoMatic* mathomatic, char *cp); int set_options(MathoMatic* mathomatic, char *cp, int loading_startup_file); int set_cmd(MathoMatic* mathomatic, char *cp); int echo_cmd(MathoMatic* mathomatic, char *cp); int pause_cmd(MathoMatic* mathomatic, char *cp); int copy_cmd(MathoMatic* mathomatic, char *cp); int real_cmd(MathoMatic* mathomatic, char *cp); int imaginary_cmd(MathoMatic* mathomatic, char *cp); int tally_cmd(MathoMatic* mathomatic, char *cp); int calculate_cmd(MathoMatic* mathomatic, char *cp); int clear_cmd(MathoMatic* mathomatic, char *cp); int compare_es(MathoMatic* mathomatic, int i, int j); int compare_cmd(MathoMatic* mathomatic, char *cp); int display_fraction(MathoMatic* mathomatic, double value); int divide_cmd(MathoMatic* mathomatic, char *cp); int eliminate_cmd(MathoMatic* mathomatic, char *cp); int display_cmd(MathoMatic* mathomatic, char *cp); int list_cmd(MathoMatic* mathomatic, char *cp); int code_cmd(MathoMatic* mathomatic, char *cp); int variables_cmd(MathoMatic* mathomatic, char *cp); int approximate_cmd(MathoMatic* mathomatic, char *cp); int replace_cmd(MathoMatic* mathomatic, char *cp); int simplify_cmd(MathoMatic* mathomatic, char *cp); int factor_cmd(MathoMatic* mathomatic, char *cp); int display_term_count(MathoMatic* mathomatic, int en); int unfactor_cmd(MathoMatic* mathomatic, char *cp); int div_loc_find(MathoMatic* mathomatic, token_type *expression, int n); int fraction_cmd(MathoMatic* mathomatic, char *cp); int quit_cmd(MathoMatic* mathomatic, char *cp); int read_cmd(MathoMatic* mathomatic, char *cp); int read_file(MathoMatic* mathomatic, char *cp); int read_sub(MathoMatic* mathomatic, FILE *fp, char *filename); int edit_cmd(MathoMatic* mathomatic, char *cp); int save_cmd(MathoMatic* mathomatic, char *cp); /* complex.c */ void rect_to_polar(double x, double y, double *radiusp, double *thetap); int roots_cmd(MathoMatic * mathomatic, char *cp); int complex_root_simp(MathoMatic* mathomatic, token_type *equation, int *np); int approximate_complex_roots(MathoMatic* mathomatic, token_type *equation, int *np); int get_constant(MathoMatic* mathomatic, token_type *p1, int n, double *dp); int parse_complex(MathoMatic* mathomatic, token_type *p1, int n, complexs *cp); /* complex_lib.c */ int complex_fixup(complexs *ap); complexs complex_add(complexs a, complexs b); complexs complex_negate(complexs a); complexs complex_mult(complexs a, complexs b); complexs complex_div(complexs a, complexs b); complexs complex_log(complexs a); complexs complex_exp(complexs a); complexs complex_pow(complexs a, complexs b); /* diff.c */ int differentiate(MathoMatic* mathomatic, token_type *equation, int *np, long v); int derivative_cmd(MathoMatic* mathomatic, char *cp); int extrema_cmd(MathoMatic* mathomatic, char *cp); int taylor_cmd(MathoMatic* mathomatic, char *cp); int limit_cmd(MathoMatic* mathomatic, char *cp); /* factor.c */ int factor_divide(MathoMatic* mathomatic, token_type *equation, int *np, long v, double d); int subtract_itself(MathoMatic* mathomatic, token_type *equation, int *np); int factor_plus(MathoMatic* mathomatic, token_type *equation, int *np, long v, double d); int factor_times(MathoMatic* mathomatic, token_type *equation, int *np); int factor_power(MathoMatic* mathomatic, token_type *equation, int *np); /* factor_int.c */ int factor_one(MathoMatic* mathomatic, double value); double multiply_out_unique(MathoMatic* mathomatic); int display_unique(MathoMatic* mathomatic); int is_prime(MathoMatic* mathomatic); int factor_int(MathoMatic* mathomatic, token_type *equation, int *np); int factor_int_equation(MathoMatic* mathomatic, int n); int list_factor(MathoMatic* mathomatic, token_type *equation, int *np, int factor_flag); int factor_constants(MathoMatic* mathomatic, token_type *equation, int *np, int level_code); /* gcd.c */ double gcd(MathoMatic* mathomatic, double d1, double d2); double gcd_verified(MathoMatic* mathomatic, double d1, double d2); double my_round(double d1); int f_to_fraction(MathoMatic* mathomatic, double d, double *numeratorp, double *denominatorp); int make_fractions(MathoMatic* mathomatic, token_type *equation, int *np); int make_simple_fractions(MathoMatic* mathomatic, token_type *equation, int *np); int make_mixed_fractions(MathoMatic* mathomatic, token_type *equation, int *np); /* globals.c */ /* help.c */ int parse(MathoMatic* mathomatic, int n, char *cp); int process_parse(MathoMatic* mathomatic, int n, char *cp); int process(MathoMatic* mathomatic, char *cp); int process_rv(MathoMatic* mathomatic, char *cp); int display_process(MathoMatic* mathomatic, char *cp); int shell_out(MathoMatic* mathomatic, char *cp); char *parse_var2(MathoMatic* mathomatic, long *vp, char *cp); int display_usage(MathoMatic* mathomatic, char *pstr, int i); int display_command(MathoMatic* mathomatic, int i); int display_repeat_command(MathoMatic* mathomatic); int read_examples(MathoMatic* mathomatic, const char **cpp); void underline_title(MathoMatic* mathomatic, int count); int help_cmd(MathoMatic* mathomatic, char *cp); /* integrate.c */ void make_powers(MathoMatic* mathomatic, token_type *equation, int *np, long v); int int_dispatch(MathoMatic* mathomatic, token_type *equation, int *np, long v, int (*func)(MathoMatic* mathomatic, token_type *equation, int *np, int loc, int eloc, long v)); int integrate_cmd(MathoMatic* mathomatic, char *cp); int laplace_cmd(MathoMatic* mathomatic, char *cp); int nintegrate_cmd(MathoMatic* mathomatic, char *cp); /* list.c */ void reset_attr(MathoMatic* mathomatic); int set_color(MathoMatic* mathomatic, int color); void default_color(MathoMatic* mathomatic, int set_no_color_flag); int display_all_colors(MathoMatic* mathomatic); int list1_sub(MathoMatic* mathomatic, int n, int export_flag); int list_sub(MathoMatic* mathomatic, int n); void list_debug(MathoMatic* mathomatic, int level, token_type *p1, int n1, token_type *p2, int n2); char *var_name(MathoMatic* mathomatic, long v); int list_var(MathoMatic* mathomatic, long v, int lang_code); int list_proc(MathoMatic* mathomatic, token_type *p1, int n, int export_flag); char *list_equation(MathoMatic* mathomatic, int n, int export_flag); char *list_expression(MathoMatic* mathomatic, token_type *p1, int n, int export_flag); int list_string(MathoMatic* mathomatic, token_type *p1, int n, char *string, int export_flag); int list_string_sub(MathoMatic* mathomatic, token_type *p1, int n, int outflag, char *string, int export_flag); int int_expr(token_type *p1, int n); int list_code_equation(MathoMatic* mathomatic, int en, enum language_list language, int int_flag); char *string_code_equation(MathoMatic* mathomatic, int en, enum language_list language, int int_flag); int list_code(MathoMatic* mathomatic, token_type *equation, int *np, int outflag, char *string, enum language_list language, int int_flag); char *flist_equation_string(MathoMatic* mathomatic, int n); int flist_equation(MathoMatic* mathomatic, int n); /* main.c */ void usage(FILE *fp); int main(int argc, char **argv); void main_io_loop(void); int set_signals(unsigned int time_out_seconds); void fphandler(int sig); void inthandler(int sig); void exithandler(int sig); void resizehandler(int sig); void exit_program(int exit_value); /* parse.c */ void str_tolower(char *cp); void put_up_arrow(MathoMatic* mathomatic, int cnt, char *cp); int isvarchar(MathoMatic* mathomatic, int ch); int paren_increment(int ch); int is_mathomatic_operator(int ch); void binary_parenthesize(token_type *p1, int n, int i); void handle_negate(token_type *equation, int *np); void give_priority(MathoMatic* mathomatic, token_type *equation, int *np); char *parse_section(MathoMatic* mathomatic, token_type *equation, int *np, char *cp, int allow_space); char *parse_equation(MathoMatic* mathomatic, int n, char *cp); char *parse_expr(MathoMatic* mathomatic, token_type *equation, int *np, char *cp, int allow_space); char *parse_var(MathoMatic* mathomatic, long *vp, char *cp); void remove_trailing_spaces(char *cp); void set_error_level(MathoMatic* mathomatic, char *cp); int var_is_const(long v, double *dp); int subst_constants(token_type *equation, int *np); int my_strlcpy(char *dest, char *src, int n); /* poly.c */ int poly_in_v_sub(MathoMatic* mathomatic, token_type *p1, int n, long v, int allow_divides); int poly_in_v(MathoMatic* mathomatic, token_type *p1, int n, long v, int allow_divides); int poly_factor(MathoMatic* mathomatic, token_type *equation, int *np, int do_repeat); int remove_factors(MathoMatic* mathomatic); int poly_gcd(MathoMatic* mathomatic, token_type *larger, int llen, token_type *smaller, int slen, long v); int poly2_gcd(MathoMatic* mathomatic, token_type *larger, int llen, token_type *smaller, int slen, long v, int require_additive); int is_integer_var(MathoMatic* mathomatic, long v); int is_integer_expr(MathoMatic* mathomatic, token_type *p1, int n); int mod_simp(MathoMatic* mathomatic, token_type *equation, int *np); int poly_gcd_simp(MathoMatic* mathomatic, token_type *equation, int *np); int div_remainder(MathoMatic* mathomatic, token_type *equation, int *np, int poly_flag, int quick_flag); int poly_div(MathoMatic* mathomatic, token_type *d1, int len1, token_type *d2, int len2, long *vp); int smart_div(MathoMatic* mathomatic, token_type *d1, int len1, token_type *d2, int len2); int basic_size(MathoMatic* mathomatic, token_type *p1, int len); int get_term(token_type *p1, int n1, int count, int *tp1, int *lentp1); void term_value(double *dp, token_type *p1, int n1, int loc); int find_greatest_power(token_type *p1, int n1, long *vp1, double *pp1, int *tp1, int *lentp1, int *dcodep); /* simplify.c */ void organize(MathoMatic* mathomatic, token_type *equation, int *np); void elim_loop(MathoMatic* mathomatic, token_type *equation, int *np); void simp_ssub(MathoMatic* mathomatic, token_type *equation, int *np, long v, double d, int power_flag, int times_flag, int fc_level); void simp_equation(MathoMatic* mathomatic, int n); void mid_simp_side(MathoMatic* mathomatic, token_type *equation, int *np); void mid_simp_equation(MathoMatic* mathomatic, int n); void simps_side(MathoMatic* mathomatic, token_type *equation, int *np, int zsolve); void simpv_side(MathoMatic* mathomatic, token_type *equation, int *np, long v); void simpv_equation(MathoMatic* mathomatic, int n, long v); int factor_imaginary(MathoMatic* mathomatic, token_type *equation, int *np); void factorv(MathoMatic* mathomatic, token_type *equation, int *np, long v); void calc_simp(MathoMatic* mathomatic, token_type *equation, int *np); void approximate(MathoMatic* mathomatic, token_type *equation, int *np); int simp_i(MathoMatic* mathomatic, token_type *equation, int *np); void simp_divide(MathoMatic* mathomatic, token_type *equation, int *np); void simp2_divide(MathoMatic* mathomatic, token_type *equation, int *np, long v, int fc_level); void simpb_side(MathoMatic* mathomatic, token_type *equation, int *np, int uf_power_flag, int power_flag, int fc_level); void simple_frac_side(MathoMatic* mathomatic, token_type *equation, int *np); void simpa_side(MathoMatic* mathomatic, token_type *equation, int *np, int quick_flag, int frac_flag); void simpa_repeat_side(MathoMatic* mathomatic, token_type *equation, int *np, int quick_flag, int frac_flag); void simpa_repeat(MathoMatic* mathomatic, int n, int quick_flag, int frac_flag); void simple_frac_repeat_side(MathoMatic* mathomatic, token_type *equation, int *np); int simp_loop(MathoMatic* mathomatic, token_type *equation, int *np); int simp_pp(MathoMatic* mathomatic, token_type *equation, int *np); int integer_root_simp(MathoMatic* mathomatic, token_type *equation, int *np); int simp_constant_power(MathoMatic* mathomatic, token_type *equation, int *np); int simp2_power(MathoMatic* mathomatic, token_type *equation, int *np); double fixed_fmod(double k1, double k2); int combine_constants(MathoMatic* mathomatic, token_type *equation, int *np, int iflag); int calc(MathoMatic* mathomatic, int *op1p, double *k1p, int op2, double k2); int elim_k(MathoMatic* mathomatic, token_type *equation, int *np); int se_compare(MathoMatic* mathomatic, token_type *p1, int n1, token_type *p2, int n2, int *diff_signp); int elim_sign(MathoMatic* mathomatic, token_type *equation, int *np); int div_imaginary(MathoMatic* mathomatic, token_type *equation, int *np); int reorder(MathoMatic* mathomatic, token_type *equation, int *np); int rationalize(MathoMatic* mathomatic, token_type *equation, int *np); /* solve.c */ int solve_espace(MathoMatic* mathomatic, int want, int have); int solve_sub(MathoMatic* mathomatic, token_type *wantp, int wantn, token_type *leftp, int *leftnp, token_type *rightp, int *rightnp); /* super.c */ void group_proc(MathoMatic* mathomatic, token_type *equation, int *np); int fractions_and_group(MathoMatic* mathomatic, token_type *equation, int *np); int make_fractions_and_group(MathoMatic* mathomatic, int n); int super_factor(MathoMatic* mathomatic, token_type *equation, int *np, int start_flag); /* unfactor.c */ int uf_tsimp(MathoMatic* mathomatic, token_type *equation, int *np); int uf_power(MathoMatic* mathomatic, token_type *equation, int *np); int uf_pplus(MathoMatic* mathomatic, token_type *equation, int *np); void uf_allpower(MathoMatic* mathomatic, token_type *equation, int *np); void uf_repeat(MathoMatic* mathomatic, token_type *equation, int *np); void uf_repeat_always(MathoMatic* mathomatic, token_type *equation, int *np); void uf_simp(MathoMatic* mathomatic, token_type *equation, int *np); void uf_simp_no_repeat(MathoMatic* mathomatic, token_type *equation, int *np); int ufactor(MathoMatic* mathomatic, token_type *equation, int *np); int uf_times(MathoMatic* mathomatic, token_type *equation, int *np); int sub_ufactor(MathoMatic* mathomatic, token_type *equation, int *np, int ii); int unsimp_power(MathoMatic* mathomatic, token_type *equation, int *np); void uf_neg_help(token_type *equation, int *np, MathoMatic* mathomatic); int patch_root_div(MathoMatic* mathomatic, token_type *equation, int *np);