1996-11-16
1996-11-16 05:17:15 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
e43ca240c842c057c623b3f1bcdf4df43782760c
(26 lines)
(+22/-4)
[
Show
| Annotate
]
Branch: 7.9
Support for libz added
Rev: src/ChangeLog:1.19
Rev: src/configure.in:1.14
Rev: src/dynamic_buffer.c:1.2
Rev: src/dynamic_buffer.h:1.2
Rev: src/modules/files/file.c:1.12
Rev: src/modules/image/togif.c:1.12
Rev: src/modules/spider/encode_decode.c:1.4
Rev: src/modules/zlibmod/.cvsignore:1.1
Rev: src/modules/zlibmod/Makefile.src:1.1
Rev: src/modules/zlibmod/configure.in:1.1
Rev: src/modules/zlibmod/testsuite.in:1.1
Rev: src/modules/zlibmod/zlib_machine.h.in:1.1
Rev: src/modules/zlibmod/zlibmod.c:1.1
Rev: src/peep.c:1.3
Rev: src/program.c:1.7
Rev: src/program.h:1.3
4:
||| See the files COPYING and DISCLAIMER for more information.
\*/
#include "global.h"
- RCSID("$Id: program.c,v 1.6 1996/11/14 01:36:31 hubbe Exp $");
+ RCSID("$Id: program.c,v 1.7 1996/11/16 05:17:10 hubbe Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
133:
#undef PUSH
#undef PROGRAM_STATE
- for(e=0; e<NUM_AREAS; e++) low_init_buf(areas + e);
- low_init_buf(& inherit_names);
+ for(e=0; e<NUM_AREAS; e++) low_reinit_buf(areas + e);
+ low_reinit_buf(& inherit_names);
fake_program.id = ++current_program_id;
inherit.prog=&fake_program;
842: Inside #if defined(DEBUG)
#ifdef DEBUG
if(name!=debug_findstring(name))
- fatal("define_variable on nonshared string.\n");
+ fatal("define_constant on nonshared string.\n");
#endif
setup_fake_program();
885:
return n;
}
+ int add_integer_constant(char *name,
+ INT32 i,
+ INT32 flags)
+ {
+ struct svalue tmp;
+ struct pike_string *id;
+ int ret;
+ tmp.u.integer=i;
+ tmp.type=T_INT;
+ tmp.subtype=NUMBER_NUMBER;
+ id=make_shared_string(name);
+ ret=add_constant(id,&tmp, flags);
+ free_string(id);
+ return ret;
+ }
+
+
/*
* define a new function
* if func isn't given, it is supposed to be a prototype.