-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChangeLog.3
More file actions
4094 lines (3373 loc) · 154 KB
/
ChangeLog.3
File metadata and controls
4094 lines (3373 loc) · 154 KB
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
2019-05-06 James Youngman <jay@gnu.org>
Fix more compiler warnings.
* src/what.cc: Forward-declare usage().
* src/sccsfile.h: Declare print_flag2() functions.
* src/get.cc (main): Format the (unsigned in) line count with %u
instead of %d.
* src/environment.cc (max_sfile_line_len): Simplify a complex
boolean expression to silence a compiler warning suggesting
parentheses.
* src/writesubst.cc (write_subst): Print the output line number
with %u since it is an unsigned int.
* src/sf-write.cc (write_delta): Remove unsed variables "len" and
"i".
(write): Likewise, also "s".
Fix some compiler warnings. Also turn off warning options which
themselves just generate warnings.
* src/run.cc (run): Avoid mixing signed/unsigned quantities.
* src/sf-get2.cc (get): Avoid variable 'd' shadowing a variable of
the same name in an outer scope.
* src/sccsfile.h: Declare print_flag().
* src/cap.cc (cap_min): Simplify this function; we only use it for
trivially copyable types anyway.
* configure.ac: Disable some warnings known to the manywarnings
module (thus enabled with --enable-warnings) but which aren't
suitable for C++ compilation. We disable them so that we don't
get a warning message from GCC about the inappropriate warning
option.
Use block I/O for encoded streams.
* src/encoding.cc (encode_line): return the number of bytes
output.
(encode_stream): Use the count returned by encode_line to perform
block I/O (with fwrite) instead of string I/O (with fprintf).
Move the implementation details of uuencoding/decoding into a
separate namespace.
* src/encoding.cc (encode): Put into an encoding_impl namespace to
emphasize that it is not intended as a public API for the rest of
the program to use. It's not in an unnamed namespace since the
unit test still needs to use it.
* src/bodyio.h (encoding_impl): Put declarations of encode and
decode into this namespace.
* unit-tests/test_encoding.cc: Use the namespace-qualified names
for encode and decode.
Delete mylist.h.
* src/mylist.h: Delete mylist.h
* src/Makefile.am (noinst_HEADERS): Delete mylist.h
* src/sccsfile.cc: Don't include mylist.h.
* src/l-split.cc: Don't include mylist.h.
(split_comments): use std::vector<T> instead of mylist<T>.
* unit-tests/test_bigfile.cc: use std::vector<T> instead of
mylist<T>. Don't include mylist.h.
* unit-tests/test_delta.cc: Likewise.
* unit-tests/test_mylist.cc: Delete.
* unit-tests/Makefile.am (unit_tests): Remove test_mylist.
Switch class sccs_file from mylist<T> to vector<T>.
* src/sccsfile.h: use std::vector<T> instead of mylist<T>.
* src/sf-val.cc: Likewise.
* src/cdc.cc (main): Likewise.
* src/sf-prt.cc: Likewise.
* src/admin.cc (main): Likewise.
* src/sf-cdc.cc: Likewise.
* src/sf-admin.cc: Likewise.
* src/sf-write.cc: Likewise.
* src/get.cc (print_id_list): Likewise.
* src/sf-get.cc (prepare_seqstate_1): Likewise.
* src/sf-prs.cc (print_seq_list): Likewise.
* src/sf-rmdel.cc (is_seqlist_member): Likewise.
Switch test_delta-table.cc from mylist to vector.
* unit-tests/test_delta-table.cc: Switch data structures from
mylist<T> to std:vector<T> (for which mylist is an alias anyway).
2019-05-05 James Youngman <jay@gnu.org>
Switch class release_list from using mylist<T> to vector<T>.
* src/rel_list.h: Switch data structures from mylist<T> to
std:vector<T> (for which mylist is an alias anyway).
* src/rl-merge.cc (remove): Likewise.
Switch class sccs_file_iterator from using mylist<T> to
vector<T>.
* src/fileiter.h: Switch data structures from mylist<T> to
std:vector<T> (for which mylist is an alias anyway).
Switch class delta from using mylist<T> to vector<T>.
* src/delta.h: Switch data structures from mylist<T> to
std:vector<T> (for which mylist is an alias anyway).
* src/delta.cc (delta_main): Likewise.
* src/sf-delta.cc (add_delta): Likewise.
2019-05-05 Martin Wilck <mwilck@suse.com> (tiny change)
sccs: comply with POSIX POS36-C rule.
POS36-C compliance requires that setgid() is called before
setuid(), and both called after relinquishing extra groups with
setgroups(). See
https://wiki.sei.cmu.edu/confluence/display/c/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges
* configure.ac: check for setgroups()
* src/sccs.c (drop_privs): correct call order: setgroups, setgid,
setuid.
2019-05-05 James Youngman <jay@gnu.org>
Suggest setting CSSC_DISABLE_VALGRIND=1 if system binaries cause
tests to fail.
* README (--disable-valgrind): point out that occasionally, a
system binary will cause Valgrind checking to make tests
fail. Explain how to work around this problem.
Include config.h before other files.
* build-aux/find-out-of-order-includes.sh: Script for identifying
source files which include other headers before "config.h", which
gnulib doesn't like.
* src/version.cc: Include "config.h" before <stdio.h> to avoid
complaints from gnulib.
2016-03-01 James Youngman <jay@gnu.org>
Don't distrubite unit-tests/googletest/Makefile.in.
* unit-tests/Makefile.am (EXTRA_DIST): Don't include
googletest/Makefile.in, since we don't create that file, as
googletest is not in SUBDIRS.
2016-02-28 James Youngman <jay@gnu.org>
Add tests covering p-file validity checks in sact.
* src/pfile.cc (sccs_pfile): Validate the delta SID (instead of
only the gotten SID). When rejecting an invalid date, say
"date/time", since it may in fact be the time field which is
incorrect.
* tests/common/test-common: New options to docommand,
--stderr_regex and stdout_regex, allowing regex (egrep) matching
of tool output. Each has a --no* counterpart which turns the
option off again (this is useful for deteating the defaults
provided by functions which wrap docommand).
* tests/sact/pfile_corruption.sh: New test, covering the p-file
validity checks in sact.
2016-02-24 James Youngman <jay@gnu.org>
Don't use unique_ptr on the result of strdup, and other cleanup.
* src/sccsdate.cc (y2k_window): move all year windowing
calculations into this new function.
(is_leapyear): fix typo in comment.
(get_two_digits): Add specialization which takes a constr
string&.
(sccs_date::sccs_date): Use y2k_window. Also, instead of using
unique_ptr on a pointer returned by strdup, just use a std::string
instance.
* src/sccsdate.h (class sccs_date): Remove the daysecond field.
Fix a number of problems identified by "make syntax-check".
* src/get.cc: Remove trailing blanks.
* src/Makefile.am: Likewise.
* src/l-split.cc: Likewise.
* src/get.cc: Likewise.
* src/prs.cc: Likewise.
* src/run.cc: Likewise.
* src/sccsfile.cc: Likewise.
* src/sccsfile.h: Likewise.
* Makefile.am (distcheck-hook): Remove trailing blank.
* src/sccs.c (gstrncat): Avoid spurious warning about reference to
strncpy() in a comment.
* tests/val/historical.sh: Remove empty lines at EOF.
* unit-tests/test_linebuf.cc: Likewise.
* build-aux/check-googletest-files.sh: Remove empty lines at EOF.
(deleteprefix): Remove trailing blanks.
* NEWS: Change "the the" to "the" in item for CSSC-1.3.2. Remove
trailing blanks.
* src/sccsdate.cc (sccs_date::sccs_date): Avoid the use of strncpy.
* docs/cssc.texi (Admin Options): Don't say "see also @xref".
(Executable File Support): Remove trailing blanks.
* src/sf-prs.cc (prs): Don't use the space-tab combination.
* src/file.cc (get_mode_bits): Remove trailing blanks.
(is_writable): Likewise.
Make mylist a simple synonym for std::vector.
* src/mylist.h: Make mylist a simple synonym for std::vector.
Don't require mylist<T>::operator[] to assert on index errors.
* unit-tests/test_mylist.cc: Remove tests which verify that
mylist<T>::operator[] assert-fails when an index is out of range
(since std::vector does not do this).
Stop depending on mylist not actually being a synonym for std::vector.
* src/sf-prs.cc (print_string_list): Remove the two versions of
this function for std::vector<string> and mylist<string>.
Instead, implement a single template function which takes a range
of iterators. This allows us not to care wither mylist is simply
compatible with std::vector, or actually is std::vector.
(print_delta): Update callers of print_string_list.
Include <algorithm> where it is needed, and not where it is not.
* src/sf-rmdel.cc: include the <algorithm> header since we use
std::find.
* src/mylist.h: Don't include <algorithm>, the transitive
inclusion of which sf-rmsel.cc was previously takign advantage
of.
Replace constructor from const set& with a range of iterators.
* src/mylist.h (mylist::mylist): Add constructor from a range of
input iterators, allowing initialization from any container.
Remove the special-purpose constructor from const set&. This
change provides closer compatibility with std::vector<T>,
* src/delta.h (delta::delat): Initialize included_ and excluded
using the iterator range instead of plain const set&.
2016-02-23 James Youngman <jay@gnu.org>
Remove mylist<T>::operator+=(), implementing insert() instead.
* src/mylist.h (mylist::insert): add insert() method, forwarding
to std::vector<T>::insert(), as a replacement for
mylist::operator+=() (and that method is removed).
(mylist::cbegin): add, forwarding to items_.cbegin().
(mylist::cend): add, forwarding to items_.cend().
* src/delta.h (delta::prepend_comments): Implement.
* src/sf-cdc.cc (sccs_file::cdc): Call mylist::insert() instead of
the removed mylist<T>::operator+=(). Also use
delta::prepend_comments() to prepend comments instead of copying
the old comments, modifying the list and callign set_comments().
* unit-tests/test_mylist.cc (MylistTest::Catenate::TestBody): use
the new insert method to perform the concatenation, instead of the
removed method operator+=.
2016-02-21 James Youngman <jay@gnu.org>
Avoid unnecessary for loop in mylist::operator+=(const mylist&).
* src/mylist.h (mylist): Implement operator+= with a range insert
on the underlying vector.
Remove mylist<T>::operator-=(const mylist<T>&).
* src/mylist.h (mylist): remove mylist<T>::operator-=(const
mylist<T>&).
* unit-tests/test_mylist.cc: Remove tests of
mylist<T>::operator-=(const mylist<T>&).
* src/sccsfile.h (sccs_file::admin): change the type of
erase_users from mylist<string> to
std::unordered_set<std::string>. This allows the implementation
to be more efficient without affecting the ordering of the
resulting user list.
* src/admin.cc (main): Update the type of erase_users
accordingly.
* src/sf-admin.cc (admin): take advantage of the efficiency of
std::unordered_set<T>::find() when computing the updated
authorized user list. Hence we no longer need to call
mylist<T>::operator-=(const mylist<T>&).
Delete mylist<T>::add(), preferring push_back() instead.
* src/mylist.h (mylist): Delete mylist<T>::add() since we prefer
push_back().
* unit-tests/test_mylist.cc: Don't use or test .add(), but use or
test .push_back() there was previously .add().
* unit-tests/test_delta.cc: Don't use mylist<T>::add(), use
mylist<T>::push_back() instead.
* src/rl-merge.cc (merge): Use mylist<T>::push_back() instead of
mylist<T>::add().
* src/delta.h (delta::add_include): Likewise.
(delta::add_exclude): Likewise.
(delta::add_ignore): Likewise.
(delta::add_comment): Likewise.
* src/l-split.cc (split_comments): Likewise.
* src/rel_list.cc (release_list): Likewise.
* src/fileiter.cc (sccs_file_iterator): Likewise.
* src/sccsfile.cc (sccs_file::sccs_file): Likewise.
* src/sf-get2.cc (sccs_file::get): Likewise.
* src/sf-delta.cc (sccs_file::add_delta): Likewise.
* src/sf-admin.cc (sccs_file::admin): Likewise.
(sccs_file::create): Likewise.
* src/sf-cdc.cc (process_mrs): Likewise.
(sccs_file::cdc): Likewise.
* src/admin.cc (main): Likewise.
Remove mylist<T>::select(size_type).
* src/mylist.h (mylist): remove mylist<T>::select().
* unit-tests/test_mylist.cc: remove tests for mylist<T>::select().
Remove mylist<T>::operator=(void*).
* src/mylist.h (mylist): remove mylist<T>::operator=(void*). The
effect of this method was to clear the list, so add a clear()
method instead, for closer matching to std::vector.n
* unit-tests/test_mylist.cc: remove tests for
mylist<T>::operator=(void*).
* src/sf-admin.cc (sccs_file::admin): use clear() to clear an
instance of mylist<T>, not assignment to NULL.
Remove mylist<T>::length().
* src/mylist.h (mylist::length): delete this method (size() should
be used instead).
Avoid using mylist<T>::length().
* src/sf-get2.cc (get): Use a range-based for loop instead of
indexing up to mylist<T>::length().
* src/sf-cdc.cc (cdc): Use mylist<T>::empty() rather than
comparing the result of length() against 0.
* src/sf-get3.cc (authorised): Use a range-based for loop instead
of indexing up to mylist<T>::length().
* src/sf-prs.cc (print_seq_list): Prefer mylist::size() to
mylist::length().
(print_delta): Use mylist<T>::empty() rather than comparing the
result of length() against 0.
* src/fileiter.cc (next): Prefer mylist::size() to
mylist::length().
* src/sf-admin.cc (sccs_file): Likewise.
* src/sf-val.cc (validate_seq_lists): Likewise, factoring repeated
code out into a new function, validate_seq_numbers.
* src/sf-rmdel.cc (is_seqlist_member): use std::find instead of
iterating over list members ourselves.
* src/sf-prt.cc (print_seq_list): use a range-based for loop
rather than iterating over the indexes in a mylist<seq_no>.
(sccs_file): Instead of checking mylist<T>::length() against 0,
use the empty() method.
2016-02-20 James Youngman <jay@gnu.org>
Prefer mylist::size() to mylist::length().
* unit-tests/test_delta.cc: Don't use mylist::length().
* unit-tests/test_bigfile.cc (emit_comments_or_mrs): Don't use
mylist::length().
Prefer mylist::size() to mylist::length().
* unit-tests/test_mylist.cc: Use the size() method instead of the
length() method, for better compatibility with (and so simpler
transition to) std::vector.
Avoid bash-specific [[...]].
* build-aux/check-googletest-files.sh (findproblems): Avoid
[[...]] since that is a Bash feature, and this is a /bin/sh
script.
Add a menu for "admin", correcting a Texinfo build failure.
* docs/cssc.texi: Updated copyright years.
(admin): Added a menu for the sections relating to "admin".
2016-02-09 James Youngman <jay@gnu.org>
* src/sf-prs.cc (print_seq_list): Use a range-based for loop for
iterating over sequence numbers.
* src/sf-val.cc (validate_seq_lists): Factor out the repeated
logic into a local function, validate_seq_numbers.
* src/sf-get2.cc (get): Use a range-based for loop for iterating
over the comments.
2016-02-08 James Youngman <jay@gnu.org>
Don't gratuitously count elements of mylist<T>.
* src/sf-admin.cc (create): Prefer !mylist<T>::empty() over
mylist<T>::length() != 0.
Use range-based for in get.cc.
* src/get.cc (print_id_list): Use a range-based for loop to print
a sid list.
Use range-based for loops in the release_list implementation.
* src/rel_list.cc (member): Search with std::find, rather
than coding it manually.
(print): Use a range-based for loop.
Use mylist<T>::size() in preference to .length().
* src/sf-get.cc (prepare_seqstate_1): Use the size() method of
mylist, instead of length(), for better std::vector
compatibility.
Use range-based for loops in print_seqs and sccs_file::write.
* src/sf-write.cc (print_seqs): Iterate over sequence numbers with
a range-based for loop.
(sccs_file::write): Iterate over users with a range-based for loop.
(sccs_file::write): Iterate over comments with a range-based for
loop.
Support and used range-based for for release_list instances.
* src/rl-merge.cc (merge): Use a range-based for loop to iterate
over release_list instances.
(remove): Likewise.
* src/rel_list.h (release_list): Implement begin() and end() and
empty().
Use a range-based for loop for iterating over deltas.
* src/sf-get.cc (prepare_seqstate_1): Use a range-based for loop
for iterating over included/excluded/ignored deltas.
sccs_delta: Use empty() to find out if a mylist is empty.
* src/delta.h: use mylist<T>.empty() instead of .length() == 0.
Implement mylist<T>::push_back.
* src/mylist.h (mylist): Implement a push_back method and add TODO
comments for methods which aren't shared by std::vector.
State that a C++11 compiler is needed.
* README: Mention the need for a C++11 capable compiler.
* NEWS: Likewise.
Store MRs as std::vector<std::string> (not mylist<std::string>).
* unit-tests/test_bigfile.cc: (emit_comments_or_mrs): Convert to a
template so that we can use it to print a std::vector<std::string>
or a mylist<std::string>.
(emit_delta): Pass MRs as a vector not a mylist.
(make_delta): Likewise.
* unit-tests/test_delta-table.cc: Update to take account of the
change in representation of MR lists from mylist<std::string> to
std::vector<std::string>.
* unit-tests/test_delta.cc: Likewise.
* src/sf-write.cc (write_delta): Change the way we loop over the
MRs and the comments to use a range-based for loop (hence
accomodating the change in type of the MR list.
* src/sf-prt.cc (print_string_list): Convert this function to a
template so that it can be used to print a
std::vector<std::string> or a mylist<std::string>.
* src/sf-prs.cc (print_string_list): Add an override of
print_string_list for printing an instance of const
std::vector<std::string>&.
* src/sf-delta.cc (sccs_file::add_delta): Update the type of the
mrs parameter to std::vector<std::string>.
* src/sf-cdc.cc (process_mrs): Update the parameter list to use
std::vector<std::string> instead of mylist<std::string>. Change
the type of the to_delete parameter to const
std::unordered_set<std::string>& for greater efficiency.
* src/sf-admin.cc (sccs_file::create): Update type of mrs
parameter.
* src/sccsfile.h (sccs_file::check_mrs): Update the type of the
mrs parameter to std::vector<std::string>&.
(sccs_file::admin): update type of the mrs parameter.
(sccs_file::create): Likewise.
(::split_mrs): Likewise.
* src/sf-chkmr.h (check_mrs): Update the type of the mrs
parameter.
* src/run.cc (run): Update to take a vector<const char*> instead
of a mylist<const char*>.
(run_mr_checker): Change the type of the mrs parameter from
mylist<std::string> to std::vector<std::string>.
* src/run.h: Update declarations accordingly.
* src/mylist.h (mylist): Add method size() and empty() for
consistency with std::vector<T> so that we can define template
functions which will act on a mylist or a std::vector.
* src/l-split.cc (split_mrs): represent MRs as
std::vector<std::string>.
* src/delta.h (class delta): Change type of mrs_ member from
mylist<std::string> to std::vector<std::string>.
(delta::delta): change constructor parameters similarly.
(delta::mrs()): now returns std::vector<std::string>.
* src/admin.cc (main): Change type of mr_list from
mylist<std::string> to std::vector<std::string>.
* src/cdc.cc (main): Likewise.
* src/delta.cc (delta_main): Likewise.
(main): Simplify.
2016-02-07 James Youngman <jay@gnu.org>
Use std::string rather than mystring.
We also use range-based for loops to iterate over instances of
mylist<std::string>.
* src/mystring.h: Delete this file.
* src/Makefile.am (noinst_HEADERS): Remove mystring.h.
* src/admin.cc (main): Update to use string rather than mystring.
* src/cdc.cc: Likewise.
* src/canonify.cc (get_current_directory): Update to return string
* src/cssc.h: Likewise.
* src/delta.cc: Likewise.
* src/delta.h: Likewise.
* src/file.cc: Likewise.
* src/file.h: Likewise.
* src/file.h: Update function parameters and return types to be string rather than mystring.
* src/filediff.cc: Likewise.
* src/filediff.h: Likewise.
* src/fileiter.cc: Likewise.
* src/fileiter.h: Likewise.
* src/filelock.h: Likewise.
* src/fnsplit.cc: Likewise.
* src/get.cc: Likewise.
* src/l-split.cc: Likewise.
* src/pfile.h: Likewise.
* src/pf-del.cc: Likewise.
* src/prompt.cc: Likewise.
* src/prs.cc: Likewise.
* src/run.cc: Likewise.
* src/run.h: Likewise.
* src/sccsdate.h (sccs_date::as_string()): Likewise.
* src/sccsfile.cc: Likewise.
* src/sccsfile.h: Likewise.
* src/sccsname.cc: Likewise.
* src/sccsname.h (sccs_name): Likewise (and attributes).
* src/sf-admin.h: Likewise.
* src/sf-cdc.cc: Likewise.
* src/sf-chkmr.h (check_mrs): Likewise.
* src/sf-delta.cc: Likewise.
* src/sf-get.cc (get): Likewise.
* src/sf-get2.cc: Likewise.
* src/sf-get3.cc (authorised): Use string instead of mystring.
* src/sf-prs.cc: Likewise.
* src/sf-prt.cc: Likewise.
* src/sf-val.cc: Likewise.
* src/sf-write.cc: Likewise.
* src/sid.h (class sid): the as_string method now returns a string instead of a mystring.
* src/sid.cc: Use string instead of mystring.
* src/unget.cc: Likewise.
* src/writesubst.cc: Likewise.
* unit-tests/test_delta-table.cc: Likewise.
* unit-tests/test_delta.cc: Likewise.
* unit-tests/test_bigfile.cc: Use std::string instead of
mystring.
* src/mylist.h (mylist): Provide begin() and end() methods.
Delete myset.h, and switch to using std::set instead. Use C++11.
* src/sccsfile.h (substitued_flag_letters): change from
myset<char> to std::set<char>.
* src/sccsfile.cc (set_expanded_keyword_flag): update
implementation now that substitued_flag_letters is std::set<char>.
(print_subsituted_flags_list): Likewise.
* src/sf-write.cc (write): Likewise.
* src/writesubst.cc (expand_keyletter): Likewise.
* src/sf-admin.cc (admin): Likewise.
* src/sf-prt.cc (prt): Likewise.
* src/sf-val.cc (validate): Likewise, using a range-based for
loop.
* bootstrap.conf (gnulib_modules): Add std-gnu11 (to compile
C++11).
* src/mylist.h (mylist): Add constructor from const std::set<TYPE>&.
* unit-tests/Makefile.am (unit_tests): Remove test_myset.
(test_myset_SOURCES): Remove.
* src/Makefile.am (noinst_HEADERS): Remove myset.h.
* myset.h: delete this file.
* unit-tests/test_myselt.cc: delete this file.
* src/delta.h (delta): included and excluded deltas are now
std::set<seq_no> rather than myset<seq_no>.
* unit-tests/test_delta.cc (DeltaTest::Constructor): Update the
call to the constructor of delta, to pass in std::set<seqno> for
the included and excluded deltas.
* src/sf-delta.cc (add_delta): Switch from using myset<seq_no> to
using std::set<seq_no> for the included and excluded deltas.
Remove obsolete code from mylist.h.
* src/mylist.h (mylist): Remove the obsolete implementation of
mylist (which was disabled via the preprocessor anyway).
Mention that gnulib has been updated.
* NEWS: mention this.
2014-09-08 James Youngman <jay@gnu.org>
Always include config.h first; eliminate some compiler warnings.
* auxfiles/firstinclude.sed: New. Script which determines what
the first file #included in a C/C++ source file is.
* auxfiles/Makefile.am (EXTRA_DIST): Distribute firstinclude.sed.
* src/Makefile.am (check-include-order): Check that each source
file includes <config.h> before any other include file.
* src/admin.cc: Inlude <config.h> first. Include system headers
before our own headers.
* src/bodyio.cc: Likewise.
* src/cap.cc: Likewise.
* src/cdc.cc: Likewise.
* src/delta-iterator.cc: Likewise.
* src/delta-table.cc: Likewise.
* src/delta.cc: Likewise.
* src/dtbl-prepend.cc: Likewise.
* src/encoding.cc: Likewise.
* src/environment.cc: Likewise.
* src/fatalsig.cc: Likewise.
* src/fdclosed.cc: Likewise.
* src/fnsplit.cc: Likewise.
* src/l-split.cc: Likewise.
* src/linebuf.cc: Likewise.
* src/get.cc: Likewise.
* src/pf-add.cc: Likewise.
* src/pfile.cc: Likewise.
* src/prompt.cc: Likewise.
* src/prs.cc: Likewise.
* src/prt.cc: Likewise.
* src/quit.cc: Likewise.
* src/rel_list.cc: Likewise.
* src/rmdel.cc: Likewise.
* src/run.cc: Likewise.
* src/sact.cc: Likewise.
* src/sccs-delta.cc: Likewise.
* src/rl-merge.cc: Likewise.
* src/sccsdate.cc: Likewise.
* src/sccsfile.cc: Likewise.
* src/sccsname.cc: Likewise.
* src/seqstate.cc: Likewise.
* src/sf-add.cc: Likewise.
* src/sf-admin.cc: Likewise.
* src/sf-cdc.cc: Likewise.
* src/sf-chkid.cc: Likewise.
* src/sf-delta.cc: Likewise.
* src/sf-get.cc: Likewise.
* src/sf-get2.cc: Likewise.
* src/sf-get3.cc: Likewise.
* src/sf-kw.cc: Likewise.
* src/sf-prs.cc: Likewise.
* src/sf-prt.cc: Likewise.
* src/sf-rmdel.cc: Likewise.
* src/sf-write.cc: Likewise.
* src/sid.cc: Likewise.
* src/sf-val.cc: Likewise.
* src/unget.cc: Likewise.
* src/val.cc: Likewise.
* src/writesubst.cc: Likewise.
* src/file.cc: Likewise. Also move the definition of unprivileged
out of the #if in order to avoid a compiler warning.
* src/file.h: #include "mystring.h" since we use that class in
this header.
* src/filelock.h: Likewise.
2014-07-28 James Youngman <jay@gnu.org>
Support executable history files (=> g-files executable on get).
* src/sf-admin.cc (create): Open any file specified with the -i
command-line option before calling start_update, and using the
open file pointer, call set_sfile_executable if the history file
should be created with execute bits set.
* src/sf-write.cc (start_update): Use sfile_should_be_executable
rather than flags.executable in order to decide whether the
updated history file should be executable.
* NEWS: Mention that the 'x' flag no longer determines the mode of
the updated history file.
* src/sccsfile.h (sfile_executable): new boolean member variable.
If true, the history file, when we create it, should be
executable.
(set_sfile_executable): setter for sfile_executable.
(sfile_should_be_executable): getter for sfile_executable.
(gfile_should_be_executable): new method; when true, the gotten
file should be executable.
* src/sccsfile.cc (sccs_file): Point out that setting the 'x' flag
is not the most portable way to make gotten files executable.
(set_sfile_executable): Implement (sets the sfile_executable
member variable).
(gfile_should_be_executable): Implement (when this method returns
true, the gotten file should be executable).
(sfile_should_be_executable): Implement (when this method returns
true, the (updated) history file should be executable).
(sccs_file): If the history file is executable, remember this so
that the gotten file is created with the relevant execute bits
set.
* src/get.cc (main): The gotten file should be executable if
sccs_file::gfile_should_be_executable() returns true (that is, if
either the 'x' flag is set or the history file is executable).
* src/sf-delta.cc (add_delta): When greating gotten files (for
diffing) use gfile_should_be_executable rather than
flags.executable.
* docs/cssc.texi (Executable File Support): Document the fact that
the execute bits of the history file's mode are now copied to the
gotten file's mode (subject to umask) and in the reverse direction
in the case of admin -i.
(admin): Document the same behaviour.
(Flags): Mention the mode of the history file as an alternative to
setting the 'x' flag.
(SCCS Version Differences): Mention this behaviour (which follows
Solaris) for admin and get.
(Data Keywords): Add missing comma after @xref.
* tests/admin/executable.sh: New test file; verifies that the
execute bits of the file offered via admin -i are copied to the
history file. Verify that setting the 'x' flag cuases the g-file
to be created executable, and that not setting it does not (when
the history file is not executable). Verify that the history file
can still be set as executable when the initial body is presented
on stdin.
* tests/common/test-common (docommand): pass through the exit
status of the child command. Log the return value, stdout and
stderr in command.log.
* src/file.cc (get_mode_bits): New function; Factors stat call out
of is_writable.
(get_open_file_xbits): New function; populate an output flag as
true IFF the FILE* argument is open on a file which has an execute
bit set.
* src/file.h: Declare get_open_file_xbits.
* tests/get/executable.sh: New test file; verify that the
executable bit is copied from the history file to the gotten
file.
Process test files in a consistent order for a case where this matters.
* tests/get/middle-fail.sh (e3): List the history files explicitly
so that we know that SCCS/s.b is definitely the second file of
three processed.
Show the label of the test command in the command.log file.
* tests/common/test-common (docommand): Show the label for the
current command in command.log.
(do_output): Likewise
Update version number.
* configure.ac: Move on from version 1.4.0.
* NEWS: Add a new section for changes in CSSC-1.4.1-rc1.
2014-07-11 James Youngman <jay@gnu.org>
Release CSSC-1.4.0.
* configure.ac (AC_INIT): Update the version number.
* NEWS: Describe the new release.
2014-06-30 James Youngman <jay@gnu.org>
Release CSSC-1.3.2.
* configure.ac: Change version number to 1.3.2.
* NEWS: Update the version number of the first section.
Update googletest unit test framework from r424 to r690.
* gl/lib/.gitignore: Add the files generated by the pthread module
(since we now depend on that).
* bootstrap.conf (bootstrap_epilogue): Upgrade from r424 to r690
of the googletest test framework.
(buildreq): Update tool versions to the ones I'm actually using
now, since these are really the only tools I test with routinely.
(gnulib_modules): Depend on the pthread module. Download
googletest before we run gnulib-tool (instead of in the epilogue),
so that the googletest/m4 directory is available to autoconf.
* configure.ac: Include the googletest m4 library,
unit-tests/googletest/m4. Turn on the Automake option 'tar-ustar'
which switches the dist file format from v7 Unix to the selects
the ustar format defined by POSIX 1003.1-1988. We need to do this
since the distribution now contains path names longer than 99
characters and the v7 format (or its consumers) cannot reliably
deal with this. Also make explicit some of the options which in
any case are implied by the "gnits" option, since we would want to
keep them even if turning off gnits. Add configure tests required
by the googletest framework.
* NEWS: Point out the change of tar file format used for the
distribution file. Also mention the recent updates to googletest
and gnulib.
* unit-tests/Makefile.am: Update the build rules used to build the
googletest unit test framework. Don't build the samples. Build
libgtest by compiling individual source files, instead of only
libgtest-all.cc (this fixes a problem in which "make distcheck"
would otherwise fail due to dependency rule files being left
around. Also, don't compile the sample programs. Remove the
rules for fusing the sources. We don't use them, and the rules
themselves are still available in googletest/Makefile.am.
* Makefile.am (ACLOCAL_AMFLAGS): Include the googletest m4
library.
(distcheck-hook): Call build-aux/check-googletest-files.sh
(this is described below).
* build-aux/check-googletest-files.sh: New script; verifies that
all the files for the "googletest" C++ Unit test framework are
included in the distribution. This script is called from
distcheck-hook.
* .gitignore: Don't ignore build-aux.
2014-06-22 James Youngman <jay@gnu.org>
Update gnulib.
* bootstrap: Update from current gnulib.
* bootstrap.conf: Remove second (and wrong) --tests-base
argument. Don't munge include paths in gl/tests/Makefile.am
(since now, doing that breaks the build and whatever made it
necessary before no longer does).
* src/canonify.cc: Include <config.h> before (gnulib's replacement
of) <unistd.h>.
* src/file.h: Include <sys/types.h> for gid_t.
2013-04-20 James Youngman <jay@gnu.org>
Typo fix.
* COPYING.bsd: Fix typo 'modifiactions'.
2011-11-19 James Youngman <jay@gnu.org>
Fix Savannah bug #33633 (coredump in prs -d:GB:)
* src/sf-prs.cc (sccs_file::get): pass in the correct delta
information for keyword expansion instead of a blank (that is,
invalid) delta. This fixes Savannah bug #33633.
* tests/prs/sv33633.sh: New file, test for this bug.
* tests/prs/s.sv33633.txt: Test input for the new test.
* NEWS: Mention this bug fix.
2011-05-22 James Youngman <jay@gnu.org>
Add unit test for cssc_linebuf.
* unit-tests/Makefile.am (unit_tests): Add test_linebuf.
(test_linebuf_SOURCES): Build test_linebuf.
* unit-tests/test_linebuf.cc: New unit test file.
2011-05-21 James Youngman <jay@gnu.org>
Print clearer test labels.
* tests/common/test-common (docommand): Print the test directory
and the test script as part of the label of each test, for
additional clarity and because many of them are actually not
unique.
* tests/get/sf111140.sh (label_prefix): Print qualified labels (as
for docommand).
Source the command-names script only once per test script.
* tests/common/real-thing: Instead of sourcing the command-names
script unconditionally, just complain if it was not already
sourced.
* tests/common/command-names: Error out if the command-names
script is sourced twice.
* tests/common/config-data: Don't source the command-names script
more than once.
* tests/common/need-prt: Likewise.
* tests/Makefile.am (test-*): Indicate the full path of each test
script.
Set TZ=GMT in the y2k tests.
* tests/year-2000/ext.sh: Set $TZ to GMT in order to make it
possible for implementations which convert SCCS file dates to
time_t values (but which otherwise have no bugs) to pass the
tests.
* tests/year-2000/prs-y2k.sh: Likewise.
Remove spurious space in definition of admin.
* tests/common/command-names (admin): remove spurious space.
Move on from release 1.3.1.
* configure.ac: Update version number to 1.3.2-git, to indicate
that compiled versions of this code are no longer identical to the
1.3.1 release.
* NEWS: Likewise.
2011-05-10 James Youngman <jay@gnu.org>
Release version 1.3.1.
* NEWS: Update version number to 1.3.1.
* configure.ac: Likewise.
Check we distributed all the tests. Remove redundant Makefile.am files.
* auxfiles/check-testfiles.sh: New script (copied from GNU
findutils e66802375963941b3b54a0e038d18eccde449e14 with some
adaptations for CSSC) for checking that we installed all the test
scripts in "make dist".
* tests/Makefile.am (dist-hook): Invoke the
auxfiles/check-testfiles.sh script.
* tests/common/Makefile.am: remove unreferenced file;
tests/Makefile.am does not recurse.
* tests/delta/Makefile.am, tests/prs/Makefile.am: Likewise.
* tests/prt/Makefile.am, tests/sact/Makefile.am: Likewise.
* tests/admin/Makefile.am, tests/unget/Makefile.am: Likewise.
* tests/val/Makefile.am, tests/what/Makefile.am: Likewise.
2011-05-03 James Youngman <jay@gnu.org>
Modify "prs -d :DI:" to print ignored deltas.
* tests/prs/delta_ixg.sh: New test script for "prs -d :DI:".
* tests/prs/s.delta_ixg: New test input file for delta_ixg.sh.
* src/sf-prs.cc (print_delta): For :DI:, also print ignored
deltas. Follow the conventions of OpenSolaris 2009.06 on the
question of how many slashes to produce.
* docs/cssc.texi (Data Keywords): Describe in more detail just how
the keyword :DI: is expanded.
(SCCS Version Differences): Explain how the expansion of :DI:
varies across implementations.
* NEWS: Mention this change.
2011-04-30 James Youngman <jay@gnu.org>
Accept entirely empty comment lines (lacking the initial space).
* src/sccsfile.cc (read_delta): Accept comment lines containing
nothing at all (not even a space after the 'c'). Some historis
versions of SCCS seem to have produced these, and later versions
tolerate it.
Fix Savannah bug bug #33153: "prs" includes "AUTO NULL DELTA"s.
* src/prs.cc (main): Change type of all_deltas from int to bool.
(main): Move detection of errors writing to stdout to here,
instead of sccs_file::prs(). Likewise diagnosis of the fact that
no deltas were matched.
* src/sf-prs.cc (prs): Add an output parameter, "matched", which
is set if any delta was matched (and printed).
(prs): Rewrite this method to evaluate the earlier/later cutoff in
terms of SIDs where this is necessary. That is, avoid the
assumption that different SIDs have different timestamps.
* src/sccsfile.h (sccs_file::prs): Modify the declaration
of sccs_file::prs() to add the output parameter, "matched".
* tests/prs/sv33153.sh: New test.
* tests/prs/s.sv33153: New test input file.
* NEWS: Mention this bugfix.
2011-04-29 James Youngman <jay@gnu.org>
* testutils/mogrify.awk: Preserve comment lines which have no
space (that is, \001Ac\n).
2011-04-26 James Youngman <jay@gnu.org>
Fix some minor issues identified by 'make syntax-check'.
* testutils/uu_decode.c: avoid including unnecessary header
<stddef.h>.
* src/sf-delta.cc (add_delta): Remove doubled word in a comment.
* docs/cssc.texi (Other Variables): Remove doubled word.
(Year 2000 Summary): Likewise.
* cfg.mk: Modify spelling of a comment in order not to have a
false positive from the sc_makefile_at_at_check syntax check.
* tests/year-2000/ext.sh: Remove blank line at the end of the
file.
* tests/year-2000/prs-y2k.sh: Likewise.
* .x-sc_unmarked_diagnostics: Likewise.
* unit-tests/testwrapper.sh.in: Add final newline.
* README-hacking: Remove space-tab combinations.
Update hacking instructions to explain the git submodule.
* README-hacking: Update instructions detailing how to collect
gnulib (since we now use it as a submodule).
Update gnulib.
* gnulib: update to current HEAD.
Various minor fixes suggested by 'make syntax-check'.
* docs/.ispell_english: Remove blank line from end of document.
* src/Makefile.am: Remove blank space from end of line.
* src/file.cc (atomic_nfs_create): Likewise.
* src/sf-prs.cc (prs): Likewise.
* testutils/lndir.c: Likewise.
Change output order in "sccs unedit" to match OpenSolaris.
* tests/bsd-sccs/driver-basic.sh (h1): Modify the ordering of the
expected ouput to match OpenSolaris 2009.06.
* src/sccs.c (command): For the UNEDIT case, flush stdout before
invoking 'get' in order to pass the changed test.
* NEWS: Mention this change.
2011-04-25 James Youngman <jay@gnu.org>
Allow non-CSSC implementations to XFAIL for tricky dates.
* tests/year-2000/prs-y2k.sh: Divide tests into "easy" (which any
y2k-compliant version of SCCS must pass) and "harder" (which
require correct implementation of the windowing scheme and correct
conversion of dates at the limits of a 32-bit time_t). Require
CSSC to pass all tests, but allow other implementations to XFAIL
on the hader tests.
* tests/year-2000/ext.sh: Correct the mechanism by which we figure
out if we are testing CSSC itself.
* tests/common/test-common (fail): return false on XFAIL.
Move source and documentation out of bsd/ into src/ and docs/.
* COPYING.bsd: Move from bsd/COPYING.bsd.
* bsd/sccs.1: move to docs/sccs.1
* bsd/sccs.c: move to src/sccs.c
* tests/common/command-names: Locate the sccs binary in its new
location.
* src/Makefile.am (generic_CPPFLAGS): Put preprocessor flags here
so that AM_CPPFLAGS and AM_CFLAGS can both refer to it, now that
we have both C and C++ sources in this directory.
(LDADD): Link against gnulib.
(AM_CFLAGS): #define PREFIX for the benefit of sccs.c.
(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Exempt the binaries from the
gnits install check which requires them to support --version and
--help.
* AUTHORS: Mention the new location of the COPYING.bsd file.
* THANKS: Point to COPYING.bsd in its new location.
* docs/.ispell_english: Incorporate contents of bsd/.ispell_english.
* docs/Makefile.am: Add sccs.1 and sccs.me.
* bsd/.ispell_english, bad/Makefile.am, bsd/Makefile.bsd: Delete.
* bsd/sccs.me: move to docs/sccs.me
* configure.ac: refer to src/sccs.c instead of bsd/sccs.c
* Makefile.am (SUBDIRS): Remove bsd from SUBDIRS.
* README: sccs no longer lives in bsd/sccs.
Allow an empty MR list to be passed to admin.
* tests/admin/init-mr.sh: Don't expect "admin -m" to interpret
a plain "-m" as meaning an empty MR list. Distinguishing the
absence of an argument to -m requires a traditional SCCS argument
processor, and this behaviour is incompatible with modern
implementations of SCCS (for example OpenSolaris).
* tests/admin/flags.sh: Likewise.
* src/admin.cc (main): Allow an empty list of MRs to be specified
to admin, for example "admin -fv -m' '". OpenSolaris allows
this, and we can no longer use the previous method which was to
omit the optional argument. Elminiate doubled space in error
message.
* docs/cssc.texi (admin): document this clearly.
* NEWS: mention this change.
Fix delta summary; when it goes to stdout, send other to stderr.
* tests/get/delta-summary.sh: OpenSolaris get emits the delta
summary (produced by get -L) to stdout and the SID of the gotten
delta and the number of body lines to stderr. Expect this
behaviour.
* tests/get/delta-summary.sh (L2e): Check that the "new delta"
message also goes to stderr when we are using "get -e -L" (since
the delta summary goes to stdout).
* src/get.cc (print_id_list): New parameter, fp: the file handle
to print the IDs to.
(main): rename use_stdout to send_body_to_stdout (being a more
accurate description).
(main): add variable commentary, the file descriptor on which we
announce which delta we're getting and so forth. This is usually
stdout, but if stdout needs to be used for something else (for
example the delta summary), commentary can be set to stderr.
* src/sf-get2.cc (get): Correct the spacing before the items in
the delta summary. Add a trailing newline.
* NEWS: Mention this change.
Produce better test diagnostics when a command unexpectedly fails.
* tests/common/test-common (docommand): when the return value is
zero, print any error message that had been issued on stderr.
Update sccsdiff to work like sccsdiff on OpenSolaris.
* tests/sccsdiff/rap.sh: Update the tests to match the results we
actually get from sccsdiff on OpenSolaris.
* src/sccsdiff.sh.in: Update to pass the modified tests.
Specifically, use a different header for the case where -p is
specified and when it's not.
* NEWS: Mention this change.