Branch: Tag:

1997-08-30

1997-08-30 18:36:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed prototypes almost everywhere.

Rev: src/acconfig.h:1.9
Rev: src/array.c:1.12
Rev: src/array.h:1.4
Rev: src/backend.c:1.15
Rev: src/backend.h:1.3
Rev: src/builtin_functions.c:1.41
Rev: src/builtin_functions.h:1.4
Rev: src/callback.c:1.9
Rev: src/callback.h:1.4
Rev: src/constants.c:1.12
Rev: src/constants.h:1.5
Rev: src/docode.c:1.20
Rev: src/docode.h:1.3
Rev: src/dynamic_load.c:1.19
Rev: src/dynamic_load.h:1.2
Rev: src/error.c:1.8
Rev: src/error.h:1.6
Rev: src/gc.c:1.12
Rev: src/gc.h:1.10
Rev: src/hashtable.c:1.3
Rev: src/hashtable.h:1.4
Rev: src/interpret.c:1.45
Rev: src/interpret.h:1.12
Rev: src/language.yacc:1.46
Rev: src/las.c:1.36
Rev: src/las.h:1.8
Rev: src/lex.c:1.26
Rev: src/lex.h:1.5
Rev: src/main.c:1.23
Rev: src/mapping.c:1.21
Rev: src/mapping.h:1.4
Rev: src/modules/Gdbm/gdbmmod.c:1.4
Rev: src/modules/Gmp/mpz_glue.c:1.20
Rev: src/modules/Image/image.c:1.36
Rev: src/modules/Image/polyfill.c:1.5
Rev: src/modules/Mysql/mysql.c:1.6
Rev: src/modules/Pipe/pipe.c:1.11
Rev: src/modules/Regexp/glue.c:1.7
Rev: src/modules/Regexp/pike_regexp.c:1.5
Rev: src/modules/Ssleay/ssleay.c:1.7
Rev: src/modules/Yp/yp.c:1.8
Rev: src/modules/_Crypto/lib/desQuick.c:1.3
Rev: src/modules/call_out/call_out.c:1.13
Rev: src/modules/files/efuns.c:1.33
Rev: src/modules/files/file.c:1.51
Rev: src/modules/files/file.h:1.5
Rev: src/modules/files/socket.c:1.14
Rev: src/modules/math/math.c:1.5
Rev: src/modules/spider/accesseddb.c:1.10
Rev: src/modules/spider/dumudp.c:1.14
Rev: src/modules/spider/spider.c:1.39
Rev: src/modules/spider/streamed_parser.c:1.7
Rev: src/modules/spider/streamed_parser.h:1.2
Rev: src/multiset.c:1.7
Rev: src/multiset.h:1.3
Rev: src/object.c:1.21
Rev: src/object.h:1.11
Rev: src/opcodes.c:1.8
Rev: src/opcodes.h:1.3
Rev: src/operators.c:1.16
Rev: src/operators.h:1.3
Rev: src/peep.c:1.15
Rev: src/peep.h:1.3
Rev: src/pike_types.c:1.25
Rev: src/pike_types.h:1.5
Rev: src/program.c:1.37
Rev: src/program.h:1.18
Rev: src/rusage.c:1.8
Rev: src/rusage.h:1.2
Rev: src/signal_handler.c:1.14
Rev: src/signal_handler.h:1.3
Rev: src/stralloc.c:1.17
Rev: src/stralloc.h:1.9
Rev: src/svalue.c:1.14
Rev: src/threads.c:1.24
Rev: src/threads.h:1.12

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: program.c,v 1.36 1997/08/03 09:55:11 hubbe Exp $"); + RCSID("$Id: program.c,v 1.37 1997/08/30 18:35:53 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
199:    * normal program, but all pointers points to the program we are currently    * compiling    */ - void setup_fake_program() + void setup_fake_program(void)   {    fake_program.refs=0xffffff;    SETUP(program, program_size, unsigned char, A_PROGRAM);
217:    fake_program.lfuns=0;    fake_prog.num_lfuns=0;   */ + #ifdef PROFILING +  fake_program.num_clones = 0; + #endif /* PROFILING */    fake_object.prog=&fake_program;   }   
225:   /*    * Start building a new program    */ - void start_new_program() + void start_new_program(void)   {    int e;   
352:   }   #endif    - static void toss_compilation_resources() + static void toss_compilation_resources(void)   {    struct pike_string **names;    struct svalue *modules;
402:    * Something went wrong.    * toss resources of program we were building    */ - void toss_current_program() + void toss_current_program(void)   {    setup_fake_program();    low_free_program(&fake_program);
545:    p+=MY_ALIGN(areas[AREA].s.len); \   }    - struct program *end_program() + struct program *end_program(void)   {    struct pike_string **names;    int size, i,e,t;
599:    INS_BLOCK(inherits,num_inherits,struct inherit,A_INHERITS);    INS_BLOCK(constants,num_constants,struct svalue,A_CONSTANTS);    + #ifdef PROFILING +  /* There is probably a better place for this, but... */ +  for (i=0; i < prog->num_identifiers; i++) { +  prog->identifiers[i].num_calls = 0; +  } + #endif /* PROFILING */ +     /* Ok, sort for binsearch */    prog->identifier_index=(unsigned short *)p;    for(e=i=0;i<(int)prog->num_identifier_references;i++)
926:    dummy.run_time_type=run_time_type;    dummy.func.offset=offset;    + #ifdef PROFILING +  dummy.num_calls = 0; + #endif /* PROFILING */ +     ref.flags=flags;    ref.identifier_offset=areas[A_IDENTIFIERS].s.len / sizeof dummy;    ref.inherit_offset=0;
1029:       dummy.func.offset=store_constant(c, 0);    + #ifdef PROFILING +  /* Not strictly necessary, but... */ +  dummy.num_calls = 0; + #endif /* PROFILING */ +     ref.flags=flags;    ref.identifier_offset=fake_program.num_identifiers;    ref.inherit_offset=0;
1216:    else    fun.func.offset = -1;    + #ifdef PROFILING +  fun.num_calls = 0; + #endif /* PROFILING */ +     ref.identifier_offset=fake_program.num_identifiers;    add_to_mem_block(A_IDENTIFIERS, (char *)&fun, sizeof(fun));    }
1513:   /*    * Compile an PIKE file. Input is supposed to be initalized already.    */ - void compile() + void compile(void)   { -  int yyparse(); +  int yyparse(void);       start_line_numbering();   
1622:   }      #ifdef DEBUG - void check_all_programs() + void check_all_programs(void)   {    struct program *p;    for(p=first_program;p;p=p->next)
1649:   }   #endif    - void cleanup_program() + void cleanup_program(void)   {   #ifdef FIND_FUNCTION_HASHSIZE    int e;
1672: Inside #if defined(GC2)
   gc_mark_svalues(p->constants, p->num_constants);   }    - void gc_check_all_programs() + void gc_check_all_programs(void)   {    struct program *p;    for(p=first_program;p;p=p->next)
1694: Inside #if defined(GC2)
   }   }    - void gc_mark_all_programs() + void gc_mark_all_programs(void)   {    struct program *p;    for(p=first_program;p;p=p->next)
1702: Inside #if defined(GC2)
   gc_mark_program_as_referenced(p);   }    - void gc_free_all_unreferenced_programs() + void gc_free_all_unreferenced_programs(void)   {    struct program *p,*next;   
1735:    *num_=num;    *size_=size;   } - void push_locals() + void push_locals(void)   {    struct locals *l;    l=ALLOC_STRUCT(locals);
1747:    local_variables=l;   }    - void pop_locals() + void pop_locals(void)   {    struct locals *l;    free_all_local_names();