"Fossies" - the Fresh Open Source Software Archive

Member "bc-1.06.95/bc/proto.h" (5 Sep 2006, 5403 Bytes) of package /linux/misc/old/bc-1.06.95.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "proto.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.06.95_vs_1.07.

    1 /*  This file is part of GNU bc.
    2 
    3     Copyright (C) 1991-1994, 1997, 2006 Free Software Foundation, Inc.
    4 
    5     This program is free software; you can redistribute it and/or modify
    6     it under the terms of the GNU General Public License as published by
    7     the Free Software Foundation; either version 2 of the License , or
    8     (at your option) any later version.
    9 
   10     This program is distributed in the hope that it will be useful,
   11     but WITHOUT ANY WARRANTY; without even the implied warranty of
   12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13     GNU General Public License for more details.
   14 
   15     You should have received a copy of the GNU General Public License
   16     along with this program; see the file COPYING.  If not, write to:
   17       The Free Software Foundation, Inc.
   18       Foundation, Inc.  51 Franklin Street, Fifth Floor,
   19       Boston, MA 02110-1301  USA
   20 
   21     You may contact the author by:
   22        e-mail:  philnelson@acm.org
   23       us-mail:  Philip A. Nelson
   24                 Computer Science Department, 9062
   25                 Western Washington University
   26                 Bellingham, WA 98226-9062
   27        
   28 *************************************************************************/
   29 
   30 /* proto.h: Prototype function definitions for "external" functions. */
   31 
   32 /* For the pc version using k&r ACK. (minix1.5 and earlier.) */
   33 #ifdef SHORTNAMES
   34 #define init_numbers i_numbers
   35 #define push_constant push__constant
   36 #define load_const in_load_const
   37 #define yy_get_next_buffer yyget_next_buffer
   38 #define yy_init_buffer yyinit_buffer
   39 #define yy_last_accepting_state yylast_accepting_state
   40 #define arglist1 arg1list
   41 #endif
   42 
   43 /* Include the standard library header files. */
   44 #ifdef HAVE_UNISTD_H
   45 #include <unistd.h>
   46 #endif
   47 #ifdef HAVE_STDLIB_H
   48 #include <stdlib.h>
   49 #endif
   50 
   51 /* Define the _PROTOTYPE macro if it is needed. */
   52 
   53 #ifndef _PROTOTYPE
   54 #ifdef __STDC__
   55 #define _PROTOTYPE(func, args) func args
   56 #else
   57 #define _PROTOTYPE(func, args) func()
   58 #endif
   59 #endif
   60 
   61 /* From execute.c */
   62 _PROTOTYPE(void stop_execution, (int));
   63 _PROTOTYPE(unsigned char byte, (program_counter *pc_));
   64 _PROTOTYPE(void execute, (void));
   65 _PROTOTYPE(int prog_char, (void));
   66 _PROTOTYPE(int input_char, (void));
   67 _PROTOTYPE(void push_constant, (int (*in_char)(void), int conv_base));
   68 _PROTOTYPE(void push_b10_const, (program_counter *pc_));
   69 _PROTOTYPE(void assign, (int c_code_));
   70 
   71 /* From util.c */
   72 _PROTOTYPE(char *strcopyof, (const char *str));
   73 _PROTOTYPE(arg_list *nextarg, (arg_list *args, int val, int is_var));
   74 _PROTOTYPE(char *arg_str, (arg_list *args));
   75 _PROTOTYPE(char *call_str, (arg_list *args));
   76 _PROTOTYPE(void free_args, (arg_list *args));
   77 _PROTOTYPE(void check_params, (arg_list *params, arg_list *autos));
   78 _PROTOTYPE(void set_genstr_size, (int));
   79 _PROTOTYPE(void init_gen, (void));
   80 _PROTOTYPE(void generate, (const char *str));
   81 _PROTOTYPE(void run_code, (void));
   82 _PROTOTYPE(void out_char, (int ch));
   83 _PROTOTYPE(void out_schar, (int ch));
   84 _PROTOTYPE(id_rec *find_id, (id_rec *tree, const char *id));
   85 _PROTOTYPE(int insert_id_rec, (id_rec **root, id_rec *new_id));
   86 _PROTOTYPE(void init_tree, (void));
   87 _PROTOTYPE(int lookup, (char *name, int namekind));
   88 _PROTOTYPE(void *bc_malloc, (int));
   89 _PROTOTYPE(void out_of_memory, (void));
   90 _PROTOTYPE(void welcome, (void));
   91 _PROTOTYPE(void warranty, (const char *));
   92 _PROTOTYPE(void show_bc_version, (void));
   93 _PROTOTYPE(void limits, (void));
   94 _PROTOTYPE(void yyerror, (const char *str ,...));
   95 _PROTOTYPE(void warn, (const char *mesg ,...));
   96 _PROTOTYPE(void rt_error, (const char *mesg ,...));
   97 _PROTOTYPE(void rt_warn, (const char *mesg ,...));
   98 
   99 /* From load.c */
  100 _PROTOTYPE(void init_load, (void));
  101 _PROTOTYPE(void addbyte, (int byte_));
  102 _PROTOTYPE(void def_label, (long lab));
  103 _PROTOTYPE(long long_val, (const char **str));
  104 _PROTOTYPE(void load_code, (const char *code));
  105 
  106 /* From main.c */
  107 _PROTOTYPE(int open_new_file, (void));
  108 _PROTOTYPE(void new_yy_file, (FILE *file));
  109 _PROTOTYPE(void use_quit, (int));
  110 
  111 /* From storage.c */
  112 _PROTOTYPE(void init_storage, (void));
  113 _PROTOTYPE(void more_functions, (void));
  114 _PROTOTYPE(void more_variables, (void));
  115 _PROTOTYPE(void more_arrays, (void));
  116 _PROTOTYPE(void clear_func, (int func ));
  117 _PROTOTYPE(int fpop, (void));
  118 _PROTOTYPE(void fpush, (int val ));
  119 _PROTOTYPE(void pop, (void));
  120 _PROTOTYPE(void push_copy, (bc_num num ));
  121 _PROTOTYPE(void push_num, (bc_num num ));
  122 _PROTOTYPE(char check_stack, (int depth ));
  123 _PROTOTYPE(bc_var *get_var, (int var_name ));
  124 _PROTOTYPE(bc_num *get_array_num, (int var_index, long _index_ ));
  125 _PROTOTYPE(void store_var, (int var_name ));
  126 _PROTOTYPE(void store_array, (int var_name ));
  127 _PROTOTYPE(void load_var, (int var_name ));
  128 _PROTOTYPE(void load_array, (int var_name ));
  129 _PROTOTYPE(void decr_var, (int var_name ));
  130 _PROTOTYPE(void decr_array, (int var_name ));
  131 _PROTOTYPE(void incr_var, (int var_name ));
  132 _PROTOTYPE(void incr_array, (int var_name ));
  133 _PROTOTYPE(void auto_var, (int name ));
  134 _PROTOTYPE(void free_a_tree, (bc_array_node *root, int depth ));
  135 _PROTOTYPE(void pop_vars, (arg_list *list ));
  136 _PROTOTYPE(void process_params, (program_counter *_pc_, int func ));
  137 
  138 /* For the scanner and parser.... */
  139 _PROTOTYPE(int yyparse, (void));
  140 _PROTOTYPE(int yylex, (void)); 
  141 
  142 #if defined(LIBEDIT)
  143 /* The *?*&^ prompt function */
  144 _PROTOTYPE(char *null_prompt, (EditLine *));
  145 #endif
  146 
  147 /* Other things... */
  148 #ifndef HAVE_UNISTD_H
  149 _PROTOTYPE (int getopt, (int, char *[], CONST char *));
  150 #endif