Parent Directory | Revision Log
Links to HEAD: | (view) (annotate) |
Links to MAIN: | (view) (annotate) |
Sticky Tag: |
stack.c (printerr): Modified to accept error type 5. (check_args): Modified to accept "empty" as argument. symbols.c: New symbols (sx_72616e646f6d), (seed), (ticks), (push) and (pop).
messages.h: Removed "\n" at the end of messages. stack.c, stack.h (printerr): Made function smarter. stack.c, symbols.c: Made better use of "check_args" and "printerr".
(check_args) New function to ease the checking of parameters.
stack.c: Trying to clean up. Moving big text mass to separate file. Eliminating the use of function toss.
(assocgen) Moved from "stack.c" to "symbols.c" + minor change in "stack.h".
Trying to remove "content.ptr" and type casts from the source.
(stack.c) Cleaning up.
stack.c (gc_init): Don't GC ports. (nl): Added an "environment*" argument. All callers changed. (nlport): New function. (type): Know about ports. (print_val): Added a FILE* argument to print to. All callers changed. Also check for write errors from "fprintf". Also, print ports. If printing a list, goto out of it if a write error occurs and don't print any further. (print_): Check for errors after "print_val". (printport_, printport, princport_, princport): New functions. (print_st): Added an "environment*" argument. All callers changed. (eval): Toss empty lists; if lists are functions, then empty lists are NOPs. Also, don't eval ports. (main): Reset error after showing it to protect "nl" and "printstack". (copy_val): Don't protect the old value. Was there ever a need to do that? Also, know about ports. (readline): Just call "readlinestream". (readlineport, readlinestream): New functions. (read): Just call "readstream". (readport, readstream): New functions. (sx_6f70656e, sx_636c6f7365): New functions "open" and "close". stack.h (value.type): New type; "port". (value.content): New container; "p". (nl): Added an "environment*" argument. (nlport): New function. (print_val): Added a FILE* argument. (printport_, printport, princport_, princport): New functions. (print_st): Added an "environment*" argument. (readlineport, readlinestream, readport, readstream, sx_6f70656e, sx_636c6f7365): New functions.
stack.c: (sx_646f): New function "do".
stack.c (assocgen): New function; generalized version of "assq". (assq): Changed to just call "assocgen" with proper arguments. stack.h (assocgen): New function.
stack.c (assq): New function. stack.h (assq): New function.
stack.h: Reordered to match the order in "stack.c". (print_h): Renamed to "print_val" and added an argument. (setcar, setcdr, car, cdr, cons): Added declarations. stack.c (CAR, CDR): Added more parentheses. (new_val): All new values are the empty list. All callers changed. (print_val): Print circular lists correctly by searching a stack which is passed recursively as a new argument. All callers changed.
stack.h (cons): Renamed to "pair". All users changed. stack.c (cons): New function.
The empty list and the indicator of the end of a list is no longer a value* which is NULL, but the "empty list" value, a type of its own. All affected functions changed. stack.h (value.type): New type, "empty". (environment): Comments added. stack.c (print_h): Print improper lists correctly. (rev): Don't bother reversing an empty list value. (forget): Eliminate unnecessary variable "stack_head". (copying): Fixed centering of first line.
stack.c: (sx_656c7365): "else" now requires a "then". (then): New function.
stack.h: (value->content.sym): New entry in content union. All callers changed. stack.c: (foreach): Bugfix.
stack.c: (CAR, CDR): New macros. All callers changed. stack.h: (environment.head): Changed type to "*value". All callers changed.
stack.h: Some comments added. stack.c (print_h, eval, rev, expand, copy_val, foreach, to): content.ptr changed to content.c in those places where the type already has been checked to be "tcons" or where it's part of the stack, (which always must be a proper list). (eval, expand, foreach): Check for improper lists. (copy_val): Don't loop, recurse into both car and cdr instead.
Modified internal data structure to use cons cells instead of simple linked lists. There is now a new value type "tcons".
stack.h (value): Renamed gc_protect to gc.flag.protect and replaced gc_garb with gc.flag.mark with reversed meaning. All users changed. (value): New field "no_gc", which is both flag.protect and flag.mark. stack.c: All users of gc_protect and gc_garb changed. (gc_init): Check both mark and protect at the same time through gc.no_gc. (new_val): Initialize gc.flag.protect too.
(protect, unprotect): Changed behaviour to mimic gc_mark. All callers changed.
stack.h (gc_maybe): New declaration.
(sx_646976): New function "div", integer division.
(new_val, gc_init, push_sym, eval, pack, copy_val, to, sx_72656164): Bugfix in GC. (push_int, push_float, type, print_h, not, sx_2b, sx_2d, sx_3e, sx_6966, ifelse, sx_7768696c65, sx_666f72, to, beep, sx_2a, sx_2f, mod): New value type "tfloat". (sx_3c, sx_3c3d, sx_3e3d): New functions "<", "<=" and ">=".
GPL stuff: stack.c, stack.h, Makefile: Added notices stack.c (copying, warranty): New functions. stack.h (copying, warranty): - '' - Other stuff: Makefile (stack): New explicit rule to depend on "stack.h" too. (mtrace): Depend on "stack", not "all". (check): New target. stack.c (main): Don't return error on EOF. (beep, wait): New functions. stack.h (beep, wait): - '' -
(protect, unprotect): New functions to protect values from GC.
(new_val, gc_init, main) GC bugfix/trimming. (sx_666f72 "for") Changed name to "foreach". (sx_666f72) New function. (eval) "(*func)()" is equal to "func()". (value) Data structure optimation. (stack.h) Removed variable names from prototypes.
Separated into header file and C file.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
root@recompile.se | ViewVC Help |
Powered by ViewVC 1.1.26 |