-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChangeLog-2009-2015
22389 lines (15269 loc) · 727 KB
/
ChangeLog-2009-2015
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2015-08-08 Kaz Kylheku <kaz@kylheku.com>
Discontinuing ChangeLog.
* ChangeLog: renamed to ChangeLog-2009-2015, and discontinued.
Changes will be tracked only in the git commit messages
from now on and not duplicated into the ChangeLog.
2015-08-08 Kaz Kylheku <kaz@kylheku.com>
Version 111.
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* tl.vim, txr.vim: Regenerated.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
C++ upkeep: conversions, clashes, warnings.
* glob.c (glob_wrap): Fix signed/unsigned comparison.
* stream.c (make_null_stream): Fix convert beign used
where coerce is needed.
* sysif.c (dup_wrap): Fix use of C++ new keyword.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
C++ static forward issue.
* lib.h (static_forward, static_def): New macros
for dealing with C++ static forward declaration problem.
* syslog.c (syslog_strm_ops): Use static
forward macros.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
C++ upkeep: resolve multiple definitions of fun_k.
* eval.c (fun_k): Global definition removed.
(eval_init): Do not initialize fun_k here.
* filter.c (fun_k): Definition removed.
(filter_init): Do not initialize fun_k.
* filter.h (fun_k): Declaration removed.
* lib.c (fun_k): Defined in this file now.
(obj_init): Initialize fun_k here.
* lib.h (fun_k): Declare here.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
* Makefile (SRCS): When top_srcdir is blank, elide the entire
--work-tree argument to git. On Cygwin, git throws a strange error
message when --work-tree is given a blank argument.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
* stream.c: Include <wctype.h> header for iswprint.
Needed on Cygwin.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
* sysif.c (w_lstat): If we don't have S_IFLINK, implement
w_lstat as an alias to w_stat. This helps build on MinGW.
2015-08-07 Kaz Kylheku <kaz@kylheku.com>
Change to different exception for debugger quit.
* debug.c (debug_quit_s): New global variable.
(debug): Throw debug-quit, not query-error.
(debug_init): Initialize debug_quit_s.
2015-08-06 Kaz Kylheku <kaz@kylheku.com>
* debug.c (help): Rearrange menu. Show missing quit command.
2015-08-06 Kaz Kylheku <kaz@kylheku.com>
Suppress debug stepping into auto-loaded library code.
* debug.c (debug_set_state, debug_restore_state): New functions.
* debug.h (debug_state_t): New type.
(debug_set_state, debug_restore_state): Declared, and defined
as dummy macros in non-debug-support build.
* lisplib.c (opt_dbg_autoload): New global variable.
(lisplib_try_load): Disable or enable debugging around
library loading based on opt_dbg_autoload option.
* lisplib.h (opt_dbg_autoload): Declared.
* txr.c (help): List --debug-autoload option.
(no_dbg_support): New static function to avoid repeated code.
(txr_main): Add debugger-autoload option. Change duplicate no debug
support error messages into calls to no_dbg_support.
* txr.1: Document --debug-autoload
2015-08-06 Kaz Kylheku <kaz@kylheku.com>
* txr.c (txr_main): Bugfix: debugger long option nonfunctional.
2015-08-06 Kaz Kylheku <kaz@kylheku.com>
Better diagnosis for loose @ forms.
* eval.c (op_meta_error): New static function.
(eval_init): Register sys:var and sys:expr as operators
that throw error.
* parser.y (sym_helper): Take parser_t instead of scanner_t
argument so we have access to the name and line number.
Obtain scanner internally from parser. Add source location
info to (sys:var ...) form.
(symhlpr): Retarget macro to pass parser rather than scanner to
sm_helper.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
New filesystem object testing functions.
* lisplib.c (path_test_set_entries, path_test_instantiate):
New static functions.
(dlt_register): Registered new functions to dl_table.
* txr.1: Documented new functions.
* share/txr/stdlib/path-test.tl: New file.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
Adding support for uid and gid manipulation.
* configure: Added check for geteuid and related functions.
* sysif.c (getuid_wrap, geteuid_wrap, getgid_wrap, getegid_wrap,
getgroups_wrap, setuid_wrap, seteuid_wrap, setgid_wrap, setegid_wrap):
New static functions.
(sysif_init): Register intrinsics getuid, geteuid, getgid,
getegid, getgroups, setuid, seteuid, setgid, setegid.
* txr.1: Documented new functions.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
* lib.c (system_error_s): New symbol variable.
(obj_init): Initialize new variable.
* lib.h (system_error_s): Declared.
* unwind.c (uw_init): Register system-error exception type.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
* stream.c (stream_init): Register get-indent-mode, set-indent-mode,
test-set-indent-mode, get-indent, set-indent, inc-indent
and width-check intrinsic functions. Register indent-off,
indent-data and indent-code variables.
* txr.1: Documented stream output indentation API.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
* stream.c (width_check): Just use the public
put_char function; no need to manipulate column
or call put_indent.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
Better diagnostic in funcall family of functions.
* lib.c (wrongargs): New static function.
(funcall, funcall2, funcall2, funcall3, funcall4):
Use wrongargs.
2015-08-05 Kaz Kylheku <kaz@kylheku.com>
* eval.c (do_eval): Bugfix: though last_form_evaled is
saved and restored around the execution of a special operator,
it is never set the current form.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* eval.c (bind_args): Use new ~! for proper indentation
of multi-line context form.
(apply): Use ~! for proper indentation of function code.
* unwind.c (uw_throw): Use ~! for proper indentation of code.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (put_string): In indent mode, put_string has
to process all the characters as if by put_char,
(which we now do literally that way).
(set_indent_mode): Bugfix: no longer reset the column
to zero when turning off indent mode. This is wrong since
streams do column counting all the time.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (vformat): Implement ~! format directive for indentation.
Allow negative widths to be specified with a leading minus sign,
so that we can indent to the left.
* txr.1: Document ~! format directive.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (put_string, put_char): Do not put out the indentation
immediately after outputting a newline. Rather, delay the output of the
indentation until some output occurs at column zero.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (inc_indent): If a negative indentation increment goes below
zero, clamp it at zero.
(set_indent): Clamp indentation value to zero.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (vormat): Bugfix: when width specified as *
meets a negative argument, the width should be treated
as positive and the field left aligned. Instead, the
width is treated as zero.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (string_out_put_string): Do not return nil when
buffer calculations overflow, but throw exception.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
Remove useless return values and checks.
* stream.c (vformat_align_pre, vformat_align_post): Change to void
return. Do not check return value of put_char.
(vformat_num, vformat_str): Change to void return. Do not check return
value of vformat_align_pre, vformat_aign_post or put_char.
(vformat): Do not check return value of vformat_str or vformat_num.
nilout exit point no longer needed.
(put_string): Do not intercept return value of ops->put_string.
Return t.
(put_char): Do not intercept return value of ops->put_char.
Do not check return value of put_indent. Return t.
* txr.1: Document t return of put-char, put-byte and put-string.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* eval.c (func_get_name): New function.
(bind_args): Include the entire context form in argument
mismatch errors.
(apply): Include the function name, or else source code
if it has no name, in argument mismatch erors.
(eval_init): Register func-get-name intrinsic.
* eval.h (func_get_name): Declared.
* txr.1: Documented func-get-name.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* eval.c (force): Default the new second argument of source_loc_str.
(eval_error): Derive location of error from
the last_form_evaled, if form doesn't have it.
(eval_init): Re-register source-loc-str as binary with an optional arg.
* match.c (debuglf, sem_error, file_err, typed_error): Default new
argument of source_loc_str.
* parser.h (source_loc_str): Declaration updated.
* parser.l (source_loc_str): Take second argument which specifies
alternative value if the source loc info is not found.
* unwind.c (uw_throw): Simplify code thanks to source_loc_str
default argument.
* txr.1: Document new argument of source-loc-str.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* hash.c (hash_revget): New function.
* hash.h (hash_revget): Declared.
* eval.c (eval_init): Registered hash-revget intrinsic.
* txr.1: Documented hash-revget.
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
* stream.c (indent_mode_put_string): Function removed,
logic hoisted into put_string.
(put_string, put_char): Always count column, indent mode or not.
* tests/009/json.expected: Updated.
2015-08-03 Kaz Kylheku <kaz@kylheku.com>
Define TXR_DBG macro when compiling debug build.
* Makefile (dbg/%.o): Pass $(DBG_ONLY_FLAGS) to COMPILE_C_WITH_DEPS
recipe macro.
* configure (debug_only_flags): New macro.
(gen_config_make): Generate DBG_ONLY_FLAGS.
Add debug-only-flags to usage help text.
2015-08-03 Christopher Meng <i@cicku.me>
Custom linker flags support.
* Makefile (PLATFORM_FLAGS): Rename to PLATFORM_CFLAGS.
(LDFLAGS): New variable. Includes -lm and PLATFORM_CFLAGS.
(LINK_PROG): Use $(LDFLAGS) instead of -lm.
* configure (platform_flags): Renamed to platform_cflags.
(platform_ldflags): New variable.
(gen_config_make): Rename PLATFORM_CFLAGS and generate
PLATFORM_LDFLAGS.
Usage help text updated.
2015-08-03 Kaz Kylheku <kaz@kylheku.com>
Switching some globals to lexical and changing some names.
* arith.c (arith-init): Changing *flo-...* from special to
lexical, and adding un-earmuffed variants. The earmuffed
versions are obsolescent.
Adding %pi% and %e% global lexicals. Earmuffed versions are
also made global lexical, and obsolescent.
* eval.c (lookup_global_var, lookup_global_var_l): New functions.
(lookup_var): Uses lookup_global_var.
(reg_varl): New function.
(reg_var): Uses reg_var.
(eval_init): Register global lexicals user-package, system-package
and keyword-package. Old symbols with earmuffs are obsoleted,
and also turned into global lexicals.
(top-vb, top-fb): Changed to lexical.
* eval.h (lookup_global_var, lookup_global_var_l, reg_varl):
Declared.
* genvim.txr: Scan ver.tl so that the lib-version variable
is included. Extract reg_varl calls.
* glob.c (glob_init): glob-err and other variables made lexical.
* lib.c (get_user_package, get_system_package, get_keyword_package):
Use lookup_global_var_l to avoid searching dynamic scope for
lexicals which cannot be dynamically rebound.
* share/txr/stdlib/ver.tl (lib-version): New global lexical variable.
(*lib-version*): Turned lexical. Obsolescent.
* signal.c (sig-init): sig-* variables turned lexical.
* sysif.c (sysif-init): s-*, poll-* and w-* variables turned lexical.
* syslog.c (syslog-init): log-* variables turned lexical.
* txr.c (sysroot-init): stdlib and *txr-version* variables turned
lexical. txr-version variable added, and *txr-version* is
obsolescent.
(txr-main): self-path variable added. *self-path* turns lexical
and is obsolescent.
* txr.1: Documentation updated. Lexical variables not referred
to as special. Special variables referred to as special.
2015-08-03 Kaz Kylheku <kaz@kylheku.com>
* txr.c (txr_main): Bugfix: register *args-full*, the variable
described in the documentation! We keep *full-args* for backward
compatibility, as an obsolescent feature.
2015-08-03 Kaz Kylheku <kaz@kylheku.com>
Introducing global lexicals: defvarl, defparml.
* eval.c (defvarl_s, defparm_s, defparml_s, sys_mark_special_s): New
symbol variables.
(mark_special): Return val rather than void, since it's hoisted
into Lisp domain now with func_n1.
(op_defvar): Renamed to op_defvarl, and doesn't call mark_special.
defvarl is now the special form for defining variables, and special
marking is an embellishment added by macros.
(me_defparm): Renamed to me_def_variable. Handles defvar, defparm
and defparml.
(do_expand): Expand defvarl, rather than defvar.
(eval_init): Intern defvarl, defparm, defparml and mark-special
symbols, and initialize corresponding globals.
Register defvarl special operator, retiring defvar.
Register defparm to me_def_variable, and register defvar and
defparml to the same.
* txr.1: Document support for global lexical scopes and the
new macros.
2015-08-02 Kaz Kylheku <kaz@kylheku.com>
Support lstat and fstat.
* stream.h (statf): Declaration removed.
* sysif.c (w_stat): Function takes val instead of const wchar_t *
as leftmost argument.
(w_lstat, w_fstat): New static functions, with same interface as w_stat.
(stat_to_list, stat_impl): New static functions.
(statp, statl): New static functions.
(statf): Function removed, name re-used for new static function.
(sysif_init): stat intrinsic registered to statp function, not statf.
lstat and fstat intrinsics registered to statl and statf.
* txr.1: Documented lstat and fstat.
2015-08-01 Kaz Kylheku <kaz@kylheku.com>
Pass pretty flag to cobj print operation.
* hash.c (hash_print_op): Take third argument,
and call cobj_print_impl rather than cobj_print.
* lib.c (cobj_print_op): Take third argument. The object class is
* printed with obj_print_impl.
(obj_print_impl): Static function becomes extern. Passes its pretty
flag argument to cobj print virtual function.
* lib.h (cobj_ops): print takes third argument.
(cobj_print_op): Declaration updated.
(obj_print_impl): Declared.
* regex.c (regex_print): Takes third argument, and ignores it.
* stream.c (stream_print_op, stdio_stream_print, cat_stream_print):
Take third argument, and ignore it.
* stream.h (stream_print_op): Declaration updated.
2015-08-01 Kaz Kylheku <kaz@kylheku.com>
* eval.c (special_p): Function renamed to special_var_p.
(expand_opt_params_rec, expand_vars): Follow rename of special_p.
(eval_init): Register special-operator-p and special-var-p
intrinsics.
* txr.1: Document special-operator-p and special-var-p.
2015-08-01 Kaz Kylheku <kaz@kylheku.com>
Big TXR Lisp documentation rearrangement.
* txr.1: Numerous sections moved around. Miscellaneous formatting
and wording fixes. New sections under TXR Lisp intro section.
2015-07-31 Kaz Kylheku <kaz@kylheku.com>
string_output renamed to string_out
* stream.c (struct string_output): Renamed to string_out.
(string_out_stream_destroy, string_out_byte_callback,
string_out_put_char, strnig_out_put_string, string_out_put_byte,
make_string_output_stream, get_string_from_stream): Follow rename.
2015-07-31 Kaz Kylheku <kaz@kylheku.com>
Simplify type check code in stream module.
* stream.c (get_string_from_stream, get_list_from_stream,
stream_set_prop, stream_get_prop, close_stream, get_line,
get_char, get_byte, unget_char, unget_byte, put_string,
put_char, put_byte, flush_stream, seek_stream): Use cobj_handle and
cobj_ops instead of type_check and type_assert.
(get_indent_mode, test_set_indent_mode, set_indent_mode,
get_indent, set_indent, inc_indent, width_check): Use cobj_handle
and cobj_ops instead of stream->co.handle and stream->co.ops
for safety.
(vformat, format): Use class_check instead of type_check and
type_assert.
2015-07-31 Kaz Kylheku <kaz@kylheku.com>
Multi-line, indented printing of structure.
* eval.c (op_error): New static function.
(macro_form_p, fboundp): Static to external.
(special_operator_p): New function.
(eval_init): Register macrolet and symacrolet to op_error.
These are recognized and processed by expand, but we want
them in the op table so they are reported by special_operator_p.
* eval.h (fboundp, macro_form_p, special_operator_p): Declared.
* hash.c (print_key_val): Break long lines on spaces
between pairs with stream_width_check.
(hash_print_op): Implement split and indented printing.
* lib.c (obj_print_impl): New static function, resulting
from a merge of obj_print and obj_pprint. Fixes some
wrong-way recursion bugs: obj_pprint recursed into obj_print
in some places. Adds support for multi-line printing of
vectors and lists, with indentation using the new
interfaces in streams.
* stream.c (strm_base_init): Update initializer.
(put_indent, indent_mode_put_string): New static functions.
(put_string): Use indent_mode_put_string in either of the
two indent modes.
(put_char): Implement indent mode.
(get_indent_mode, test_set_indent_mode,
set_indent_mode, get_indent, set_indent,
inc_indent, width_check): New functions.
* stream.h (enum indent_mode): New.
(struct strm_base): indent_on member becomes indent_mode.
New members data_width and code_width.
(get_indent_mode, test_set_indent_mode,
set_indent_mode, get_indent, set_indent,
inc_indent, width_check): Declared.
* tests/009/json.expected: Updated.
* tests/010/seq.expected: Likewise.
* tests/011/macros-2.expected: Likewise.
2015-07-30 Kaz Kylheku <kaz@kylheku.com>
* filter.c, utf8.c: Fix bad indentation introduced in whitespace
fix on 2013-08-09.
2015-07-30 Kaz Kylheku <kaz@kylheku.com>
Correction to COBJ initialization pattern.
In fact, the previosuly documented process is not correct and still
leaves a corruption problem under generational GC (which has been the
default for some time).
* HACKING: Document flaw in the initialization pattern previously
thought to be correct, and show fix.
* hash.c (copy_hash): Fix instance of incorrect pattern.
* regex.c (regex_compile): Likewise.
2015-07-30 Kaz Kylheku <kaz@kylheku.com>
* HACKING: Restore accidentally deleted document title.
2015-07-29 Kaz Kylheku <kaz@kylheku.com>
Deriving streams from the same base, so
we can give streams some common slots.
* stream.c (strm_base_init, strm_base_cleanup, strm_base_mark,
stream_destroy_op, stream_mark_op): New functions.
(null_ops): Switch to stream_destroy_op and stream_mark_op.
(make_null_stream): Associate a strm_base instance with the
cobj handle rather than a null pointer.
(struct stdio_handle): Inherit struct strm_base.
(stdio_stream_destroy): Clean up the strm_base part.
(stdio_stream_mark): Mark the strm_base part.
(make_stdio_stream_common): Initialize the strm_base part.
(struct dir_handle): Inherit struct strm_base.
(dir_destroy): Clean up the strm_base part.
(dir_mark): Mark the strm_base part.
(make_dir_stream): Initialize the strm_base part.
(struct string_in): New structure. Replaces ad-hoc cons
cell used for string input streams.
(string_in_stream_mark): Mark new structure.
(string_in_get_line, string_in_get_char, string_in_unget_char,
string_in_get_prop, string_in_get_error, make_string_input_stream):
Convert to new structure.
(string_in_ops): Switch to stream_destroy_op.
(struct byte_input): Inherit struct strm_base.
(byte_in_stream_destroy): No need to check handle for null.
No need to set handle to null after freeing: gc does it.
Clean up the strm_base part.
(byte_in_ops): Switch to stream_mark_op.
(make_string_byte_input_stream): Initialize the strm_base part.
(struct string_output): Inherit struct strm_base.
(string_out_stream_destroy): No need to check handle for null
since the logic elsewhere has changed.
Clean up the strm_base part.
No need to set handle to null.
(string_out_ops): Switch to stream_mark_op.
(make_string_output_stream): Initialize the strm_base part.
(get_string_from_stream): Don't free the handle.
Null out the buffer so->buf whose ownership passes to the string.
(struct strlist_out): New structure. Replaces ad-hoc cons cell
used for string list output stream.
(strlist_mark): Renamed to strlist_out_mark. Mark the strm_base
part.
(strlist_out_put_string, strlist_out_put_char,
make_strlist_output_stream, get_list_from_stream):
Convert to new structure.
(strlist_out_ops): Switch to stream_destroy_op.
Follow rename of strlist_mark.
(struct cat_strm): New structure, replacing ad-hoc list pointer
2015-07-29 Kaz Kylheku <kaz@kylheku.com>
* gc.c (finalize): Null out cobj handle after calling the
destructor. This can catch some use-after-free errors.
2015-07-29 Kaz Kylheku <kaz@kylheku.com>
* stream.c (common_destroy): Function removed.
(stdio_stream_destroy, dir_destroy): Call close_stream directly.
2015-07-29 Kaz Kylheku <kaz@kylheku.com>
* stream.c: Rearranging definitions and declarations so that
code for each stream type is together. Moving catenated
streams above utility functions, so they are together with
other stream definitions.
2015-07-28 Kaz Kylheku <kaz@kylheku.com>
Centered fields in format.
* stream.c (enum align): New enum.
(vformat_align_pre, vformat_align_post): New static functions.
(vformat_num, vformat_str): Argument left renamed to align, and changed
to enum align. vformat_align_pre and vformat_align_post are called to
generate the correct padding for left, center and right alignment.
(vformat): Two-valued local variable left turned into three-valued
align. The ^ prefix on the width field is recognized.
* txr.1: Documented ^ width prefix.
2015-07-28 Kaz Kylheku <kaz@kylheku.com>
* share/txr/stdlib/txr-case.tl (txr-case-impl): Bugfix,
handle nil case in recursion.
2015-07-28 Kaz Kylheku <kaz@kylheku.com>
* txr.1: In introduction of user-defined places, mentioning
placelet as a way of writing place update macros.
Example added under placelet.
2015-07-25 Kaz Kylheku <kaz@kylheku.com>
Version 110.
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* tl.vim, txr.vim: Regenerated.
2015-07-25 Kaz Kylheku <kaz@kylheku.com>
* genvim.txr: Improved highlighting of items in quasiquote.
Lists can be spliced and quoted. Metanums and metavars can
be prefixed by multiple @'s.
2015-07-25 Kaz Kylheku <kaz@kylheku.com>
* genvim.txr: Do not refer to installed code via stdlib.
Refer to source tree.
2015-07-25 Kaz Kylheku <kaz@kylheku.com>
Quasiliteral tests.
* tests/012/quasi.expected: New file.
* tests/012/quasi.tl: New file.
2015-07-25 Kaz Kylheku <kaz@kylheku.com>
* Makefile (tst/tets/012/%): Disable --gc-debug for
tests in this directory.
2015-07-24 Kaz Kylheku <kaz@kylheku.com>
* tests/012/ifa.tl: New test for it being bound to a place.
2015-07-24 Kaz Kylheku <kaz@kylheku.com>
Bugfix: place-form-p must expand place macros.
* share/txr/stdlib/place.tl (place-form-p): Take
environment parameter. Expand the place form using sys:pl-expand.
* share/txr/stdlib/ifa.tl (ifa): Pass environment
to place-form-p.
(nthcdr): Pass environment down to place-form-p.
2015-07-24 Kaz Kylheku <kaz@kylheku.com>
* eval.c (op_quote): Improved diagnostic.
2015-07-23 Kaz Kylheku <kaz@kylheku.com>
Set up blank top_srcdir if building in source directory.
This means short, relative names are used for C source files when
compiling in the source directory.
* Makefile (CFLAGS): Exclude -iquote $(top_srcdir) arguments
if top_srcdir is blank. Remove slash after $(top_srcdir),
since the variable includes it now, if its value is not blank.
(SRCS, ABBREV, opt/%-win.o, lex.yy.c, y.tab.c, install): Remove slash
after $(top_srcdir).
(dbg/%.o, opt/%.o): Only include rules for depending
on $(top_srcdir)%.c prerequisite if top_srcdir is not blank.
In the blank case, the rules are redundant.
* configure: if configuring in the root of the source tree,
establish top_srcdir as blank, otherwise establish is as
an absolute path with a trailing slash.
2015-07-23 Kaz Kylheku <kaz@kylheku.com>
Split off test macros from ifa.tl into common file.
* Makefile (TESTS_OUT): Don't use find to hunt down tests;
but rather wildcard. This way common.tl is not mistakenly
identified as an independent test file.
* tests/012/ifa.tl: Removed test code, placed in new file
which is loaded.
* tests/common.tl: New file.
2015-07-23 Kaz Kylheku <kaz@kylheku.com>
Fixes for building in separate dir.
* Makefile (CFLAGS): Search for mpi header in $(top_srcdir).
(ABBREV): Remove top_srcdir prefix from source names.
(dbg/%.o, opt/%.o): Extra set of pattern rules for searching
for prerequisites in $(top_srcdir) where primary C sources
are found and in the local dir where some generated C is found.
This way we don't rely on VPATH.
(opt/%.res): Bogus target removed.
(VPATH): Removed in favor of explicitly referencing $(top_srcdir).
Was causing problems for tests.
(lex.yy.c, y.tab.c): Prerequisites referenced in $(top_srcdir).
2015-07-23 Kaz Kylheku <kaz@kylheku.com>
* parser.l (grammar): Do not allow unescaped newline in
word list literals and word list quasiliterals, except
in <= 109 compatibility mode. An escaped newline in
these literals, together with surrounding whitespace,
now produces a single space, except in <= 109
compatibility mode.
* txr.1: Documented new rules for WLL's and QLL's,
and added compatibility notes.
2015-07-23 Kaz Kylheku <kaz@kylheku.com>
* genvim.txr: Scan cadr.c, cadr.tl, with-resources.tl, txr-case.tl.
Remove hard-coded txr-case symbols. Recognize operators registered
with in-line intern.
2015-07-23 Kaz Kylheku <kaz@kylheku.com>
Adding with-resources macro.
* share/txr/stdlib/with-resources.tl: New file.
* lisplib.c (with_resource_set_entries, with_resources_instantiate):
New static functions.
(lisplib_init): Register new functions under dlt_register.
* txr.1: Document with-resources.
2015-07-22 Kaz Kylheku <kaz@kylheku.com>
Adding nthcdr as accessor.
* eval.c (eval_init): Register nthcdr function.
* lib.c (nthcdr): New function.
* lib.h (nthcdr): Declared.
* share/txr/stdlib/place.tl (nthcdr): New defplace.
* txr.1: Documented.
2015-07-22 Kaz Kylheku <kaz@kylheku.com>
Improve bad argument diagnosis for place macros.
* eval.c (op_mac_param_bind): New static function.
(eval_init): Register mac-param-bind operator.
* share/txr/stdlib/place.tl (define-place-macro): Use
mac-param-bind inside a lambda instead of tb macro.
* txr.1: Document mac-param-bind.
2015-07-22 Kaz Kylheku <kaz@kylheku.com>
Implementing second through tenth as places.
* eval.c (eval_init): Register second through tenth as intrinsic.
* gencadr.txr: New cadr.c changes encoded.
* lib.c (second, third, fourth, fifth, sixth): Functions
reimplemented using ref, so they are much more efficient
for vectors and strings.
(seventh, eighth, ninth, tenth): New functions.
* lib.h (seventh, eighth, ninth, tenth): Declared.
* share/txr/stdlib/place.tl: place macros defined for
second through tenth.
* txr.1: Documented.
2015-07-22 Kaz Kylheku <kaz@kylheku.com>
* lisplib.c (place_set_entries): Add *place-macro* and
define-place-macro to list of names.
* share/txr/stdlib/place.tl (*place-macro*): New global hash.
(sys:tigger-load, sys:pl-expand): New functions.
(call-update-expander, call-clobber-expander, call-delete-expander):
Recognize and expand place macros.
(define-place-macro): New macro.
(first, rest): Places redefined using define-place-macro, replacing
the old hack of copying the expanders from one table entry to another.
* txr.1: Documented place macros.
2015-07-22 Kaz Kylheku <kaz@kylheku.com>
* lib.c (obj_print, obj_pprint): Bugfix: incorrect
value returned when printing dwim forms, due to
mutating the obj variable.
2015-07-21 Kaz Kylheku <kaz@kylheku.com>
Implementing caar, cadr, cdar and friends.
* lib.c (init): Call cadr_init.
* lisplib.c (dl_table, set_dlt_entries, dlt_register): Externalize.
* lisplib.h (dl_table, set_dlt_entries, dlt_register): Declared.
* Makefile (OBJS): Add cadr.o.
* cadr.c: New file.
* cadr.h: New file.
* gencadr.txr: New file.
* share/txr/stdlib/cadr.tl: New file.
* txr.1: Document cadr accessors.
2015-07-21 Kaz Kylheku <kaz@kylheku.com>
* share/txr/stdlib/place.tl (defplace cdr): Change deletion
semantics so that (del (cdr x)) is symmetric with (del (car x)).
* txr.1: Update documentation.
2015-07-21 Kaz Kylheku <kaz@kylheku.com>
* eval.c (eval_init): Register new split function.
* lib.c (split_func): New static function.
(partition_split_common): New static function, based on
on contents of partition function.
(partition): Now a wrapper around partition_split_common.
(split): New function.
* lib.h (split): Documented.
* txr.1: Documented split.
2015-07-13 Kaz Kylheku <kaz@kylheku.com>
* parser.c (open_txr_file): Bugfix: the name of the parsed
stream should be the resolved name, not the abstract original,
so that error messages correlate to the file.
2015-07-12 Kaz Kylheku <kaz@kylheku.com>
* share/txr/stdlib/ifa.tl (ifa): Use placelet to
allow "it" to be mutable when it denotes a place form.
2015-07-12 Kaz Kylheku <kaz@kylheku.com>
* share/txr/stdlib/place.tl (place-form-p): New function.
* lisplib.c (place_set_entries): Add place-form-p to list of names.
2015-07-11 Kaz Kylheku <kaz@kylheku.com>
Expand away sys:lisp1-value based on lexical info.
* eval.c (sys_lisp1_value_s): New global symbol variable.
(expand_lisp1_value): New static function.
(do_expand): Use expand_lisp1_value.
(eval_init): Initialize sys_lisp1_value_s.
2015-07-11 Kaz Kylheku <kaz@kylheku.com>
Let's have placelet and placelet*.
* share/txr/stdlib/place.tl (placelet*): New macro.
* lisplib.c (place_set_entries): Add placelet* to list of names.
* txr.1: Updated to document placelet* and fix mistakes.
2015-07-11 Kaz Kylheku <kaz@kylheku.com>
* share/txr/stdlib/place.tl (defplace dwim): Eliminate
ogetter-sym variable for caching the sequence; use the getter
for the sequence place to access it. Again, this is for placelet,
where the caching is visible. Another way to fix this is to
clobber the cache variable when updating the sequence place.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
* eval.c (eval_init): Register bindable as intrinsic.
* txr.1: Documented.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
New placelet macro.
* lisplib.c (place_set_entries): Add placelet to list of names.
* share/txr/stdlib/place.tl (sys:placelet1, placelet): New macros.
(defplace dwim): Do not retrieve the
place's value into a local variable and have the getter
expand to that variable. Rather, have the getter retrieve the
value. A getter that refers to a cached copy breaks
the semantics of placelet, and any place operator which can
evaluate the location after it is stored.
* txr.1: Documented placelet.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
Handle setting of parse name through prime_parser.
* parser.c (prime_parser): Take name as argument,
and install it into parser.
(lisp_parser): Pass name to parse, instead of setting it
in the parser object.
* parser.y (parse): Take name as argument and pass
down to prime_parser.
* parser.h (prime_parser, parse): Declarations updated.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
Fix wrong name reported for errors in first top-level form.
* parser.c (read_eval_stream): Get name of original stream,
and pass that down to lisp_parse as the name argument.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
Fix off by one error line numbers for .tl files.
* parser.c (read_eval_stream): Add terminating newline to
the first line that was examined for hash bang.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
Remove unused "primer" member from parser_t.
* parser.c (parser_mark, parser_common_init): Remove reference to primer.