diff options
author | dos-reis <gdr@axiomatics.org> | 2010-07-29 19:52:43 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-07-29 19:52:43 +0000 |
commit | 1b7a0340896d0fb7b2d99ba9c1358cac9f7b03d3 (patch) | |
tree | e0776cb40c64012874aee5767f27ee183d3ea537 /src/hyper/macro.c | |
parent | 17004f202c892fd4d933b94c6b7441c45a06e80b (diff) | |
download | open-axiom-1b7a0340896d0fb7b2d99ba9c1358cac9f7b03d3.tar.gz |
* lib/XSpadFill.c: Tidy.
* lib/pixmap.c: Likewise.
* lib/spadcolors.c: Likewise.
* include/ReadBitmap.H1: Remove.
* include/all_hyper_proto.H1: Likewise.
* include/cond.H1: Likewise.
* include/cursor.H1: Likewise.
* include/dialog.H1: Likewise.
* include/display.H1: Likewise.
* include/event.H1: Likewise.
* include/extent1.H1: Likewise.
* include/extent2.H1: Likewise.
* include/form_ext.H1: Likewise.
* include/group.H1: Likewise.
* include/htinp.H1: Likewise.
* include/hyper.H1: Likewise.
* include/initx.H1: Likewise.
* include/input.H1: Likewise.
* include/item.H1: Likewise.
* include/keyin.H1: Likewise.
* include/macro.H1: Likewise.
* include/mem.H1: Likewise.
* include/parse.H1: Likewise.
* include/parse_aux.H1: Likewise.
* include/parse_input.H1: Likewise.
* include/parse_paste.H1: Likewise.
* include/parse_types.H1: Likewise.
* include/scrollbar.H1: Likewise.
* include/show_types.H1: Likewise.
* include/spadcolors.H1: Likewise.
* include/spadint.H1: Likewise.
* include/titlebar.H1: Likewise.
* hyper/Makefile.in: Compile and Link with a C++ compiler.
* hyper/ReadBitmap.c: Make it acceptable to a C++ compiler.
* hyper/cond.c: Likewise.
* hyper/dialog.c: Likewise.
* hyper/display.c: Likewise.
* hyper/display.h: Likewise.
* hyper/event.c: Likewise.
* hyper/event.h: Likewise.
* hyper/extent.h: Likewise.
* hyper/extent1.c: Likewise.
* hyper/extent2.c: Likewise.
* hyper/form-ext.c: Likewise.
* hyper/group.c: Likewise.
* hyper/group.h: Likewise.
* hyper/htadd.c: Likewise.
* hyper/htinp.c: Likewise.
* hyper/hyper.c: Likewise.
* hyper/hyper.h: Likewise.
* hyper/initx.c: Likewise.
* hyper/initx.h: Likewise.
* hyper/input.c: Likewise.
* hyper/item.c: Likewise.
* hyper/keyin.h: Likewise.
* hyper/keyin.c: Likewise.
* hyper/macro.c: Likewise.
* hyper/mem.c: Likewise.
* hyper/parse-aux.c: Likewise.
* hyper/parse-input.c: Likewise.
* hyper/parse-paste.c: Likewise.
* hyper/parse-paste.h: Likewise.
* hyper/parse-types.h: Likewise.
* hyper/parse-types.c: Likewise.
* hyper/parse.h: Likewise.
* hyper/parse.c: Likewise.
* hyper/scrollbar.c: Likewise.
* hyper/scrollbar.h: Likewise.
* hyper/show-types.c: Likewise.
* hyper/spadint.c: Likewise.
* hyper/titlebar.c: Likewise.
* hyper/titlebar.h: Likewise.
* graph/view3D/smoothShade3d.c: Include spadcolors.h
* graph/view3D/stuff3d.c: Likewise.
* graph/include/view.h (saymem): #undef before #define.
* graph/view2D/write2d.c: Include pixmap.h.
* graph/view3D/process3d.c: Likewise.
* graph/view3D/write3d.c: Likewise.
* graph/view3D/header.h: Remove macro definition for endColor and
colorStep.
* include/bsdsignal.h: Remove.
* include/edin.H1: Likewise.
* include/fnct_key.H1: Likewise.
* include/halloc.h: Likewise.
* include/hash.h: Likewise.
* include/prt.H1: Likewise.
* include/rgb.H1: Likewise.
* include/sockio.h: Likewise.
* include/util.h: Likewise.
* include/pixmap.h: Rename from pixmap.H1
Diffstat (limited to 'src/hyper/macro.c')
-rw-r--r-- | src/hyper/macro.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/hyper/macro.c b/src/hyper/macro.c index dd1625b7..cdabf8f8 100644 --- a/src/hyper/macro.c +++ b/src/hyper/macro.c @@ -1,7 +1,7 @@ /* Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd. All rights reserved. - Copyright (C) 2007-2008, Gabriel Dos Reis. + Copyright (C) 2007-2010, Gabriel Dos Reis. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -33,9 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define _MACRO_C #include "openaxiom-c-macros.h" - #include "debug.h" #include "halloc.h" #include "sockio.h" @@ -43,8 +41,8 @@ #include "hyper.h" #include "lex.h" -#include "all_hyper_proto.H1" - +static char * load_macro(MacroStore * macro); +static void get_parameter_strings(int number , char * macro_name); /* #define DEBUG 1 */ @@ -178,35 +176,35 @@ ParameterList parameters = NULL; ParameterList init_parameter_elem(int number) { - ParameterList new; + ParameterList parms; int count; /** allocate the space neeeded **/ - new = (ParameterList) halloc(sizeof(struct parameter_list_type), + parms = (ParameterList) halloc(sizeof(struct parameter_list_type), "ParameterList"); /** now allocate the memeory for the pointers to the parameters **/ if (number) { - new->list = (char **) halloc(number * sizeof(char *), "Parameter List"); + parms->list = (char **) halloc(number * sizeof(char *), "Parameter List"); /** initialize my pointers **/ for (count = 0; count < number; count++) - (new->list)[count] = NULL; + (parms->list)[count] = NULL; } - new->number = number; - return new; + parms->number = number; + return parms; } int -push_parameters(ParameterList new) +push_parameters(ParameterList parms) { - if (new == NULL) { + if (parms == NULL) { fprintf(stderr, "Tried pushing a null list onto the parameter stack\n"); longjmp(jmpbuf, 1); } - new->next = parameters; - parameters = new; + parms->next = parameters; + parameters = parms; return 1; } int @@ -291,13 +289,13 @@ get_parameter_strings(int number,char * macro_name) int lbrace_counter; char c; int size; - ParameterList new = init_parameter_elem(number); + ParameterList parms = init_parameter_elem(number); int pnum; char pnum_chars[5]; int pc; if (!number) { /* nothing to be done */ - push_parameters(new); + push_parameters(parms); return; } for (count = 0; count < number; count++) { @@ -362,10 +360,10 @@ get_parameter_strings(int number,char * macro_name) *buffer_pntr = '\0'; /*** Now add it to the current parameter list **/ size = strlen(buffer) + 1; - new->list[count] = (char *) halloc(size, "Parameter Strings"); - strcpy(new->list[count], buffer); + parms->list[count] = (char *) halloc(size, "Parameter Strings"); + strcpy(parms->list[count], buffer); } - push_parameters(new); + push_parameters(parms); return ; } void |