20221212
[devspec.git] / devspec.en_US / project / recutils / ChangeLog
blobd234bae8c35b2c72ae250dc9ac738cc8d15468cd
1 2019-01-03  Jose E. Marchesi  <jose.marchesi@oracle.com>
3         * configure.ac: Bump version to 1.8.
4         * NEWS: Likewise.
6 2018-05-31  Jose E. Marchesi  <jemarch@gnu.org>
8         * doc/recutils.texi (Bash Builtins): Note that some systems
9         require the full path to the bash builtin shared object.
11 2018-03-19  Jose E. Marchesi  <jemarch@gnu.org>
13         * configure.ac: Bump version to 1.7.91.
14         * NEWS: Likewise.
16 2018-03-19  Jose E. Marchesi  <jemarch@gnu.org>
18         * bootstrap.conf (gnulib_modules): Use the signal-h module to
19         guarantee a GNU-like signal.h.
21 2018-03-18  Jose E. Marchesi  <jose.marchesi@oracle.com>
23         * utils/recutl.c (PATH_MAX): handle systems where it is not
24         defined such as GNU/Hurd.
26 2018-03-18  Jose E. Marchesi  <jose.marchesi@oracle.com>
28         * src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Use %g instead
29         of %zd to print the result of aggregate functions.
30         * torture/utils/recsel.sh: Adjust expected result.
32 2018-03-17  Jose E. Marchesi  <jemarch@gnu.org>
34         * bash/readrec.c (readrec_builtin): Immediately return EX_USAGE if
35         no_options returns != 0.  Fixes readrec --help.
37 2018-03-17  Jose E. Marchesi  <jemarch@gnu.org>
39         * utils/recutl.c (recutl_print_version): Update copyright years.
40         * bash/readrec.c: Include config.h.
41         * bash/Makefile.am (COMMON_CPPFLAGS): Include the builddir lib.
42         * src/rec-sex-tab.y: Use new form of %name-prefix.
44 2018-03-17  gettextize  <bug-gnu-gettext@gnu.org>
46         * m4/iconv.m4: Upgrade to gettext-0.19.8.1.
47         * m4/lib-ld.m4: Upgrade to gettext-0.19.8.1.
48         * m4/lib-link.m4: Upgrade to gettext-0.19.8.1.
49         * m4/lib-prefix.m4: Upgrade to gettext-0.19.8.1.
50         * m4/progtest.m4: Upgrade to gettext-0.19.8.1.
51         * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.8.
53 2018-03-17  Jose E. Marchesi  <jemarch@gnu.org>
55         * src/Makefile.am (AM_CPPFLAGS): Include the builddir lib.
56         * configure.ac: Update version to 1.8.
57         * doc/recutils.texi (Bash Builtins): Add missing -f in enable
58         example.
59         * bash/Makefile.am (COMMON_CPPFLAGS): Add BASH_HEADERS/include to
60         the headers search path.
62 2018-02-24  Jose E. Marchesi  <jemarch@gnu.org>
64         * configure.ac: Use the subdir-object automake option in
65         AM_INIT_AUTOMAKE.
67 2018-02-15  Jose E. Marchesi  <jose.marchesi@oracle.com>
69         * utils/recutl.c (recutl_write_db_to_file): Do not use the current
70         directory to hold temporary files.
72 2017-01-31  Jose E. Marchesi  <jose.marchesi@oracle.com>
74         * README-dev: Correct typo.
76 2017-01-26  Jose E. Marchesi  <jose.marchesi@oracle.com>
78         * etc/rec-mode.el: Require tabulated-list.
80 2016-12-19  Jose E. Marchesi  <jemarch@gnu.org>
82         * NEWS: Prepare release 1.8.
84 2016-10-18  Jose E. Marchesi  <jose.marchesi@oracle.com>
86         * etc/rec-mode.el (rec-mode): Fix typo and run the actual
87         rec-mode-hook.
89 2016-10-05  Jose E. Marchesi  <jemarch@gnu.org>
91         * etc/rec-mode.el (rec-remove-continuation-line-marker-overlays):
92         Fix setq typo.
94 2016-09-13  Jose E. Marchesi  <jemarch@gnu.org>
96         * doc/recutils.texi: "Latinajo" fixed.  Reported by Giovanni
97         Ridolfi.
99 2016-06-21  Jose E. Marchesi  <jemarch@gnu.org>
101         * etc/ob-rec.el (org-babel-execute:rec): orb-babel switched to
102         lexical-binding.  Define a result-params locally.
104 2015-11-02  Jose E. Marchesi  <jemarch@gnu.org>
106         * etc/rec-mode.el (rec-field-name-face): New face.
107         (rec-keyword-face): Likewise.
108         (rec-continuation-line-face): Likewise.
109         (rec-font-lock-keywords): Use the rec-* faces.
111 2015-05-05  Jose E. Marchesi  <jemarch@gnu.org>
113         src,torture: numeric results from aggregated functions are signed.
114         * src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Numeric results
115         from aggregated functions are signed.
116         * torture/utils/recsel.sh (negative_fields): New test input file.
117         (recsel-aggregate-sum-negative): New test.
119 2015-04-28  Jose E. Marchesi  <jemarch@gnu.org>
121         * etc/rec-mode.el (rec-cmd-compile): Quote the file name argument
122         before to pass it to recfix in a shell.
124 2015-04-27  Jose E. Marchesi  <jemarch@gnu.org>
126         * README: Copyright years updated.
127         * utils/recutl.h: Likewise.
128         * utils/recutl.c: Likewise.
129         * utils/recset.c: Likewise.
130         * utils/recsel.c: Likewise.
131         * utils/recins.c: Likewise.
132         * utils/recinf.c: Likewise.
133         * utils/recfmt.c: Likewise.
134         * utils/recfix.c: Likewise.
135         * utils/recdel.c: Likewise.
136         * utils/rec2csv.c: Likewise.
137         * utils/mdb2rec.c: Likewise.
138         * utils/Makefile.am: Likewise.
139         * utils/csv2rec.c: Likewise.
140         * torture/utils/testutils.sh: Likewise.
141         * torture/utils/recset.sh: Likewise.
142         * torture/utils/recsel.sh: Likewise.
143         * torture/utils/recins.sh: Likewise.
144         * torture/utils/recinf.sh: Likewise.
145         * torture/utils/recfmt.sh: Likewise.
146         * torture/utils/recfix.sh: Likewise.
147         * torture/utils/recdel.sh: Likewise.
148         * torture/utils/rec2csv.sh: Likewise.
149         * torture/utils/p-recsel.sh: Likewise.
150         * torture/utils/Makefile.am: Likewise.
151         * torture/utils/csv2rec.sh: Likewise.
152         * torture/utils/config.sh.in: Likewise.
153         * torture/runtests.c: Likewise.
154         * torture/rec-writer/tsuite-rec-writer.c: Likewise.
155         * torture/rec-writer/rec-write-rset.c: Likewise.
156         * torture/rec-writer/rec-writer-new.c: Likewise.
157         * torture/rec-writer/rec-write-record.c: Likewise.
158         * torture/rec-writer/rec-writer-destroy.c: Likewise.
159         * torture/rec-writer/rec-write-field-str.c: Likewise.
160         * torture/rec-writer/rec-write-field-name-str.c: Likewise.
161         * torture/rec-writer/rec-write-field-name.c: Likewise.
162         * torture/rec-writer/rec-write-field.c: Likewise.
163         * torture/rec-writer/rec-write-db.c: Likewise.
164         * torture/rec-writer/rec-write-comment-str.c: Likewise.
165         * torture/rec-writer/rec-write-comment.c: Likewise.
166         * torture/rec-type-reg/tsuite-rec-type-reg.c: Likewise.
167         * torture/rec-type-reg/rec-type-reg-new.c: Likewise.
168         * torture/rec-type-reg/rec-type-reg-get.c: Likewise.
169         * torture/rec-type-reg/rec-type-reg-destroy.c: Likewise.
170         * torture/rec-type/tsuite-rec-type.c: Likewise.
171         * torture/rec-type/rec-type-set-name.c: Likewise.
172         * torture/rec-type/rec-type-new.c: Likewise.
173         * torture/rec-type/rec-type-name.c: Likewise.
174         * torture/rec-type/rec-type-kind-str.c: Likewise.
175         * torture/rec-type/rec-type-kind.c: Likewise.
176         * torture/rec-type/rec-type-equal-p.c: Likewise.
177         * torture/rec-type/rec-type-destroy.c: Likewise.
178         * torture/rec-type/rec-type-descr-p.c: Likewise.
179         * torture/rec-type/rec-type-check.c: Likewise.
180         * torture/rec-sex/tsuite-rec-sex.c: Likewise.
181         * torture/rec-sex/rec-sex-new.c: Likewise.
182         * torture/rec-sex/rec-sex-eval.c: Likewise.
183         * torture/rec-sex/rec-sex-destroy.c: Likewise.
184         * torture/rec-sex/rec-sex-compile.c: Likewise.
185         * torture/rec-record/tsuite-rec-record.c: Likewise.
186         * torture/rec-record/rec-record-size.c: Likewise.
187         * torture/rec-record/rec-record-remove-field.c: Likewise.
188         * torture/rec-record/rec-record-new.c: Likewise.
189         * torture/rec-record/rec-record-insert-field.c: Likewise.
190         * torture/rec-record/rec-record-field-p.c: Likewise.
191         * torture/rec-parser/tsuite-rec-parser.c: Likewise.
192         * torture/rec-parser/rec-parse-rset.c: Likewise.
193         * torture/rec-parser/rec-parser-seek-mem.c: Likewise.
194         * torture/rec-parser/rec-parser-reset.c: Likewise.
195         * torture/rec-parser/rec-parser-perror.c: Likewise.
196         * torture/rec-parser/rec-parser-new-str.c: Likewise.
197         * torture/rec-parser/rec-parser-new-mem.c: Likewise.
198         * torture/rec-parser/rec-parser-new.c: Likewise.
199         * torture/rec-parser/rec-parser-error.c: Likewise.
200         * torture/rec-parser/rec-parser-eof.c: Likewise.
201         * torture/rec-parser/rec-parse-record-str.c: Likewise.
202         * torture/rec-parser/rec-parse-record.c: Likewise.
203         * torture/rec-parser/rec-parser-destroy.c: Likewise.
204         * torture/rec-parser/rec-parse-field-name-str.c: Likewise.
205         * torture/rec-parser/rec-parse-field-name.c: Likewise.
206         * torture/rec-parser/rec-parse-field.c: Likewise.
207         * torture/rec-parser/rec-parse-db.c: Likewise.
208         * torture/rec-mset/tsuite-rec-mset.c: Likewise.
209         * torture/rec-mset/rec-mset-type-p.c: Likewise.
210         * torture/rec-mset/rec-mset-register-type.c: Likewise.
211         * torture/rec-mset/rec-mset-new.c: Likewise.
212         * torture/rec-mset/rec-mset-get-at.c: Likewise.
213         * torture/rec-mset/rec-mset-dup.c: Likewise.
214         * torture/rec-mset/rec-mset-count.c: Likewise.
215         * torture/rec-mset/elem-types.h: Likewise.
216         * torture/rec-field-name/tsuite-rec-field-name.c: Likewise.
217         * torture/rec-field-name/rec-field-name-p.c: Likewise.
218         * torture/rec-field-name/rec-field-name-normalise.c: Likewise.
219         * torture/rec-field-name/rec-field-name-equal-p.c: Likewise.
220         * torture/rec-field/tsuite-rec-field.c: Likewise.
221         * torture/rec-field/rec-field-value.c: Likewise.
222         * torture/rec-field/rec-field-to-comment.c: Likewise.
223         * torture/rec-field/rec-field-source.c: Likewise.
224         * torture/rec-field/rec-field-set-value.c: Likewise.
225         * torture/rec-field/rec-field-set-source.c: Likewise.
226         * torture/rec-field/rec-field-set-name.c: Likewise.
227         * torture/rec-field/rec-field-set-location.c: Likewise.
228         * torture/rec-field/rec-field-set-char-location.c: Likewise.
229         * torture/rec-field/rec-field-new.c: Likewise.
230         * torture/rec-field/rec-field-name.c: Likewise.
231         * torture/rec-field/rec-field-location-str.c: Likewise.
232         * torture/rec-field/rec-field-location.c: Likewise.
233         * torture/rec-field/rec-field-equal-p.c: Likewise.
234         * torture/rec-field/rec-field-dup.c: Likewise.
235         * torture/rec-field/rec-field-destroy.c: Likewise.
236         * torture/rec-field/rec-field-char-location-str.c: Likewise.
237         * torture/rec-field/rec-field-char-location.c: Likewise.
238         * torture/rec-fex/tsuite-rec-fex.c: Likewise.
239         * torture/rec-fex/rec-fex-str.c: Likewise.
240         * torture/rec-fex/rec-fex-sort.c: Likewise.
241         * torture/rec-fex/rec-fex-size.c: Likewise.
242         * torture/rec-fex/rec-fex-new.c: Likewise.
243         * torture/rec-fex/rec-fex-get.c: Likewise.
244         * torture/rec-fex/rec-fex-elem-rewrite-to.c: Likewise.
245         * torture/rec-fex/rec-fex-elem-min.c: Likewise.
246         * torture/rec-fex/rec-fex-elem-max.c: Likewise.
247         * torture/rec-fex/rec-fex-elem-field-name.c: Likewise.
248         * torture/rec-fex/rec-fex-destroy.c: Likewise.
249         * torture/rec-fex/rec-fex-check.c: Likewise.
250         * torture/rec-comment/tsuite-rec-comment.c: Likewise.
251         * torture/rec-comment/rec-comment-text.c: Likewise.
252         * torture/rec-comment/rec-comment-set-text.c: Likewise.
253         * torture/rec-comment/rec-comment-new.c: Likewise.
254         * torture/rec-comment/rec-comment-equal-p.c: Likewise.
255         * torture/rec-comment/rec-comment-dup.c: Likewise.
256         * torture/rec-comment/rec-comment-destroy.c: Likewise.
257         * torture/Makefile.am: Likewise.
258         * src/rec-writer.c: Likewise.
259         * src/rec-utils.h: Likewise.
260         * src/rec-utils.c: Likewise.
261         * src/rec-types.c: Likewise.
262         * src/rec-sex-tab.y: Likewise.
263         * src/rec-sex-parser.h: Likewise.
264         * src/rec-sex-parser.c: Likewise.
265         * src/rec-sex-lex.l: Likewise.
266         * src/rec-sex.c: Likewise.
267         * src/rec-sex-ast.h: Likewise.
268         * src/rec-sex-ast.c: Likewise.
269         * src/rec-rset.c: Likewise.
270         * src/rec-record.c: Likewise.
271         * src/rec-int.c: Likewise.
272         * src/rec.h: Likewise.
273         * src/rec-field-name.c: Likewise.
274         * src/rec-field.c: Likewise.
275         * src/rec-fex.c: Likewise.
276         * src/rec-db.c: Likewise.
277         * src/rec-crypt-dummy.c: Likewise.
278         * src/rec-crypt.c: Likewise.
279         * src/rec-comment.c: Likewise.
280         * src/rec.c: Likewise.
281         * src/rec-aggregate.c: Likewise.
282         * src/rec-buf.c: Likewise.
283         * src/Makefile.am: Likewise.
284         * libcsv/libcsv.c: Likewise.
285         * libcsv/Makefile.am: Likewise.
286         * etc/rec-mode.el: Likewise.
287         * etc/ob-rec.el: Likewise.
288         * etc/Makefile.am: Likewise.
289         * doc/recutils.texi: Likewise.
290         * doc/rec-mode.texi: Likewise.
291         * bash/testrec.c: Likewise.
292         * bash/readrec.c: Likewise.
293         * bash/Makefile.am: Likewise.
294         * algol68/rec.a68: Likewise.
295         * algol68/Makefile.am: Likewise.
296         * README-dev: Likewise.
297         * NEWS: Likewise.
298         * Makefile.am: Likewise.
299         * configure.ac: Likewise.
300         * ChangeLog: Likewise.
302 2015-04-27  Jose E. Marchesi  <jose.marchesi@oracle.com>
304         * src/rec-mset.c (rec_mset_dup): Check for the right variable
305         in order to duplicate names.
307 2015-04-27  Jose E. Marchesi  <jemarch@gnu.org>
309         * src/rec-parser.c: Some minor stylish changes.
311 2015-04-09  Jose E. Marchesi  <jemarch@gnu.org>
313         rec-mode: support search-insensitive searches.
314         * doc/rec-mode.texi (Searches): Document prefix arguments in both
315         rec-cmd-selext-fast and rec-cmd-select-sex.
317         * etc/rec-mode.el (rec-cmd-select-fast): Support case-insensitive
318         searches.
319         (rec-cmd-select-sex): Likewise.
321 2014-10-10  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
323         Fix detection of check on systems where it needs extra CFLAGS or
324         libraries.
325         * configure.ac: Use PKG_CHECK_MODULES to detect check.
326         * torture/Makefile.am (runtests_CFLAGS, runtests_LDADD): Pass
327         CFLAGS and LIBS that pkg-config specifies for check.
329 2014-04-20  Jose E. Marchesi  <jemarch@gnu.org>
331         src,torture: fix evaluation of sexes containing #NAME expressions.
332         * torture/utils/recsel.sh (recurrent-fields-2): New input file.
333         (recsel-sex-sharp-multiple-2): New test.
335         * src/rec-sex.c (rec_sex_eval): Do not permute fields appearing as
336         arguments to the # operator in the selection expression.
338         * src/rec-sex-ast.c (rec_sex_ast_hash_name_p_1): New function.
339         (rec_sex_ast_name_p): Likewise.
341 2014-03-27  Jose E. Marchesi  <jemarch@gnu.org>
343         * utils/csv2rec.c (field_cb): Fix printf template slots to avoid
344         warnings when compiled with -Wformat.
345         Patch by Daiki Ueno.
347 2014-03-26  Jose E. Marchesi  <jemarch@gnu.org>
349         * .gitignore: Ignore some more files.
351 2014-03-26  Jose E. Marchesi  <jemarch@gnu.org>
353         torture: fix make -j check.
354         * torture/utils/recins.sh: Fix names of input files so they
355         contain a reference to he test suite.
357         * torture/utils/testutils.sh (test_declare_input_file): prepend
358         the test suite name to the input files in order to prevent
359         collisions with other tests.
360         (test_tool): Likewise.
362 2014-03-24  Jose E. Marchesi  <jemarch@gnu.org>
364         Preparation for 1.7.
365         * configure.ac: Version bumped to 1.7.
366         * FSD (Version): Updated to 1.7.
368 2014-03-22  Jose E. Marchesi  <jose.marchesi@oracle.com>
370         * configure.ac: fix non-portable test construct.
372 2014-03-21  Jose E. Marchesi  <jose.marchesi@oracle.com>
374         rec-mode: fix a call to string-match-p with invalid arguments.
375         * etc/rec-mode.el (rec-check-type): fix a call to string-match-p.
377 2014-03-21  Jose E. Marchesi  <jose.marchesi@oracle.com>
379         rec-mode: several fixes while removing byte-compilation warnings.
380         * etc/rec-mode.el (require): Require cl only at compile time.
381         (rec-record-assoc): Use mapc instead of mapcar.
382         (rec-field-type): Likewise.
383         (rec-record-names): Likewise.
384         (rec-cmd-edit-field): Likewise.
385         (rec-update-buffer-descriptors): Likewise.
386         (rec-goto-type): Likewise.
387         (rec-cmd-statistic): Likewise.
388         (rec-mode): Defvar all buffer-local variables.
389         (rec-cmd-edit-field): Likewise.
390         (rec-cmd-show-info): Make it work when the buffer is not
391         associated with a file on disk.
392         (rec-cmd-compile): Use insert-buffer-substring instead of
393         insert-buffer.
394         (rec-cmd-show-info): Likewise.
395         (rec-update-buffer-descriptors-and-check): Use with-current-buffer
396         instead of save-excursion+set-buffer.
397         (rec-idle-scheduler-mode): Use called-interactively-p instead of
398         interactive-p.
399         (rec-parse-type): Use string-to-number instead of string-to-int.
400         (rec-check-type): Likewise.
401         Rec-idle related functions removed.
403 2014-03-20  Jose E. Marchesi  <jemarch@gnu.org>
405         * utils/recutl.c (recutl_print_version): Update copyright year.
407 2014-03-19  Jose E. Marchesi  <jemarch@gnu.org>
409         * NEWS: Added entry for 1.6.90 listing changes since 1.6.
410         * configure.ac: Version bumped to 1.6.90.
412 2014-03-19  Jose E. Marchesi  <jemarch@gnu.org>
414         manual: clarify how auto fields are generated.
415         * doc/recutils.texi (Counters): mention 'recins' instead of the
416         'conforming application'.
417         (Auto-Generated Fields): Clarify that auto fields are physically
418         inserted in the recfile by recins.
420 2014-03-19  Jose E. Marchesi  <jemarch@gnu.org>
422         src: simplify the implementation of mandatory/unique/prohibit
423         integrity checking.
424         * src/rec-int.c (rec_int_check_record_mandatory): Rewrote to use
425         rec_int_collect_field_list.
426         (rec_int_check_record_unique): Likewise.
427         (rec_int_check_record_prohibit): Likewise.
429 2014-03-18  Jose E. Marchesi  <jemarch@gnu.org>
431         src,torture,doc: support for the %allowed special field.
432         * doc/recutils.texi (Record Sets Properties): Link to the new
433         section Allowed Fields.
434         (Allowed Fields): New section.
436         * torture/utils/recfix.sh (allowed-ok-1): New input file.
437         (allowed-ok-2): Likewise.
438         (allowed-ok-3): Likewise.
439         (allowed-ok-4): Likewise.
440         (allowed-ok-5): Likewise.
441         (allowed-xfail-1): Likewise.
442         (allowed-xfail-2): Likewise.
443         (allowed-xfail-3): Likewise.
444         (recfix-allowed-ok-1): New test.
445         (recfix-allowed-ok-2): Likewise.
446         (recfix-allowed-ok-3): Likewise.
447         (recfix-allowed-ok-4): Likewise.
448         (recfix-allowed-ok-5): Likewise.
449         (recfix-allowed-xfail-1): Likewise.
450         (recfix-allowed-xfail-2): Likewise.
451         (recfix-allowed-xfail-3): Likewise.
453         * src/rec-int.c (rec_int_check_record_allowed): New function.
454         (rec_int_collect_field_list): Likewise.
455         (rec_int_check_descriptor): Support %allowed.
456         (rec_int_check_record): Call rec_int_check_record_allowed.
458         * src/rec-field-name.c (fnames): added entry for %allowed.
460 2014-03-18  Jose E. Marchesi  <jemarch@gnu.org>
462         src,doc: allow merging anonymous records coming from several files
463         in a single record set.
464         * doc/recutils.texi (Simple Selections): Document that anonymous
465         records from several files will be merged.
467         * src/rec.h: Prototype and doc for rec_mset_elem_dup_data.
468         * src/rec-mset.c (rec_mset_elem_dup_data): New function.
469         (rec_mset_iterator_next): Update data only if it is not NULL.
471         * utils/recutl.c (recutl_parse_db_from_file): do not complain
472         about duplicated default record sets.
473         (recutl_parse_db_from_file): append anonymous records to the
474         anonymous rset of the database if it exists.
476 2014-03-17  Jose E. Marchesi  <jemarch@gnu.org>
478         * doc/recutils.texi (Simple Selections): Improve the readability
479         of side-to-side example sections.
481 2014-03-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
483         rec-mode: fix selection commands when there are more than one
484         record sets on the recfile.
485         * etc/rec-mode.el (rec-cmd-select-fast): Use the current record
486         set.
487         (rec-cmd-select-sex): Likewise.
489 2014-03-02  Jose E. Marchesi  <jemarch@gnu.org>
491         src: do not abort with an error when decrypting partially
492         encrypted records.
493         * src/rec-crypt.c (rec_decrypt_record): Stop decrypting fields in
494         case of an error.
495         (rec_encrypt_field): Return true in case a field is not encrypted.
497 2014-02-25  Jose E. Marchesi  <jemarch@gnu.org>
499         * doc/recutils.texi: all @w and @kbd macros used to denote command
500         line options removed.
502 2014-02-24  Jose E. Marchesi  <jemarch@gnu.org>
504         src: an ignored tab can also separate field names from field
505         values.
506         * src/rec-parser.c (rec_parse_field_name): tabs also finish field
507         names.
509         * torture/utils/recsel.sh (ignored-first-blanks): New input file.
510         (recsel-ignored-first-blanks): New test.
512 2014-02-24  Jose E. Marchesi  <jemarch@gnu.org>
514         * doc/recutils.texi: Many English changes in the manual.  Patch by
515         Karl Berry.
516         (Selecting by Type): use LastRelease instead of URL in the
517         gnu.rec example.
519 2014-02-24  Jose E. Marchesi  <jemarch@gnu.org>
521         * src/Makefile.am (librec_la_LDFLAGS): Bump current version to 1.
523 2014-02-19  Jose E. Marchesi  <jemarch@gnu.org>
525         bash: fix librec linking issue.
526         * bash/Makefile.am (readrec_la_LIBADD): Link with the built librec.
527         (testrec_la_LIBADD): Likewise.
529 2014-02-19  Jose E. Marchesi  <jemarch@gnu.org>
531         src,utils,manual,torture: new writer option to omit comments when
532         outputting rsets and comments.  recsel now uses this option to
533         avoid emitting record fields.
535         * torture/rec-writer/rec-write-record.c
536         (rec_write_record_skip_comments): New test.
538         * src/rec-writer.c (rec_write_record): Do not write out comments
539         in records if the writer was configured to skip them.
540         (rec_write_rset): Likewise.
542         * utils/recsel.c (recsel_process_data): Configure the writer to
543         skip comments.
545         * torture/utils/recsel.sh (record-with-comments): New input file.
546         (recsel-record-with-comments): New test.
548         * torture/rec-writer/rec-write-comment.c (rec_write_comment_sexp):
549         Adapted to new writer api.
550         (rec_write_comment_nominal): Likewise.
551         * torture/rec-writer/rec-write-record.c
552         (rec_write_record_nominal): Likewise.
553         (rec_write_record_sexp): Likewise.
554         (rec_write_record_values): Likewise.
555         (rec_write_record_values_row): Likewise.
556         * torture/rec-writer/rec-write-field-name.c
557         (rec_write_field_name_nominal): Likewise.
558         (rec_write_field_name_sexp): Likewise.
559         * torture/rec-writer/rec-write-field.c (rec_write_field_nominal):
560         Likewise.
561         (rec_write_field_values): Likewise.
562         (rec_write_field_values_row): Likewise.
563         (rec_write_field_sexp): Likewise.
564         * torture/rec-writer/rec-write-rset.c (rec_write_rset_nominal):
565         Likewise.
567         * utils/recinf.c (print_info_file): Use the new interface for
568         setting a writer's mode.
569         * bash/readrec.c (readrec_builtin): Likewise.
570         * utils/recsel.c (recsel_process_data): Likewise.
572         * src/rec-writer.c (rec_writer_set_skip_comments): New function.
573         (rec_writer_set_mode): Likewise.
574         (rec_writer_new_common): Set default values for the
575         skip_comments_p and mode writer options.
576         (rec_write_comment): Use the writer mode attribute instead of an
577         extra argument to determine how to output the entity.
578         (rec_write_field): Likewise.
579         (rec_write_field_name): Likewise.
580         (rec_write_record): Likewise.
581         (rec_write_rset): Likewise.
582         (rec_write_field_str): Likewise.
583         (rec_write_field_name_str): Likewise.
584         (rec_write_comment_str): Likewise.
586         * src/rec.h: Copyright year updated.
587         Prototypes for rec_writer_set_skip_comments and
588         rec_writer_set_mode added.
590         * src/rec-writer.c (struct rec_writer_s): New fields
591         skip_comments_p and mode.
593 2014-02-18  Jose E. Marchesi  <jemarch@gnu.org>
595         manual: clarify decryption using several passwords.
596         * doc/recutils.texi (Confidential Fields): Added a note clarifying
597         that it is not possible to specify several passwords in a single
598         invocation of recsel.
600 2014-02-17  Jose E. Marchesi  <jemarch@gnu.org>
602         manual: follow the standard way in naming the utility invokation
603         nodes.
604         * doc/recutils.texi (Invoking recinf): Renamed from node recinf.
605         (Invoking recsel): Likewise.
606         (Invoking recins): Likewise.
607         (Invoking recdel): Likewise.
608         (Invoking recset): Likewise.
609         (Invoking recfix): Likewise.
610         (Invoking recfmt): Likewise.
611         (Invoking csv2rec): Likewise.
612         (Invoking rec2csv): Likewise.
613         (Invoking mdb2rec): Likewise.
614         "Fast" access links in the "Individual utilities" dircategory
615         fixed to point to the nodes renamed above.
616         (Documenting Records): Xref fixed.
617         (Sorted Output): Likewise.
618         (Deleting Records): Likewise.
619         (Editing Fields): Likewise.
620         (CSV Files): Likewise.
622 2014-02-17  Jose E. Marchesi  <jemarch@gnu.org>
624         * doc/recutils.texi (Scalar Field Types): Improve misleading
625         example.
626         * doc/recutils.texi (SEX Operands): Improve wording.
628 2014-02-17  Jose E. Marchesi  <jemarch@gnu.org>
630         * src/rec-types.c (rec_type_parse_enum): Code typo fixed.
631         Reported by David Binderman.
633 2014-02-05  Jose E. Marchesi  <jemarch@gnu.org>
635         utils: avoid segfaults in several utilities when reading invalid
636         rec data.
637         * utils/rec2csv.c (main): Avoid a segmentation fault when a file
638         containing invalid data is fetched to rec2csv.
639         * utils/recfmt.c (main): Likewise for recfmt.
641 2014-01-02  Jose E. Marchesi  <jemarch@gnu.org>
643         doc: document the -d|--delim command line argument for rec2csv.
644         * doc/recutils.texi (rec2csv): Document -d|--delim.
646 2014-01-02  Jose E. Marchesi  <jemarch@gnu.org>
648         utils: add support for arbitrary delimiter characters in rec2csv.
649         Patch provided by Sebastian Fischmeister.
650         * utils/rec2csv.c: New global variable rec2csv_delim.
651         (recutl_print_help): Documentation of -d.
652         (rec2csv_parse_args): Process the new -d|--delim command line
653         argument.
654         (rec2csv_generate_csv): Likewise.
656 2014-01-02  Jose E. Marchesi  <jemarch@gnu.org>
658         Do not maintain local copies of .po files which are available in
659         the translation project.
660         * po/fr.po: file removed.
661         * po/sr.po: Likewise.
662         * po/uk.po: Likewise.
663         * po/vi.po: Likewise.
665 2012-12-04  Julio C. M. Ramirez <rikijpn@member.fsf.org>
667         * etc/rec-mode.el: adding numeric prefix to next/previous
668         records commands for recmode on emacs.
669         * doc/rec-mode.texi: adding mention for feature above.
671 2013-11-04  Jose E. Marchesi  <jemarch@gnu.org>
673         * .gitignore: Updated with the files generated when building the
674         rec-mode manual.
676 2013-11-03  Jose E. Marchesi  <jemarch@gnu.org>
678         Preparation for 1.6.
679         * configure.ac: Version number bumped to 1.6.
680         * NEWS: Updated for 1.6.
682 2013-11-01  Jose E. Marchesi  <jemarch@gnu.org>
684         src,doc,torture: support single-char fields in selection
685         expressions.
686         * torture/utils/recsel.sh (single-char-field-names): New input
687         file.
688         (recsel-sex-single-char-field-names): New test.
690         * doc/recutils.texi (Fields): Update regexp denoting field names
691         to allow fields composed by just one character.
693         * src/rec-sex-lex.l: Allow fields composed by just one character
694         in selection expressions.
696 2013-10-29  Jose E. Marchesi  <jose.marchesi@oracle.com>
698         * NEWS: Updated for 1.5.90.
700         * bash/readrec.c: Do not check for HAVE_UNISTD_H.  It is always
701         true with the corresponding gnulib module.
702         * bash/testrec.c: Likewise.
704         * configure.ac: Version number bumped to 1.5.90.
706 2013-10-29  Jose E. Marchesi  <jose.marchesi@oracle.com>
708         * doc/recutils.texi (Auto-Generated Fields): Finished.
709         (Counters): Written.
710         (Unique Identifiers): Likewise.
711         (Time-Stamps): Likewise.
713 2013-10-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
715         manual: document grouping and aggregate functions.
716         * doc/recutils.texi (Grouping Records): New section.
717         (Aggregate Functions): Likewise.
719 2013-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
721         recfmt: do not append a newline to the expansion of templates.
722         Reported by Aikido Guy.
723         * torture/utils/recfmt.sh: Adjust tests to not expect a newline
724         inserted between applications of a template.
726         * utils/recfmt.c (recfmt_process_db): Do not append a newline to
727         the expansion of a template.
729 2013-08-29  Jose E. Marchesi  <jemarch@gnu.org>
731         * etc/rec-mode.el (rec-fast-selection): Avoid an extra useless
732         window when using rec-fast-selection.
734 2013-08-25  Jose E. Marchesi  <jemarch@gnu.org>
736         utils: avoid the replication of out-of-memory string literals.
737         * utils/csv2rec.c (field_cb): Use recutl_out_of_memory.
738         (record_cb): Likewise.
739         (record_cb): Likewise.
740         * utils/recsel.c (recsel_process_data): Likewise.
741         * utils/recins.c (recins_add_new_record): Likewise.
742         (recins_add_new_record): Likewise.
743         * utils/recfix.c (recfix_do_sort): Likewise.
744         (recfix_do_auto): Likewise.
745         * utils/recdel.c (recdel_delete_records): Likewise.
746         * utils/rec2csv.c (rec2csv_generate_csv): Likewise.
747         (rec2csv_generate_csv): Likewise.
748         (rec2csv_process_data): Likewise.
749         * utils/mdb2rec.c (process_table): Likewise.
750         (process_mdb): Likewise.
752         * utils/recutl.c (recutl_out_of_memory): New function.
754 2013-08-25  Jose E. Marchesi  <jemarch@gnu.org>
756         manual: documentation for the readrec bash built-in.
757         * doc/recutils.texi (Bash Builtins): Written.
758         (readrec): Written.
760 2013-08-25  Jose E. Marchesi  <jemarch@gnu.org>
762         src: remove hard limit on the number of types registered in a
763         types registry.
764         * src/rec-types.c (REC_TYPE_REG_ALLOC_TYPES): New constant.
765         (rec_type_reg_destroy): Free the dynamically allocated list of
766         types.
767         (rec_type_reg_new): Initialize new->types to NULL.
768         (rec_type_reg_add): Adjusted to new semantics.
769         (rec_type_reg_add_synonym): Likewise.
771 2013-08-25  Jose E. Marchesi  <jemarch@gnu.org>
773         src: remove hard limit on the number of literals in enum types.
774         * src/rec-types.c (REC_ENUM_NAMES): Removed.
775         (REC_ENUM_ALLOC_NAMES): Created.
776         (rec_type_new): Initialize the size of the type to 0.
777         (rec_type_parse_enum): Allocate memory for the enumeration names
778         in chunks.
779         (rec_type_equal_p): Adjusted to new semantics.
780         (rec_type_check_enum): Likewise.
782 2013-08-25  Jose E. Marchesi  <jemarch@gnu.org>
784         csv2rec: remove hard limit on the number of fields in the input
785         csv file.
786         * utils/csv2rec.c (MAX_FIELDS): Removed.
787         (process_csv): Initialize ctx.field_names to NULL.
788         (field_cb): Re-allocate memory for fields when needed, in blocks
789         with size ALLOC_FIELDS.
791 2013-08-25  Jose E. Marchesi  <jemarch@gnu.org>
793         * bash/readrec.c (readrec_builtin): Define variables after fields
794         in the read records.
796 2013-08-24  Jose E. Marchesi  <jemarch@gnu.org>
798         * bash/Makefile.am (testrec_la_LDFLAGS): Define.
799         (testrec_la_LIBADD): Likewise.
800         (testrec_la_SOURCES): Likewise.
802         * bash/testrec.c: New file.
803         (testrec_builtin): New function.
805 2013-08-24  Jose E. Marchesi  <jemarch@gnu.org>
807         manual: empty stub sections for the bash bulitins.
808         * doc/recutils.texi (Bash Builtins): New stub chapter.
809         (readrec): Likewise.
810         (testrec): Likewise.
812 2013-08-24  Jose E. Marchesi  <jemarch@gnu.org>
814         bash: readrec builtin.
815         * Makefile.am (SUBDIRS): Recurse to the bash/ subdirectory.
817         * configure.ac: Handle --enable-bash-builtins and detection of
818         bash headers.
819         Handle --with-bash-headers.
821         * bash/Makefile.am: New file.
823         * bash/readrec.c: New file.
824         (readrec_builtin): New function.
826 2013-08-21  Jose E. Marchesi  <jemarch@gnu.org>
828         * doc/recutils.texi (Replacing Records With recins): New section.
830 2013-08-16  Jose E. Marchesi  <jemarch@gnu.org>
832         src: optimize the sex evaluator.
833         * src/rec-sex.c (rec_sex_eval): Optimize the evaluator, avoiding
834         discarding the same field twice.
836 2013-08-16  Jose E. Marchesi  <jemarch@gnu.org>
838         src: support for field marks in records.
839         * src/rec-record.c (rec_record_reset_marks): New function.
840         (rec_record_mark_field): Likewise.
841         (rec_record_field_mark): Likewise.
843         * src/rec-field.c (struct rec_field_s): New attribute 'mark' for
844         fields.
845         (rec_field_dup): Field mark.
846         (rec_field_set_mark): New function.
847         (rec_field_mark): Likewise.
849         * src/rec.h: Prototypes for the new field marks related functions.
851 2013-08-15  Giuseppe Scrivano  <gscrivan@redhat.com>
853         * src/rec-aggregate.c (rec_aggregate_std_count): Fix formatting string.
854         (rec_aggregate_std_avg): Likewise.
855         (REC_AGGREGATE_ACCUM_FUNC): Likewise.
856         * src/rec-fex.c (rec_fex_parse_str_simple): Wrap assignment in if
857         statement in parentheses.
858         * src/rec-sex-lex.l (top): Specify options header-file, noinput and
859         nounput.
860         (rec_sex_lex_extract_subname): Remove unused variable `res'.
861         * src/rec-sex-tab.y: Include "rec-sex-lex.h".
862         * src/rec-sex-ast.c (rec_sex_ast_print_node): Use name[0] to access the
863         name.
864         * src/rec-sex-parser.c: Include "rec-sex-lex.h" and "rec-sex-tab.h".
865         * src/rec-sex-lex.l: Generate the header file "rec-sex-lex.h".
866         * src/rec-int.c (rec_int_check_field_type): Removed unused variable
867         `field_name'.
868         * src/rec-db.c (rec_db_query): Removed unused variable `selected'.
869         (rec_db_query): Removed unused variable `n_rset'.
870         Remove declaration for the static function `rec_db_set_act_setadd'.
871         * src/rec-rset.c (rec_rset_record_compare_fn): Removed unused variables
872         `field1' and `field2'.
873         (rec_rset_update_field_props): Removed unused variable `type_name'.
874         * src/rec-mset.c (rec_mset_elem_init): Remove unused function.
876 2013-08-08  Jose E. Marchesi  <jemarch@gnu.org>
878         src: optimize the evaluation of sex expressions, avoiding
879         permutations on fields not appearing in the expression.
880         * src/rec-sex-ast.c (rec_sex_ast_name_p_1): New function.
881         (rec_sex_ast_name_p): Likewise.
883         * src/rec-sex.c (rec_sex_eval): Do not permute on fields not
884         featured on the selection expression.
886 2013-08-08  Jose E. Marchesi  <jemarch@gnu.org>
888         src,torture,doc: support the usage of MIN and MAX keywords in
889         range types.
890         * doc/recutils.texi (Scalar Field Types): Document the MIN and MAX
891         keywords in range specifications.
893         * torture/utils/recfix.sh (range_min_ok): New test.
894         (range_min_invalid): Likewise.
895         (range_max_ok): Likewise.
896         (range_max_invalid): Likewise.
897         (range_minmax_ok): Likewise.
898         (range_minmax_invalid): Likewise.
900         * src/rec-types.c (rec_type_parse_range): Support MIN and MAX
901         keywords in range definitions.
902         (rec_type_parse_range_point): New function.
903         Include limits.h.
905         * src/rec-utils.c (rec_parse_int): update 'ret' only if hte
906         parsing was successful.
907         (rec_parse_regexp): Likewise.
909         * src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Allow MIN and MAX
910         literals as well as numeric literals.
911         (REC_TYPE_RANGE_MINMAX_RE): New constant.
912         (REC_TYPE_DESCR_RE): Duplicate check for REC_TYPE_RANGE_DESCR_RE
913         removed.
915 2013-08-08  Jose E. Marchesi  <jemarch@gnu.org>
917         * doc/recutils.texi (Inserting Records): basic operation of recins
918         documented.
920 2013-08-08  Jose E. Marchesi  <jemarch@gnu.org>
922         * utils/recins.c (recutl_print_help): typo fixed in help string:
923         -R must be -r.
925 2013-08-08  Jose E. Marchesi  <jemarch@gnu.org>
927         maint: syntax-check fixes.
928         * etc/rec-mode.el (rec-summary-rec-buffer): Trailing blanks
929         removed from line.
930         * AUTHORS (John Darrington): Likewise.
932         * .gitignore: Newline added at EOF to keep syntax-check happy.
934         * etc/rec-mode.el (rec-mode): Typo in comment fixed.
936 2013-07-29  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
938         src: fix memory leak.
939         * src/rec-rset.c (struct rec_rset_fprops_s): Remove const from
940         fname, since it can be dynamically allocated.
941         (rec_rset_destroy): Free fname.
942         (rec_rset_update_field_props): Destroy the temporary fex.
944 2013-06-23  Jose E. Marchesi  <jemarch@gnu.org>
946         src,doc,torture: fix the insertion of anonymous records in dbs.
947         * doc/recutils.texi (Inserting Anonymous Records): New section.
949         * torture/utils/recins.sh (marks): New input file.
951         * src/rec-db.c (rec_db_get_rset): The position cant be zero
952         since size_t is unsigned so don't check for it.
953         (rec_db_insert_rset): Likewise.
954         (rec_db_remove_rset): Likewise.
955         (rec_db_insert): Fix the index of the default rset.
957 2013-06-23  Jose E. Marchesi  <jemarch@gnu.org>
959         src,doc,elisp: remove support for hyphens in field names.
960         * torture/utils/recfix.sh (recfix-hyphens-in-field-names): new
961         test.
963         * src/rec.h (REC_FNAME_RE): Don't allow hyphens in field names.
964         * src/rec-parser.c (rec_parse_field_name): Likewise.
965         * doc/recutils.texi (Fields): Likewise.
966         (Declaring Types): Likewise.
967         * etc/rec-mode.el (rec-field-name-re): Likewise.
968         (rec-font-lock-keywords): Likewise.
969         (rec-parse-type): Likewise.
970         (rec-check-type): Likewise.
971         (rec-field-type): Likewise.
973 2013-05-22  Jose E. Marchesi  <jemarch@gnu.org>
975         utils: interactively ask for a password twice to avoid loosing
976         data because of typing errors.
977         * utils/recins.c (recins_add_new_record): Use recutl_getpass.
978         * utils/recsel.c (recsel_process_data): Likewise.
979         * utils/recfix.c (recfix_parse_args): Likewise.
981         * utils/recutl.c (recutl_getpass): New function.
983 2013-05-22  Jose E. Marchesi  <jose.marchesi@oracle.com>
985         * etc/ob-rec.el (org-babel-execute:rec): Add support for GroupBy.
986         (org-babel-execute:rec): Add support for joins.
988 2013-05-09  Jose E. Marchesi  <jemarch@gnu.org>
990         * doc/recutils.texi (Sorted Output): Renamed from Sorting.
991         (Sorting Records): New section.
992         (Editing Records): Intro written.
994 2013-03-14  Jose E. Marchesi  <jemarch@gnu.org>
996         doc: minor improvements in the manual.
997         * doc/recutils.texi: Add John as an author.
998         (Selecting by Type): Document the -d command line option to
999         recsel.
1001 2013-02-12  Jose E. Marchesi  <jemarch@gnu.org>
1003         manual: get recutils.texi compiling again.
1004         * doc/recutils.texi (Joining Records): Empty section created.
1005         (Foreign Keys): Likewise.
1006         (Top): Entry in menu fixed to avoid an invalid reference.
1008 2013-02-11  Jose E. Marchesi  <jemarch@gnu.org>
1010         manual: Field Restrictions introduction written.
1011         * doc/recutils.texi (Field Restrictions): Introduction to the
1012         chapter written.
1014 2013-02-10  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
1016         * configure.ac: Use AC_CONFIG_HEADERS, LT_INIT and AC_CONFIG_FILES
1017         instead of deprecated AM_CONFIG_HEADER, AC_PROG_LIBTOOL and
1018         argument of AC_OUTPUT.
1020 2013-02-10  Jose E. Marchesi  <jemarch@gnu.org>
1022         * doc/rec-mode.texi: Copyright updated.
1024         * doc/recutils.texi (Random Records): Clarify how the internal
1025         algorihtm works.
1026         Copyright updated.
1028 2013-02-10  Jose E. Marchesi  <jemarch@gnu.org>
1030         * src/rec-db.c (rec_db_process_fex): Avoid a segmentation fault
1031         when the function is called with a NULL record.
1033 2013-02-10  Jose E. Marchesi  <jemarch@gnu.org>
1035         manual: record sets and simple selection techniques documented.
1036         * doc/recutils.texi (Record Sets): New subsection.
1037         (Naming Record Types): Likewise.
1038         (The Special Fields): Likewise.
1039         (Selecting by Position): Written.
1040         (Random Records): Likewise.
1042 2013-02-04  Jose E. Marchesi  <jemarch@gnu.org>
1044         * etc/rec-mode.el (rec-summary-populate): Use the first header as
1045         the sorting criteria.
1046         (rec-cmd-show-summary): Store the record position as the ID of the
1047         tabular row.
1048         (rec-summary-rec-buffer): New variable.
1049         (rec-cmd-show-summary): Set the buffer local variable
1050         rec-summary-rec-buffer the proper value.
1052 2013-02-03  Jose E. Marchesi  <jemarch@gnu.org>
1054         * etc/rec-mode.el (rec-keyword-summary): New constant.
1055         (rec-summary-fields): New function.
1056         (rec-join-string): Likewise.
1058         * src/rec-db.c (rec_db_process_fex): Don't loose the location
1059         information in records processed by fexes.
1061 2013-02-02  Jose E. Marchesi  <jemarch@gnu.org>
1063         * etc/rec-mode.el (rec-summary-mode): New function.
1064         (rec-summary-mode-map): New variable.
1065         (rec-mode-map): Map 'h' to rec-cmd-show-summary.
1066         (rec-mode-edit-map): Map 'C-ch' to rec-cmd-show-summary.
1067         (rec-cmd-show-summary): New function.
1068         (rec-summary-populate): Likewise.
1069         (rec-query): Use --print-sexps even if a fex was specified.
1071 2013-02-02  Jose E. Marchesi  <jemarch@gnu.org>
1074         writer: quote special characters when printing lisp strings.
1075         * torture/utils/recsel.sh (unquoted-lisp-strings): New input file.
1076         (recsel-unquoted-lisp-strings): New test.
1078         * src/rec-writer.c (rec_write_field): Escape double quotes and
1079         backslashes when writing the field values in lisp strings.
1081 2013-02-02  Jose E. Marchesi  <jemarch@gnu.org>
1083         * doc/recutils.texi (Checking Recfiles for Errors): format typo
1084         fixed.
1086 2013-02-02  Jose E. Marchesi  <jemarch@gnu.org>
1088         src: allow duplicated fields in grouped record sets.
1089         * src/rec-rset.c (rec_rset_merge_records): Don't remove duplicated
1090         fields when grouping record sets.
1092 2013-01-30  Jose E. Marchesi  <jemarch@gnu.org>
1094         * README-dev: Mention bootstrap instead of autogen.sh.
1096         * src/Makefile.am (librec_la_LIBADD): Rename libgnu.la to
1097         librecutils.la.
1098         * utils/Makefile.am (COMMONLIBS): Likewise.
1100         * configure.ac: Invoke gl_EARLY after AC_PROG_CC.
1102 2013-01-30  Jose E. Marchesi  <jemarch@gnu.org>
1104         static gnulib removed.
1105         * bootstrap: Imported.
1106         * bootstrap.conf: New file.
1107         Many files deleted.
1109 2013-01-20  Jose E. Marchesi  <jemarch@gnu.org>
1111         manual: new sections on configuring rec-mode.
1112         * doc/rec-mode.texi (Records appearance): Section completed.
1113         (Finding the recutils): New section.
1114         (Top): Detailed menu updated.
1116 2013-01-07  Jose E. Marchesi  <jemarch@gnu.org>
1118         rec-mode: be smart assigning letters to enumerated entries.
1119         * etc/rec-mode.el (rec-cmd-edit-field): Assign letters to
1120         enumerated entries in a "smart" way.
1122 2013-01-07  Jose E. Marchesi  <jemarch@gnu.org>
1124         * etc/rec-mode.el: Copyright years updated.
1126 2013-01-04  Jose E. Marchesi  <jemarch@gnu.org>
1128         * etc/rec-mode.el (rec-mode-version): New constant.
1130 2012-12-26  Jose E. Marchesi  <jemarch@gnu.org>
1132         src,torture: simplify the creation of the descriptor of joined
1133         record sets.
1134         * torture/utils/recsel.sh (recsel-join-descriptor): New test.
1136         * src/rec-db.c (rec_db_join): The descriptor of joined records
1137         only features a %rec: entry.
1139 2012-12-26  Jose E. Marchesi  <jemarch@gnu.org>
1141         src: fix the parser in order to accept lines with blanks just
1142         after records.
1143         * torture/utils/recfix.sh (blank-line-after-record): New input
1144         file.
1145         (blank-line-after-record-invalid): Likewise.
1146         (recfix-blank-line-after-record): New test.
1147         (recfix-blank-line-after-record-invalid): Likewise.
1149         * src/rec-parser.c (rec_parse_record): Ignore lines composed by
1150         only blank characters when they appear immediately after a record.
1152 2012-12-26  Jose E. Marchesi  <jemarch@gnu.org>
1154         * etc/rec-mode.el (rec-finish-editing-field): dont hide
1155         continuation line markers if the command was invoked from an
1156         editing mode.
1158 2012-12-12  Jose E. Marchesi  <jemarch@gnu.org>
1160         * etc/rec-mode.el (rec-finish-editing-field): Do the right thing
1161         when the selected window is the only window in the frame.
1163 2012-12-06  Jose E. Marchesi  <jemarch@gnu.org>
1165         src,torture: support several foreign keys with the same name in a
1166         record.
1167         * torture/utils/recsel.sh (several-foreign-keys): New input file.
1168         (recsel-several-foreign-keys): New test.
1170         * src/rec-db.c (rec_db_join): A record may contain more than one
1171         foreign field.
1173 2012-11-21  Jose E. Marchesi  <jemarch@gnu.org>
1175         manual: little fix in the introduction.
1176         * doc/recutils.texi (Introduction): Don't enumerate the different
1177         utilities.
1179 2012-11-21  Jose E. Marchesi  <jemarch@gnu.org>
1181         utils: make recsel to honour --print-row and --print-values.
1182         * torture/utils/recsel.sh (recsel-row-long): New test.
1183         (recsel-values-long): New test.
1185         * utils/recsel.c (recsel_parse_args): Honour --print-row and
1186         --print-values.
1188 2012-11-21  Julio C. M. Ramirez <rikijpn@member.fsf.org>
1190         * doc/recutils.texi : Grammar corrections and rephrasing some
1191         parts for easier reading.
1193 2012-11-21  John Darrington  <john@darrington.wattle.id.au>
1195         * doc/recutils.texi: Updated so that Texinfo 4.13.90 does not
1196         show errors.
1198 2012-11-15  Jose E. Marchesi  <jemarch@gnu.org>
1200         rec-mode: visiting an empty file works again.
1201         * etc/rec-mode.el (rec-buffer-valid-p): New function.
1202         (rec-update-buffer-descriptors-and-check): Use rec-buffer-valid-p
1203         to determine if the buffer contains valid rec data, instead of
1204         rec-update-buffer-descriptors.
1206 2012-11-12  Jose E. Marchesi  <jemarch@gnu.org>
1208         rec-mode: support for a mode hook.
1209         * etc/rec-mode.el (rec-mode-hook): New custom.
1210         (rec-mode): Run the hooks installed in rec-mode-hook.
1212 2012-11-11  Jose E. Marchesi  <jemarch@gnu.org>
1214         doc: some work on the rec-mode manual.
1215         * doc/rec-mode.texi (Opening recfiles): New section.
1216         (Editing records and fields): Likewise.
1217         (Edition modes): Likewise.
1218         (Edition mode): Likewise.
1219         (Data integrity): Likewise.
1220         (Statistics): Likewise.
1221         (Editing fields): Likewise.
1222         (Searches): Likewise.
1223         (Motion): Likewise.
1224         (Navigation mode): Likewise.
1225         (Field navigation and folding): Likewise.
1226         (reccmd): New macro.
1227         (ie): Likewise.
1228         (Records appearance): New section.
1230 2012-11-11  Jose E. Marchesi  <jemarch@gnu.org>
1232         utils: a NULL file name means stdout, which is always writable.
1233         * utils/recutl.c (recutl_file_is_writable): Return true if the
1234         file name is NULL.
1236 2012-11-10  Jose E. Marchesi  <jemarch@gnu.org>
1238         utils: honor file permissions when doing in-place operations.
1239         * utils/recset.c (main): Likewise.
1241         * utils/recins.c (main): Likewise.
1243         * utils/recfix.c (recfix_do_sort): Likewise.
1245         * utils/recdel.c (main): Check for the writeability of the file
1246         before writing to it.
1248         * utils/recutl.c (recutl_check_file_is_writable): new function.
1250 2012-11-10  Jose E. Marchesi  <jemarch@gnu.org>
1252         * gnulib module euidaccess imported.
1254 2012-11-10  Jose E. Marchesi  <jemarch@gnu.org>
1256         rec-mode: check for the validity of the contents of the buffers
1257         before going to navigation mode.
1258         * etc/rec-mode.el (rec-mode): Do not activate the rec-mode if the
1259         contents of the buffer are not valid rec data.  Show an error
1260         message in the modeline instead.
1261         (rec-update-buffer-descriptors-and-check): New function.
1262         (rec-finish-editing): Warn and don't abandon edit mode if there
1263         are errors in the rec data in the buffer.
1265         * utils/recinf.c (main): Recognize parse errors when stdin is used
1266         to read the rec data.
1268         * torture/utils/recinf.sh (invalid): New input file.
1269         (recinf-invalid): New test.
1271         * src/rec-parser.c (rec_parse_db): Keep track of the result of
1272         rec_parse_rset so an invalid database is properly reported.
1274         * utils/recinf.c (print_info_file): Return false if there is a
1275         parse error in the input.
1277         * etc/rec-mode.el (rec-update-buffer-descriptors): Return nil if
1278         the :
1280 2012-11-10  Jose E. Marchesi  <jemarch@gnu.org>
1282         rec-mode: avoid trying to delete the sole window in the current
1283         frame.
1284         (rec-finish-editing-field): avoid trying to delete the edit window
1285         if it is the only window in the frame.  Switch to show the rec
1286         buffer instead.
1288 2012-11-10  Jose E. Marchesi  <jemarch@gnu.org>
1290         rec-mode: rec-end-of-field-pos now works properly when a field
1291         ends with the end of file mark.
1292         * etc/rec-mode.el (rec-end-of-field-pos): Do not add one to the
1293         end-of-field position.
1294         (rec-delete-field): Delete the trailing \n after the field, if
1295         any.
1297 2012-11-07  Jose E. Marchesi  <jemarch@gnu.org>
1299         src: emit a useful message when an invalid enum literal is found
1300         in a field.
1301         * src/rec-types.c (rec_type_check_enum): Add a meaningful error
1302         message when the string to check is empty or otherwise an invvalid
1303         enum literal.
1305 2012-11-07  Jose E. Marchesi  <jemarch@gnu.org>
1307         man: do not require help2man unless the sources are changed.
1308         * .gitignore: generated manpages removed.
1309         * man/csv2rec.1: Added to the repo.
1310         * man/recset.1: Likewise.
1311         * man/recsel.1: Likewise.
1312         * man/recins.1: Likewise.
1313         * man/recinf.1: Likewise.
1314         * man/recfmt.1: Likewise.
1315         * man/recfix.1: Likewise.
1316         * man/recdel.1: Likewise.
1317         * man/rec2csv.1: Likewise.
1318         * man/mdb2rec.1: Likewise.
1320 2012-10-08  Jose E. Marchesi  <jemarch@gnu.org>
1322         csv2rec: diagnostic messages improved.
1323         * utils/csv2rec.c (struct csv2rec_ctx): New field lineno.
1324         (process_csv): Initialize lineno.
1325         (field_cb): Improve the error message.
1327 2012-10-07  John Darrington  <john@darrington.wattle.id.au>
1329         utils/recutl.c: (recutl_write_db_to_file) Fixed memory leak
1331 2012-09-07  Jose E. Marchesi  <jemarch@gnu.org>
1333         rec-mode: fixed to allow comments in records.
1334         * etc/rec-mode.el (rec-hide-continuation-line-markers): Fixed to
1335         ignore comments in records.
1336         (rec-hide-record-fields): Likewise.
1337         (rec-record-elems): Renamed from rec-record-fields.
1338         (rec-insert-record): Use rec-record-elems.
1339         (rec-record-assoc): Likewise.
1340         (rec-record-names): Likewise.
1341         (rec-hide-continuation-line-markers): Likewise.
1342         (rec-hide-record-fields): Likewise.
1343         (rec-unfold-record-fields): Likewise.
1344         (rec-log-current-defun): Likewise.
1346 2012-09-07  Jose E. Marchesi  <jemarch@gnu.org>
1348         rec-mode: don't move the pointer after switching to edit buffer or
1349         edit type mode.
1350         * etc/rec-mode.el (rec-edit-buffer): Don't move the pointer to the
1351         beginning of the buffer.
1352         (rec-edit-type): Likewise.
1354 2012-09-06   John Darrington  <john@darrington.wattle.id.au>
1356         * doc/recutils.texi : Minor markup alterations
1357         * doc/recutils.texi : Added some index entries
1359 2012-09-04  Jose E. Marchesi  <jco@terma.com>
1361         rec-mode: improve rec-log-current-defun so it works in all cases.
1362         * etc/rec-mode.el (rec-log-current-defun): Cover the case where
1363         there is a defined key but the field is not present in the record.
1365 2012-09-03  Jose E. Marchesi  <jemarch@gnu.org>
1367         rec-mode: provide a sensible log-current-defun for the add-log
1368         function.
1369         * etc/rec-mode.el (rec-log-current-defun): New function.
1370         (rec-mode): Set the buffer local value of
1371         add-log-current-defun-function to rec-log-current-defun.
1373 2012-09-03  Jose E. Marchesi  <jemarch@gnu.org>
1375         * AUTHORS: Daiki, Ralf, John and MichaÅ‚ added.
1377 2012-08-31  John Darrington  <john@darrington.wattle.id.au>
1379         * doc/recutils.texi : Merge Fields and Records, and Comments into
1380           one chapter
1382         * doc/recutils.texi : Added the start of a tutorial chapter
1384 2012-08-27  Jose E. Marchesi  <jemarch@gnu.org>
1386         * doc/recutils.texi (Top): Concept Index added to the menu.
1388 2012-08-27  Jose E. Marchesi  <jco@terma.com>
1390         * .x-sc_prohibit_strncpy: New file.
1392 2012-08-27  John Darrington  <john@darrington.wattle.id.au>
1394         * doc/recutils.texi: Replaced one remaining instance of "i.e." with the
1395         respective macro.  Also added @: to the macro definition to improve
1396         spacing.
1398         * doc/recutils.texi: Added @. where appropriate.
1399         * doc/recutils.texi: Added an index.
1401 2012-08-26  Jose E. Marchesi  <jemarch@gnu.org>
1403         doc: minor fixes in the manual.
1404         * doc/recutils.texi (Conversion Utilities): @acronym removed.
1405         (Record Descriptors): Relocate the menu to the end of the section
1406         and remove the now uneeded list of special fields.
1407         (Scalar types): The type identifier for integers is 'int' and not
1408         'integer'.
1410 2012-08-26  John Darrington  <john@darrington.wattle.id.au>
1412         * doc/recutils.texi: Reorganised sectioning, in favour of fewer, but bigger chapters.
1414 2012-08-23  Jose E. Marchesi  <jemarch@gnu.org>
1416         syntax-check fixes.
1417         * etc/rec-mode.el: Trailing blanks removed from file.
1419         * doc/recutils.texi (recsel Grouping): Don't use @acronym{}.
1420         http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
1421         explains why.
1423         * src/rec-db.c (rec_db_merge_records): Use memcpy instead of
1424         strncpy.
1425         (rec_db_process_fex): Likewise.
1426         * utils/recfmt.c (recfmt_apply_template): Likewise.
1427         * utils/mdb2rec.c (process_table): Likewise.
1428         * utils/csv2rec.c (field_cb): Likewise.
1429         * src/rec-utils.c (rec_extract_file): Likewise.
1430         (rec_extract_url): Likewise.
1431         (rec_extract_type): Likewise.
1432         (rec_parse_regexp): Likewise.
1433         (rec_concat_strings): Likewise.
1434         * src/rec-sex-lex.l: Likewise.
1435         * src/rec-sex.c (rec_sex_eval_node): Likewise.
1436         (rec_sex_eval_node): Likewise.
1437         * src/rec-parser.c (rec_parse_field_name_str): Likewise.
1438         * src/rec-int.c (rec_int_merge_remote): Likewise.
1439         * src/rec-field-name.c (rec_field_name_normalise): Likewise.
1441         * .x-sc_prohibit_strncpy: New file.
1443 2012-08-22  Jose E. Marchesi  <jemarch@gnu.org>
1445         * src/rec-types.c (rec_type_destroy): Be a no-operation in case
1446         the passed type is NULL.
1448 2012-08-21  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
1450         src,torture: Fix memory leaks found by valgrind in unit tests.
1451         * src/rec-fex.c (rec_fex_destroy): Free rewrite_to of each
1452         element.
1453         (rec_fex_parse_str_simple): Free fex_str, rewrite_to of each
1454         element and use common code for destroying partial results on
1455         error.
1456         (rec_fex_parse_str_subscripts): Free fex_str and in case of error
1457         field_name and str of each element.
1458         (rec_fex_parse_elem): Free elem->str, elem->field_name and
1459         elem->rewrite_to on error.
1460         * src/rec-parser.c (rec_parser_perror): Don't allocate number_str,
1461         asprintf will do it.
1462         (rec_parse_record): Free the record on error.
1463         (rec_parse_comment): Free the comment string not only on error.
1464         * src/rec-rset.c (rec_rset_destroy): Free constraints.
1465         * src/rec-sex-ast.c (rec_sex_ast_node_destroy): Free the node.
1466         * src/rec-types.c (rec_type_new): Free the type on error.
1467         (rec_type_destroy): Free the data of enum and regexp types.
1469         * torture/rec-fex/rec-fex-new.c (rec_fex_new_subscripts): Destroy
1470         the fex after use.
1471         * torture/rec-fex/rec-fex-str.c (rec_fex_str_nominal): Likewise.
1472         * torture/rec-field/rec-field-set-name.c
1473         (rec_field_set_name_empty): Destroy the field after use.
1474         (rec_field_set_name_nonempty): Likewise.
1475         * torture/rec-field/rec-field-set-value.c
1476         (rec_field_set_value_empty): Likewise.
1477         (rec_field_set_value_nonempty): Likewise.
1478         * torture/rec-field/rec-field-value.c (rec_field_value_empty):
1479         Likewise.
1480         (rec_field_value_nonempty): Likewise.
1481         * torture/rec-parser/rec-parse-record-str.c
1482         (rec_parse_record_str_nominal): Free fname after use.
1483         * torture/rec-parser/rec-parse-record.c
1484         (rec_parse_record_nominal): Likewise.
1485         * torture/rec-parser/rec-parse-rset.c (rec_parse_rset_nominal):
1486         Destroy the rset after use.
1487         * torture/rec-parser/rec-parser-new-mem.c
1488         (rec_parser_new_mem_nominal): Likewise.
1489         * torture/rec-parser/rec-parser-seek-mem.c
1490         (rec_parser_seek_mem_skip): Destroy the record after use.
1491         * torture/rec-writer/rec-write-comment-str.c
1492         (rec_write_comment_str_nominal): Free str after use.
1493         (rec_write_comment_str_sexp): Likewise.
1494         * torture/rec-writer/rec-write-field-name-str.c
1495         (rec_write_field_name_str_nominal): Likewise.
1496         (rec_write_field_name_str_sexp): Likewise.
1497         * torture/rec-writer/rec-write-field-str.c
1498         (rec_write_field_str_nominal): Likewise.
1499         (rec_write_field_str_sexp): Likewise.
1501 2012-08-21  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
1503         src: Initialize unused fields to 0 in rec_fex_append.
1504         * src/rec-fex.c (rec_fex_append): Zero new_elem content.
1506 2012-08-21  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
1508         src: Fix an invalid read in an unit test detected by valgrind.
1509         * src/rec-parser.c (rec_parse_field_name_str): Do the check for
1510         trailing ':' only for nonempty strings.
1512 2012-08-16  John Darrington  <john@darrington.wattle.id.au>
1514         doc: Reals always use the dot as separator
1515         * doc/recutils.texi: Added a note to the effect that the LC_NUMERIC
1516         locale class does not affect how real types are interpreted.
1518 2012-08-16  John Darrington  <john@darrington.wattle.id.au>
1520         doc: Grammar and typos
1521         * doc/recutils.texi: Corrected various minor grammatical and
1522         typographical errors.
1524 2012-08-16  John Darrington  <john@darrington.wattle.id.au>
1526         doc: Comments vs. %doc
1527         * doc/recutils.texi: Elaborated on the distinction between comments
1528         and %doc fields. Added an example for %doc
1530 2012-08-16  John Darrington  <john@darrington.wattle.id.au>
1532         doc: Grammar
1533         * doc/recutils.texi: "allows to" is not correct English.  Added a
1534         subject or reformulated as appropriate.
1536 2012-08-15  John Darrington  <john@darrington.wattle.id.au>
1538         doc: Correct typo
1539         * doc/recutils.texi: adquisition --> acquisition
1541 2012-08-15  John Darrington  <john@darrington.wattle.id.au>
1543         doc: Add a macro for id est
1544         * doc/recutils.texi: In English text, I think its easier to recognise these latin
1545         abbreviations in italics.  So I've added a macro for i.e.
1547 2012-08-15  John Darrington  <john@darrington.wattle.id.au>
1549         doc: "data" is plural ("datum" is the singular)
1550         * doc/recutils.texi: I find conjugations like "this data" just sound wrong.
1552 2012-08-14  Jose E. Marchesi  <jemarch@gnu.org>
1554         src: compare real numbers with LC_NUMERIC=C.
1555         * src/rec-utils.c: Include locale.h.
1556         (rec_atod): Make sure that the dot is the decimal separator
1557         regardless of the locale in the environment.
1559 2012-08-09  Jose E. Marchesi  <jemarch@gnu.org>
1561         doc: typo fixed in manual.
1562         * doc/recutils.texi: Incorrect "escalar" replaced by "scalar".
1564 2012-08-05  Jose E. Marchesi  <jemarch@gnu.org>
1566         src,doc: support for dot notation in simple fexes.
1567         * doc/recutils.texi (Field Expressions): Document dot notation in
1568         field expressions.
1570         * src/rec-fex.c (rec_fex_parse_str_simple): Support for dot
1571         notation in field names in simple fexes.
1573 2012-08-05  Jose E. Marchesi  <jemarch@gnu.org>
1575         src,torture: don't try to perform a join if the referred type does
1576         not exist in the database.
1577         * src/rec-db.c (rec_db_query): Don't perform a join if records of
1578         the referred type cannot be found in the database.
1580         * torture/utils/recsel.sh (non-existant-foreign-key): New input
1581         file.
1582         (recsel-non-existant-foreign-key): New test.
1584 2012-08-04  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
1586         src,torture: fix a recfix crash reported by John Darrington.
1587         * src/rec-rset.c (rec_rset_get_field_type): Don't call
1588         rec_type_reg_get with NULL as type name.
1590         * torture/utils/recfix.sh (unused-type): New input file.
1591         (recfix-unused-type): New test.
1593 2012-08-01  Jose E. Marchesi  <jemarch@gnu.org>
1595         rec-mode: copy/kill fields and records commands.
1596         * etc/rec-mode.el (rec-cmd-kill-field): New function.
1597         (rec-cmd-copy-field): Likewise.
1598         (rec-cmd-kill-record): Likewise.
1599         (rec-cmd-copy-record): Likewise.
1600         (rec-mode-edit-map): Map the copy/kill commands for fields and
1601         records.
1602         (rec-mode-map): Likewise.
1604 2012-07-31  Jose E. Marchesi  <jemarch@gnu.org>
1606         src,doc,torture: support for the %constraint special field.
1607         * doc/recutils.texi (%size and %constraint): Document the
1608         usage of the %constraint special field.
1610         * src/rec-rset.c (rec_rset_num_sex_constraints): New function.
1611         (rec_rset_sex_constraint): Likewise.
1613         * src/rec-int.c (rec_int_check_record): Call to
1614         rec_int_check_record_sex_constraints.
1615         (rec_int_check_record_sex_constraints): New function.
1617         * torture/utils/recfix.sh (constraint-sex-valid): New input file.
1618         (constraint-sex-invalid): Likewise.
1619         (constraint-sex-invalid-empty): Likewise.
1620         (constraint-sex-several-valid): Likewise.
1621         (constraint-sex-several-invalid): Likewise.
1622         (constraint-sex-with-violation): Likewise.
1623         (recfix-constraint-sex-valid): New test.
1624         (recfix-constraint-sex-invalid): Likewise.
1625         (recfix-constraint-sex-invalid-empty): Likewise.
1626         (recfix-constraint-sex-several-valid): Likewise.
1627         (recfix-constraint-sex-several-invalid): Likewise.
1628         (recfix-constraint-sex-with-violation): Likewise.
1630         * src/rec-int.c (rec_int_check_descriptor): Check for the
1631         integrity of the %constraint fields.
1633         * src/rec-rset.c (rec_rset_new): Initialize the internal
1634         constraints structures to empty.
1635         (rec_rset_destroy): Destroy the internal constraints structures.
1636         (rec_rset_dup): Dup constraints.
1637         (rec_rset_set_descriptor): Update sex constraints.
1638         (rec_rset_update_sex_constraints): New function.
1640         * src/rec.h (enum rec_std_field_e): New member
1641         REC_FIELD_CONSTRAINT.
1643         * src/rec-field-name.c (fnames): New special field name
1644         %constraint.
1646 2012-07-31  Jose E. Marchesi  <jemarch@gnu.org>
1648         torture: test for the => operator in sexes.
1649         * torture/utils/recsel.sh (implications): New input file.
1650         (recsel-sex-implies-1): New test.
1652 2012-07-28  Jose E. Marchesi  <jemarch@gnu.org>
1654         doc: documentation of the => operator.
1655         * doc/recutils.texi (SEX Operators): Document the => operator.
1657 2012-07-27  Jose E. Marchesi  <jemarch@gnu.org>
1659         src: implementation of the => sex operator.
1660         * src/rec-sex.c (rec_sex_eval_node): Implementation of the
1661         "implies" operator.
1663         * src/rec-sex-ast.h (enum rec_sex_ast_node_type_e): New value
1664         REC_SEX_OP_IMPLIES.
1666         * src/rec-sex-tab.y: Rule for the implies operator.
1668         * src/rec-sex-lex.l ("=>"): New token for the "implies" operator.
1670 2012-07-23  Jose E. Marchesi  <jemarch@gnu.org>
1672         rec-mode: new command rec-cmd-statistics.
1673         * etc/rec-mode.el (rec-cmd-statistic): New function.
1674         (rec-mode-map): Map rec-cmd-statistic with %.
1676 2012-07-23  Jose E. Marchesi  <jemarch@gnu.org>
1678         rec-mode: rec-cmd-count now suggests a default selection
1679         expression when invoked with a numeric prefix.
1680         * etc/rec-mode.el (rec-cmd-count): Use a default expression using
1681         the field under point when invoked with a prefix argument.
1683 2012-07-20  Jose E. Marchesi  <jemarch@gnu.org>
1685         * .x-sc_prohibit_defined_have_decl_tests: New file.
1687 2012-07-20  Jose E. Marchesi  <jemarch@gnu.org>
1689         * gnulib module flock imported.
1691 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1693         rec-mode: support for undo in navigation mode.
1694         * etc/rec-mode.el (rec-mode-map): Remap `undo' into rec-cmd-undo
1695         when in navigation mode.
1696         (rec-cmd-undo): New function.
1698 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1700         rec-mode: support for multiple field names in %type entries.
1701         * etc/rec-mode.el (rec-field-type): Support for multiple field
1702         names in %type entries.
1704 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1706         rec-mode: time-stamps are now triggered with `t' instead of `n'.
1707         * etc/rec-mode.el (rec-cmd-edit-field): Change the key to
1708         trigger a time-stamp from `n' to `t'.
1710 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1712         rec-mode: support for generating time-stamps in date fields.
1713         * etc/rec-mode.el (rec-cmd-edit-field): Support for getting a
1714         timestamp when editing date fields.
1715         (rec-time-stamp-format): New constant.
1717 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1719         rec-mode: fix edition of the default record set.
1720         * etc/rec-mode.el (rec-record-descriptor): Return `nil' for a
1721         non-existant record descriptor, not "".
1723 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1725         rec-mode: allow the user to cancel the edit date operation by
1726         quitting the calendar window.
1727         * etc/rec-mode.el (rec-cmd-edit-field): Remap "q" in the calendar
1728         to remove the modified local map in the *Calendar* buffer if the
1729         user quits the calendar.
1731 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1733         rec-mode: rec-cmd-edit-field supports a numeric argument.
1734         * etc/rec-mode.el (rec-cmd-edit-field): Use the more general input
1735         method for reading field values regardless their types if a
1736         numeric argument is passed to the function.
1738 2012-07-17  Jose E. Marchesi  <jemarch@gnu.org>
1740         rec-mode: support for editing date fields using the calendar.
1741         * etc/rec-mode.el (rec-cmd-edit-field): Support for editing date
1742         fields using the calendar.
1743         (rec-popup-calendar): New customized variable.
1745 2012-07-10  Jose E. Marchesi  <jemarch@gnu.org>
1747         algol68: several new wrappers for librec functions.
1748         * algol68/rec.a68 (MODE RSET): New mode.
1749         (rec rset new): New wrapper.
1750         (rec rset destroy): Likewise.
1751         (rec rset dup): Likewise.
1752         (MODE MSET): New mode.
1753         (MODE MSETELEM): Likewise.
1754         (mset any): New constant.
1755         (rec mset new): New wrapper.
1756         (rec mset destroy): Likewise.
1757         (rec mset dup): Likewise.
1758         (rec mset type p): Likewise.
1759         (rec mset get at): Likewise.
1760         (rec mset insert at): Likewise.
1761         (rec mset insert after): Likewise.
1762         (rec mset append): Likewise.
1763         (rec mset add sorted): Likewise.
1764         (rec mset remove at): Likewise.
1765         (rec mset remove elem): Likewise.
1766         (rec mset search): Likewise.
1768 2012-07-10 Jose E. Marchesi <jemarch@termi>
1770         Tasktool operations.
1771         * TODO: Task 14 resolved to 'DONE'.
1773 2012-07-08  Jose E. Marchesi  <jemarch@gnu.org>
1775         * etc/rec-mode.el (rec-cmd-select-fast): New function.
1776         (rec-cmd-select-sex): Likewise.
1777         (rec-mode-edit-map): Bindings for selection functions added.
1778         (rec-mode-map): Likewise.
1780 2012-06-22  Jose E. Marchesi  <jco@terma.com>
1782         manual: some work in the grouping section.
1783         * doc/recutils.texi (recsel Grouping): Some work in the section.
1785 2012-06-11  Jose E. Marchesi  <jemarch@gnu.org>
1787         rec-mode: new functions returning properties of the current record
1788         set.
1789         * etc/rec-mode.el (rec-keyword-mandatory): New constant.
1790         (rec-keyword-key): Likewise.
1791         (rec-mandatory-fields): New function.
1792         (rec-key): Likewise.
1794 2012-06-10  Jose E. Marchesi  <jemarch@gnu.org>
1796         rec-mode: bug affecting the hiding of continuation line markers
1797         fixed.
1798         * etc/rec-mode.el (rec-hide-continuation-line-markers): Use
1799         rec-insert-field-value in order to determine the length.
1801 2012-06-08  Jose E. Marchesi  <jemarch@gnu.org>
1803         rec-mode: presentation of continuation lines in navigation modes,
1804         and other improvements.
1805         * etc/rec-mode.el (rec-query): renamed from rec-select, and
1806         completed.
1807         (cl): Package required, for keyword arguments support.
1808         (rec-show-record): Call rec-hide-continuation-line-markers.
1809         (rec-hide-continuation-line-markers): New function.
1810         (rec-continuation-line-markers-overlays): New variable.
1811         (rec-continuation-line-markers-width): New variable.
1812         (rec-remove-continuation-line-marker-overlays): New function.
1813         (rec-mode-syntax-table): Put " and ' in the word-constituent
1814         syntax class to avoid unwanted font-locking and pairing.
1816 2012-06-05  Jose E. Marchesi  <jemarch@gnu.org>
1818         manual: some more dummy sections for the rec-mode manual.
1819         * doc/rec-mode.texi (Summary): New section.
1820         (Installation): Likewise.
1821         (Feedback): Likewise.
1823 2012-06-05  Jose E. Marchesi  <jemarch@gnu.org>
1825         manual: skeleton for the rec-mode manual.
1826         * .gitignore: Ignore doc/version-rec-mode.texi
1828         * doc/Makefile.am (info_TEXINFOS): Added rec-mode.texi.
1830         * doc/rec-mode.texi: New file.
1831         (Introduction): New chapter.
1832         (GNU Free Documentation License): New chapter.
1834 2012-06-05  Jose E. Marchesi  <jemarch@gnu.org>
1836         rec-mode: support for selection expressions in rec-count.
1837         * etc/rec-mode.el (rec-count): Support for selection expressions
1838         in counts.
1839         (rec-cmd-count): Likewise.
1841 2012-06-05  Jose E. Marchesi  <jemarch@gnu.org>
1843         rec-mode: folding of fields.
1844         * etc/rec-mode.el (rec-show-record): Call to
1845         rec-hide-record-fields.
1846         (rec-hide-record-fields): New function.
1847         (rec-toggle-field-visibility): Likewise.
1848         (rec-cmd-toggle-field-visibility): Likewise.
1849         (rec-mode-edit-map): Bind SPC with
1850         rec-cmd-toggle-field-visibility.
1851         (rec-mode-map): Likewise.
1852         (rec-mode): Add an invisibility spec for fields.
1853         (rec-show-fields-all): New function.
1854         (rec-field-folded-p): Likewise.
1855         (rec-fold-field): Likewise.
1856         (rec-cmd-beginning-of-line): Removed.
1857         (rec-max-lines-in-fields): Default to 15.
1858         (rec-unfold-record-fields): New function.
1859         (rec-unfold-all-fields): New function.
1860         (rec-edit-type): Unfold all fields before switching to edit mode.
1861         (rec-edit-buffer): Likewise.
1862         (rec-edit-record): Likewise.
1864 2012-06-04  Jose E. Marchesi  <jemarch@gnu.org>
1866         * etc/rec-mode.el (rec-cmd-edit-field): Support editing boolean
1867         fields as special enum values.
1869 2012-06-04  Jose E. Marchesi  <jemarch@gnu.org>
1871         rec-mode: complete support for editing fields storing enumerated
1872         values.
1873         * etc/rec-mode.el (rec-cmd-show-type): Use
1874         display-message-or-buffer in order to avoid overflowing the echo
1875         area.
1876         (rec-cmd-edit-field): Complete support for editing fields
1877         containing enum values.
1879 2012-06-04  Jose E. Marchesi  <jemarch@gnu.org>
1881         rec-mode: avoid security problems in calls to message by using %s.
1882         * etc/rec-mode.el (rec-cmd-show-type): Use "%s" in message to
1883         avoid security problems.
1884         (rec-cmd-goto-next-rec): Likewise.
1885         (rec-cmd-goto-previous-rec): Likewise.
1886         (rec-cmd-count): Likewise.
1887         (rec-cmd-show-info): Likewise.
1889 2012-06-03  Jose E. Marchesi  <jemarch@gnu.org>
1891         * etc/rec-mode.el (rec-parse-field-name-from-string): Deleted.
1892         (rec-mode-map): Use "d" to show descriptors, not t.
1893         (rec-mode-edit-map): Likewise with C-cd.
1894         (rec-mode-edit-map): New entry for rec-cmd-show-type.
1895         (rec-mode-map): Likewise.
1896         (rec-type-descriptor): New function.
1897         (rec-parse-type): Allow comments in parenthesis in enum
1898         descriptions.
1899         (rec-cmd-edit-field): Edit the field value in several ways,
1900         depending on its type.
1901         (rec-type-data): New function.
1902         (rec-type-kind): Likewise.
1904 2012-06-03  Jose E. Marchesi  <jemarch@gnu.org>
1906         rec-mode: several functions to support field types.
1907         * etc/rec-mode.el (rec-types): New variable.
1908         (rec-type-kind-p): New function.
1909         (rec-parse-type): Likewise.
1910         (rec-parse-type-int): Likewise.
1911         (rec-check-type): Likewise.
1913 2012-06-01  Jose E. Marchesi  <jemarch@gnu.org>
1915         rec-mode: misc small fixes.
1916         * etc/rec-mode.el (rec-mode): docstring updated to reflect the
1917         real URL.
1918         (rec-keyword-rec): Use rec-keyword-prefix.
1919         (rec-mode-edit-map): Remove obsolete or not-working entries.
1920         (rec-mode-map): Likewise.
1921         (rec-field-trim-value): Don't remove the initial newline when
1922         trimming when there is only one.
1923         (rec-update-buffer-descriptors-xxx): Removed.
1924         (rec-map): Removed.
1925         (rec-do): Removed.
1926         (rec-sel): Removed.
1927         (rec-field-eq): Removed.
1928         (rec-field-count): Removed.
1929         (rec-init-selections): Removed.
1930         (rec-finish-editing): Don't call rec-init-selections.
1931         (rec-finish-editing-field): Likewise.
1932         (rec-search-first): Removed.
1933         (rec-selection-list): Removed.
1934         (rec-cmd-sel): Removed.
1935         (rec-mode): Wide the buffer after killing local variables.
1937 2012-06-01  Jose E. Marchesi  <jemarch@gnu.org>
1939         rec-mode: fixes in goto-type and show-type.
1940         * etc/rec-mode.el (rec-buffer-types): Return the values of the
1941         first %rec entry in each record, not a list.
1942         (rec-show-type): Show the first data record of the selected type,
1943         if it exists.
1944         (rec-show-type): Get an optional argument show-descriptor.
1945         (rec-cmd-show-descriptor): Call rec-show-type with show-descriptor
1946         t.
1948 2012-06-01  Jose E. Marchesi  <jemarch@gnu.org>
1950         rec-mode: field names are no longer lists of parts.
1951         * etc/rec-mode.el (rec-parse-record): Docstring updated.
1952         (rec-field-name-re): Updated.
1953         (rec-insert-field-name): Updated to new field structure.
1954         (rec-buffer-types): Call rec-record-assoc with a string field
1955         name, not a list.
1956         (rec-record-descriptor-p): Likewise, and use rec-keyword-rec.
1957         (rec-goto-type): Likewise.
1958         (rec-regular-p): Likewise.
1959         (rec-record-type): Likewise.
1960         (rec-search-first): Likewise.
1961         (rec-init-selections): Likewise.
1963 2012-05-31  Jose E. Marchesi  <jemarch@gnu.org>
1965         rec-mode: editing of individual fields now works.
1966         * etc/rec-mode.el (rec-insert-field): Fixed to work with the new
1967         field structured.
1969 2012-05-31  Jose E. Marchesi  <jemarch@gnu.org>
1971         src: fix sorting code to properly handle interleaved comments.
1972         * src/rec-rset.c (rec_rset_record_compare_fn): Return 1 if elem2
1973         is a comment.
1975         * torture/utils/recsel.sh (sort-with-comment): New input file.
1976         (sort-with-comment): New test.
1978 2012-05-29  Jose E. Marchesi  <jemarch@gnu.org>
1980         Syntax fixes.
1981         * python/setup.py: Trailing blank removed.
1983         * doc/recutils.texi (recins Encryption): Fix usage of @pxref.
1985 2012-05-25  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
1987         src,torture: support changing parser position.
1988         * src/rec-parser.c (rec_parser_seek, rec_parser_tell): New
1989         functions.
1990         * src/rec.h: Prototypes for rec_parser_seek, rec_parser_tell.
1992         * torture/Makefile.am (REC_PARSER_TSUITE): rec-parser-seek-mem.c
1993         added.
1994         * torture/rec-parser/rec-parser-seek-mem.c: New file.
1995         * torture/rec-parser/tsuite-rec-parser.c (tsuite_rec_parser):
1996         Added test_rec_parser_seek_mem.
1998 2012-05-25  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
2000         src,torture: support parsing non-null terminated buffers.
2001         * src/rec-parser.c (struct rec_parser_s): New field in_size.
2002         * src/rec-parser.c (rec_parser_new): Initialize in_size to an
2003         invalid value.
2004         * src/rec-parser.c (rec_parser_getc): Use in_size instead of null
2005         check to find EOF in memory buffers.
2006         * src/rec-parser.c (rec_parser_new_mem): New function.
2007         * src/rec-parser.c (rec_parser_new_str): Use rec_parser_new_mem.
2008         * src/rec.h: Prototype for rec_parser_new_mem.
2010         * torture/Makefile.am (REC_PARSER_TSUITE): rec-parser-new-mem.c
2011         added.
2012         * torture/rec-parser/rec-parser-new-mem.c: New file.
2013         * torture/rec-parser/tsuite-rec-parser.c (tsuite_rec_parser):
2014         Added test_rec_parser_new_mem.
2016 2012-05-25  Jose E. Marchesi  <jemarch@gnu.org>
2018         build,src: support versions of mdbtools using MDB_SDATETIME and
2019         MDB_DATETIME.
2020         * utils/mdb2rec.c (process_table): Use MDB_DATETIME instead of
2021         MDB_SDATETIME.
2023         * utils/Makefile.am (mdb2rec_CPPFLAGS): Set MDB_DATETIME to the
2024         proper symbol.
2026         * configure.ac (MDB_DATETIME): Check whether mdblib is using
2027         MDB_SDATETIME or MDB_DATETIME.
2029 2012-05-25  Jose E. Marchesi  <jemarch@gnu.org>
2031         torture,src: tests for aggregates and multiple-field grouping, and
2032         several fixes.
2033         * src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Get an INIT_VAL
2034         argument.
2035         Use DBL_MAX and DBL_MIN.
2036         (rec_aggregate_std_avg): avg must be a double for the average.
2038         * torture/utils/recsel.sh (sales): New input file.
2039         (recsel-group-multiple-fields): New test.
2040         (recsel-aggregate-field-name): Likewise.
2041         (recsel-aggregate-case-insensitive): Likewise.
2042         (recsel-aggregate-rewrite-rule): Likewise.
2043         (recsel-aggregate-count-overall): Likewise.
2044         (recsel-aggregate-count-grouped): Likewise.
2045         (recsel-aggregate-sum-overall): Likewise.
2046         (recsel-aggregate-sum-grouped): Likewise.
2047         (recsel-aggregate-min-overall): Likewise.
2048         (recsel-aggregate-min-grouped): Likewise.
2049         (recsel-aggregate-max-overall): Likewise.
2050         (recsel-aggregate-max-grouped): Likewise.
2052 2012-05-25  Jose E. Marchesi  <jemarch@gnu.org>
2054         utils: fix the detection of invalid fexes in -G and -S.
2055         * utils/rec2csv.c (rec2csv_parse_args): Use rec_fex_check to
2056         validate the list of fields in the command line.
2057         * utils/recsel.c (recsel_parse_args): Likewise.
2059 2012-05-25  Jose E. Marchesi  <jemarch@gnu.org>
2061         src,doc: support for grouping by several fields.
2062         * doc/recutils.texi (recsel Invocation): Document that -G accepts
2063         a comma separated list of fields.
2065         * utils/recsel.c: recutl_group_by_fields is now a fex.
2066         (recsel_parse_args): Adjust error messages to that fact and parse
2067         the fex.
2068         (recutl_print_help): Likewise.
2069         (recsel_process_data): Use recsel_group_by_fields.
2071         * src/rec-db.c (rec_db_set): group-by is now a fex.
2073         * src/rec-rset.c (rec_rset_merge_records): Get a fex argument with
2074         the list of fields used for grouping.
2075         (rec_rset_group): Group by multiple fields.
2077 2012-05-24  Jose E. Marchesi  <jemarch@gnu.org>
2079         src: new function rec_rset_compare_typed_records.
2080         * src/rec-rset.c (rec_rset_compare_typed_records): New function.
2081         (rec_rset_record_compare_fn): Use rec_rset_compare_typed_records.
2083 2012-05-16  Jose E. Marchesi  <jemarch@gnu.org>
2085         doc,manual: document the sorting with several fields.
2086         * utils/recsel.c (recutl_print_help): Document that -S now gets a
2087         FIELDS argument.
2088         * utils/rec2csv.c (recutl_print_help): Likewise.
2089         * doc/recutils.texi (recsel Invocation): Likewise.
2090         (rec2csv Invocation): Likewise.
2091         (%sort): Document that several fields can be used as sorting
2092         criteria.
2094 2012-05-16  Jose E. Marchesi  <jemarch@gnu.org>
2096         torture: tests for sorting with multiple fields.
2097         * torture/utils/recsel.sh (sort-multiple): New input file.
2098         (recsel-sort-multiple): New test.
2099         (recsel-sort-field-multiple): Likewise.
2101         * torture/utils/recfix.sh (unsorted-multiple): New input file.
2102         (recfix-sort-multiple): New test.
2104 2012-05-16  Jose E. Marchesi  <jemarch@gnu.org>
2106         src,utils: implementation for sorting with multiple fields.
2107         * src/rec-fex.c (rec_fex_parse_str_simple): Initialize
2108         function_name, function_data and rewrite_to to NULL.
2110         * utils/rec2csv.c: rec2csv_sort_by_fields is now a fex.
2111         (rec2csv_process_data): Pass the fex to rec_rset_sort.
2113         * utils/recsel.c: recutl_sort_by_fields is now a fex.
2114         (recsel_parse_args): Handle several field names in -S.
2115         (recsel_process_data): Pass the fex to rec_db_query.
2117         * src/rec-db.c (rec_db_query): The sort_by parameter is now a fex.
2119         * src/rec-rset.c (rec_rset_record_compare_fn): Use
2120         rec_type_values_cmp.
2121         (rec_rset_record_compare_fn): Rewritten to work on multiple
2122         fields.
2124         * src/rec-types.c (rec_type_values_cmp): New function.
2125         (REC_TYPE_BOOL_TRUE_VALUES_RE): New constant.
2126         (REC_TYPE_BOOL_FALSE_VALUES_RE): Likewise.
2127         (REC_TYPE_BOOL_VALUE_RE): Use REC_TYPE_BOOL_TRUE_VALUES_RE and
2128         REC_TYPE_BOOL_FALSE_VALUES_RE.
2130         * src/rec-int.c (rec_int_check_descriptor): The %sort special
2131         field now acccepts a simple_fex as its value.
2133         * src/rec-rset.c (rec_rset_update_field_props): Use fexes as
2134         order_by fields.
2136         * src/rec-rset.c (rec_rset_dup): Use rec_fex_dup to duplicate the
2137         fex containing the sort_by fields.
2138         (rec_rset_set_order_by_field): Get a fex.
2139         (rec_rset_order_by_field): Return a fex.
2140         (rec_rset_sort): Get a fex.
2142         * src/rec-fex.c (rec_fex_dup): New function.
2144         * src/rec-rset.c (rec_rset_s): order_by_fields is now a fex.
2145         (REC_RSET_MAX_ORDER): Unused constant removed.
2146         (rec_rset_new): order_by_field renamed to order_by_fields.
2147         (rec_rset_destroy): Destroy rset->order_by_fields with
2148         rec_fex_destroy.
2150 2012-05-08  Jose E. Marchesi  <jemarch@gnu.org>
2152         * doc/recutils.texi (recsel Grouping): New section documenting the
2153         -G operation.
2155 2012-05-05  Jose E. Marchesi  <jemarch@gnu.org>
2157         src: new aggregate Avg.
2158         * src/rec-aggregate.c (std_aggregates): New aggregate "avg".
2159         (rec_aggregate_std_avg): New function.
2160         (rec_aggregate_std_avg_record): Likewise.
2162 2012-05-05  Jose E. Marchesi  <jemarch@gnu.org>
2164         src: improvements in the aggregates implementation to avoid code
2165         duplication.
2166         * src/rec-aggregate.c: New global variable std_aggregates
2167         containing descriptors for the standard aggregates.
2168         (rec_aggregate_reg_add_standard): Use std_aggregates.
2169         (rec_aggregate_std_p): Likewise.
2170         (REC_AGGREGATE_ACCUM_FUNC): New macro.
2172 2012-05-03  Jose E. Marchesi  <jemarch@gnu.org>
2174         src: new aggregates min and max.
2175         * src/rec-aggregate.c (rec_aggregate_std_min): New function.
2176         (rec_aggregate_std_min_record): Likewise.
2177         (rec_aggregate_std_max): Likewise.
2178         (rec_aggregate_std_max_record): Likewise.
2179         (rec_aggregate_reg_add_standard): Register aggregates 'Min' and
2180         'Max'.
2181         (rec_aggregate_std_p): Likewise.
2183         gnulib module minmax imported.
2185 2012-05-03  Jose E. Marchesi  <jemarch@gnu.org>
2187         src,utils: recsel now complains if a non-existing aggregate
2188         function is called in a fex.
2189         * utils/recsel.c (recsel_parse_args): Check for the validity of
2190         the aggregate functions used in the field expressions.
2192         * src/rec-aggregate.c (rec_aggregate_std_p): New function.
2194 2012-05-03  Jose E. Marchesi  <jemarch@gnu.org>
2196         gnulib module floor imported.
2198 2012-05-03  Jose E. Marchesi  <jco@terma.com>
2200         src: aggregate function names are case-insensitive.
2201         * src/rec-aggregate.c (rec_aggregate_reg_get): Be case-insensitive
2202         when retrieving functions from a registry.
2204 2012-05-03  Jose E. Marchesi  <jco@terma.com>
2206         src: implementation of the SUM aggregate.
2207         * src/rec-aggregate.c (rec_aggregate_std_sum): New function.
2208         (rec_aggregate_std_sum_record): Likewise.
2210 2012-05-03  Jose E. Marchesi  <jco@terma.com>
2212         src: sort after grouping so -S works with -G.
2213         * src/rec-db.c (rec_db_query): Sort after grouping, so -S works
2214         with -G.
2216 2012-05-03  Jose E. Marchesi  <jco@terma.com>
2218         src: new semantics and interfaces for aggregates.
2219         * src/rec-db.c (rec_db_process_fex): Use _ to separate the
2220         function name and the field name when generating names for
2221         aggregated fields.
2223         * src/rec-fex.c (rec_fex_all_calls_p): New function.
2225         * src/rec-aggregate.c (rec_aggregate_std_count): Rewritten with
2226         new semantics.
2228 2012-05-03  Jose E. Marchesi  <jco@terma.com>
2230         src: don't allow subscripts in the fields passed to function calls
2231         in fexes and aggregates.
2232         * src/rec.h: rec_aggregate_t modified to not get min and max
2233         arguments.
2234         (REC_FEX_CALL): Don't allow subscripts in the field names used in
2235         the function calls.
2237         * src/rec-aggregate.c (rec_aggregate_std_count): Don't get 'min'
2238         and 'max' arguments.
2240 2012-05-03  Jose E. Marchesi  <jco@terma.com>
2242         src: field functions renamed to aggregates.
2243         * src/rec-aggregate.c (rec_aggregate_std_count): Return a char*
2244         instead of a record.
2246         * src/rec-db.c (struct rec_db_s): Field functions_reg renamed to
2247         aggregates.
2249         * src/Makefile.am (librec_la_SOURCES): rec-func.c is now called
2250         rec-aggregate.c.
2252         * src/rec-aggregate.c: Renamed from src/rec-func.c, and all
2253         rec_func_* symbols renamed to rec_aggregate_*.
2255         * src/rec.h: rec_func_t modified to return a string instead of a
2256         record and renamed to rec_aggregate_t.
2258         * src/rec-db.c (rec_db_query): Perform the group-by operation
2259         before the selection.
2261 2012-04-27  Jose E. Marchesi  <jemarch@gnu.org>
2263         src,utils: implementation of field functions, and Count.
2264         * src/rec-record.c (rec_record_contains_field): New function.
2266         * src/rec-rset.c (rec_rset_merge_records): The merge operation
2267         must not create duplicated fields on the resulting record.
2269         * src/rec-db.c (rec_db_new): Add standard field functions to the
2270         database functions registry.
2272         * src/rec-func.c (rec_func_reg_add_standard): New function.
2273         (rec_func_std_count): New function.
2275         * src/Makefile.am (librec_la_SOURCES): Added rec-func.c
2277         * src/rec-db.c (rec_db_s): New field 'functions_reg'.
2278         (rec_db_new): Initialize the functions register of the database.
2279         (rec_db_destroy): Dispose the memory used by the functions
2280         register when destroying the databse.
2281         (rec_db_functions): New function.
2283         * utils/recutl.c (recutl_build_db): Return NULL if there is not
2284         enough memory to create the database.
2286         * src/rec-func.c (rec_func_reg_s): New structure.
2287         (rec_type_reg_new): New function.
2288         (rec_func_reg_destroy): Likewise.
2289         (rec_func_reg_add): Likewise.
2290         (rec_func_reg_et): Likewise.
2292         * src/rec-fex.c (rec_fex_elem_function_data): New function.
2293         (rec_fex_elem_s): New field function_data.
2294         (rec_fex_parse_elem): Initialize function_data to NULL.
2296         * src/rec.h: Data types and functions declarations for the field
2297         functions and the function registries.
2299         * src/rec-func.c: New file.
2301         * src/rec-record.c (rec_record_append): New function.
2303         * src/rec-db.c (rec_db_process_fex): Fetch and invoke the
2304         corresponding field functions if the fex contains function calls.
2306         * src/rec-fex.c (rec_fex_elem_s): New member function_name.
2307         (rec_fex_parse_elem): Parse function calls.
2308         (rec_fex_elem_function_name): New function.
2310 2012-04-22  Jose E. Marchesi  <jemarch@gnu.org>
2312         * src/rec.h (REC_FEX_FNAME): New constant.
2313         (REC_FEX_CALL): Likewise.
2314         (REC_FNAME_FEX_RE): Modified to allow call entries.
2316 2012-04-22  Jose E. Marchesi  <jemarch@gnu.org>
2318         syntax-check fixes.
2319         * python/recmodule.c: Include config.h
2321 2012-04-22  Jose E. Marchesi  <jemarch@gnu.org>
2323         src: support for >= and <= in selection expressions.
2324         * torture/utils/recsel.sh (rec-sex-integer-lessequalthan): New
2325         test.
2326         (rec-sex-integer-greaterequalthan): Likewise.
2328         * src/rec-sex.c (rec_sex_eval_node): Semantics of REC_SEX_OP_GTE
2329         and REC_SEX_OP_LTE implemented.
2331         * src/rec-sex-ast.h (rec_sex_ast_node_type_e): New entries
2332         REC_SEX_OP_LTE and REC_SEX_OP_GTE.
2334         * src/rec-sex-tab.y: New tokens REC_SEX_TOK_LTE and
2335         REC_SEX_TOK_GTE.
2336         (exp): Rules for the >= and <= infix operators.
2338         * src/rec-sex-lex.l ("<="): New rule.
2339         (">="): Likewise.
2341 2012-04-18  Jose E. Marchesi  <jemarch@gnu.org>
2343         doc: new CSS file adapted from lilypond.
2344         * doc/css/recutils-manuals.css: New file, adapted from
2345         lilypond-manuals.css.
2347 2012-04-17  Jose E. Marchesi  <jemarch@gnu.org>
2349         manual: missing documentation added for some command line options,
2350         and inconsistencies removed.
2351         * utils/recfix.c (recutl_print_help): Don't document -t|--type,
2352         because it is not yet implemented.
2354         * doc/recutils.texi (recinf Invocation): Document that -S is the
2355         short form for --print-sexps.
2356         (recsel Invocation): Document -i|--case-insensitive.
2357         (recdel Invocation): Likewise.
2358         (recins Invocation): Document the --force command line option.
2359         (recfix Invocation): Likewise.
2360         (recdel Invocation): -f is not an alias for --force.
2362 2012-04-17  Jose E. Marchesi  <jemarch@gnu.org>
2364         manual: documentation for field expressions fixed.
2365         * doc/recutils.texi (Field Expressions): Documentation fixed in
2366         order to reflect the fact that it is possible to repeat the same
2367         field in the same field expression.
2369 2012-04-17  Jose E. Marchesi  <jemarch@gnu.org>
2371         src: make the string comparison operators case-insensitive in
2372         selection expressions when requested.
2373         * torture/utils/recsel.sh (rec-sex-string-equal): New test.
2374         (rec-sex-string-non-equal): Likewise.
2375         (rec-sex-string-equal-insensitive): Likewise.
2376         (rec-sex-string-non-equal-insensitive): Likewise.
2378         * src/rec-sex.c (rec_sex_eval_node): Make the = and != operators
2379         case insensitive with strings when applicable.
2381 2012-04-17  Jose E. Marchesi  <jemarch@gnu.org>
2383         utils,doc: fix the --number command line option.
2384         * torture/utils/recsel.sh (recsel-index-long): New test.
2386         * utils/recutl.h (RECORD_SELECTION_LONG_ARGS): The long version of
2387         -n is --number, not --num.
2389         * doc/recutils.texi (recsel Invocation): Document --number as the
2390         long version of -n.
2391         (recins Invocation): Likewise.
2392         (recdel Invocation): Likewise.
2393         (recset Invocation): Likewise.
2395 2012-04-16  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
2397         src,utils: fix several memory leaks.
2398         * src/rec-field.c (rec_field_destroy): Free the value, like the
2399         other structure members.
2401         * src/rec-mset.c (rec_mset_destroy): Free type names and the mset
2402         when destroying it.
2404         * src/rec-parser.c (rec_parse_field): Free field name and value
2405         after setting them, since only copies are used later.
2407         * utils/recutl.c (recutl_parse_db_from_file): Destroy the parser
2408         after using it.
2410 2012-04-17  Jose E. Marchesi  <jco@terma.com>
2412         src: weird duplication of the file contens in rec-crypt-dummy.c
2413         fixed.
2414         * src/rec-crypt-dummy.c: Weird duplication of file fixed.  WTF...
2416 2012-04-15  Jose E. Marchesi  <jemarch@gnu.org>
2418         * doc/recutils.texi (Common Options): Typo fixed.
2420 2012-04-09  Jose E. Marchesi  <jemarch@gnu.org>
2422         rec-mode: don't use a fixed list of keywords when font-locking
2423         special fields and other minor fixes.
2424         * etc/rec-mode.el (rec-mode): Don't go into navigation mode if the
2425         file is empty.
2426         (rec-keyword-prefix): New constant.
2427         Copyright years list updated.
2428         (rec-font-lock-keywords): Recognize as special fields any field
2429         whose name starts with %.
2431 2012-04-09  Daiki Ueno  <ueno@unixuser.org>
2433         rec-mode: fix error when rec-finish-editing on newly created file.
2434         * etc/rec-mode.el (rec-update-buffer-descriptors): Don't assume
2435         that the current buffer is already saved on the disk.
2437 2012-04-04  Daiki Ueno  <ueno@unixuser.org>
2439         src: use a pinch of salt when encrypting confidential fields.
2440         * src/rec-crypt.c (rec_encrypt): Insert a random salt to improve
2441         security.
2442         (rec_decrypt): Extract the salt of the encrypted data.
2444 2012-04-03  Daiki Ueno  <ueno@unixuser.org>
2446         src: several leaks fixed in rec-crypt.c.
2447         * src/rec-crypt.c (rec_encrypt): Avoid leaks by properly closing
2448         the gcrypt handlers in case of errors.
2450 2012-03-27  MichaÅ‚ MasÅ‚owski  <mtjm@mtjm.eu>
2452         src: always provide encryption routines and their prototypes.
2453         * src/Makefile.am [!CRYPT]: Build rec-crypt-dummy.c instead of
2454         rec-crypt.c if encryption is disabled.
2455         * src/rec-crypt-dummy.c: New file.
2456         * src/rec.h: Unconditionalize encryption routine declarations.
2458 2012-03-13  Jose E. Marchesi  <jemarch@gnu.org>
2460         * src/rec.h (GNU_REC_H): Sentinel of the header file renamed from
2461         REC_H in order to avoid potential conflicts.
2463 2012-03-07  Jose E. Marchesi  <jemarch@gnu.org>
2465         torture: some system tests for the recsel join functionality.
2466         * torture/utils/recsel.sh (recsel-join-default-rset): New test.
2467         (recsel-join-no-foreign): Likewise.
2469 2012-03-04  Giuseppe Scrivano  <gscrivano@gnu.org>
2471         src,lib: use the `read-file' module from gnulib.
2472         * lib/read-file.h: Imported from gnulib.
2473         * lib/read-file.c: Likewise.
2474         * utils/recutl.c (recutl_read_file): Call `fread_file' instead
2475         of reimplementing it.
2477 2012-03-02  Giuseppe Scrivano  <giuseppe@southpole.se>
2479         src: make some variables static.
2480         * utils/recutl.c (recutl_sort_p): Make it static.
2481         (recutl_order_rset): Likewise.
2482         (recutl_order_by_field): Likewise.
2483         (recutl_interactive_p): Likewise.
2484         (recutl_indexes): Likewise.
2485         (recutl_indexes_size): Likewise.
2487 2012-03-02  Jose E. Marchesi  <jemarch@gnu.org>
2489         * doc/recutils.texi (recsel Invocation): Document -j|--join.
2491 2012-03-02  Jose E. Marchesi  <jco@terma.com>
2493         src: partial implementation of rset mixing in joins.
2494         * src/rec-db.c (rec_db_join): Add a record descriptor to the
2495         joined record set.
2497 2012-03-01  Jose E. Marchesi  <jemarch@gnu.org>
2499         src: make the # operator to work with field subnames.
2500         * src/rec-fex.c (rec_fex_parse_elem): Use rec_concat_strings.
2502         * src/rec-utils.c (rec_concat_strings): New function.
2504         * src/rec-sex.c (rec_sex_eval_node): Use the subname of the name
2505         node, if present, in the evaluation of OP_SHA operations.
2507         * torture/utils/recsel.sh (package-maintainers): New input file.
2508         (recsel-sex-sharp-subname): New test.
2510 2012-03-01  Jose E. Marchesi  <jemarch@gnu.org>
2512         src: support for field subnames with dot notation in fexes.
2513         * src/rec-fex.c (rec_fex_parse_elem): Support subnames in fexes.
2515         * src/rec.h (REC_FNAME_FEX_RE): New constant.
2517 2012-03-01  Jose E. Marchesi  <jemarch@gnu.org>
2519         src,torture: fix a bug that caused to have empty records in query
2520         results.
2521         * torture/utils/recsel.sh (recsel-nonexistent-print): New test.
2523         * src/rec-db.c (rec_db_query): Do not add empty records to the
2524         result record set.
2526 2012-03-01  Jose E. Marchesi  <jemarch@gnu.org>
2528         src,utils: inner join implementation.
2529         * src/rec-db.c (rec_db_merge_records): New function.
2531         * utils/recsel.c (recsel_join): New global.
2532         (recutl_print_help): Include help for -j.
2533         (recsel_parse_args): Process the new command line option
2534         -j|--join.
2535         (recsel_process_data): Invoke rec_db_query with the proper join
2536         option.
2538         * src/rec-db.c (rec_db_query): Get a 'join' argument.
2540 2012-03-01  Jose E. Marchesi  <jemarch@gnu.org>
2542         src,torture,doc: implementation of the 'rec' field type.
2543         * doc/recutils.texi (Other types): Documentation for the 'rec'
2544         field type.
2546         * torture/utils/recfix.sh (type-rec-norset): New input file.
2547         (type-rec-nokey): Likewise.
2548         (type-rec-key-notype): Likewise.
2549         (type-rec-key-type): Likewise.
2550         (type-rec-key-type-invalid): Likewise.
2551         (recfix-type-rec-norset): New test.
2552         (recfix-type-rec-nokey): Likewise.
2553         (recfix-type-rec-key-notype): Likewise.
2554         (recfix-type-rec-type): Likewise.
2555         (recfix-type-rec-key-type-invalid): Likewise.
2557         * src/rec-int.c (rec_int_check_field_type): Check using the type
2558         of the key of the referred record set (if any) if the field is of
2559         type 'rec'.
2561         * src/rec-rset.c (rec_rset_fprops_s): New property key_p.
2562         (rec_rset_update_field_props): Reset key_p.
2563         (rec_rset_get_props): Initialize key_p.
2564         (rec_rset_update_field_props): Update the key_p property.
2565         (rec_rset_key): New function.
2567         * src/rec-types.c (rec_type_rec): New function.
2569         * torture/utils/recfix.sh (type-rec-valid): New input file.
2570         (type-rec-invalid-empty): Likewise.
2571         (type-rec-invalid-malformed): Likewise.
2572         (recfix-type-rec-valid): New test.
2573         (recfix-type-rec-invalid-empty): Likewise.
2574         (recfix-type-rec-invalid-malformed): Likewise.
2576         * src/rec-types.c (REC_TYPE_REC_DESCR_RE): New constant.
2577         (REC_TYPE_DESCR_RE): Updated.
2578         (rec_type_parse_rec): New function.
2579         (rec_type_check_rec): Likewise.
2581         * src/rec-int.c (rec_int_rec_type_p): Use REC_RECORD_TYPE_RE.
2583         * src/rec.h (REC_RECORD_TYPE_RE): New constant.
2585         * src/rec-types.c (REC_TYPE_REC_NAME): New constant.
2586         (REC_TYPE_CLASS_RE): Updated.
2588 2012-02-29  Jose E. Marchesi  <jemarch@gnu.org>
2590         src: support for dot notation in selection expressions.
2591         * src/rec-sex-ast.c (rec_sex_ast_node_s): Name structs now contain
2592         a name and a subname.
2593         (rec_sex_ast_node_set_name): Get a 'subname' argument.
2594         (rec_sex_ast_node_name): Return the name.
2595         (rec_sex_ast_node_destroy): Destroy both name and subname in a
2596         name node.
2597         (rec_sex_ast_node_subname): New function.
2599         * src/rec-sex-lex.l: Rule for field names modified to accept two
2600         field names separated by a dot character.
2601         (rec_sex_lex_extract_subname): New function.
2603 2012-02-29  Jose E. Marchesi  <jemarch@gnu.org>
2605         src: remove obsolete and unused functionality from the rec writer.
2606         * src/rec-writer.c (rec_write_record_with_rset): Function removed.
2607         (rec_write_field_with_rset): Likewise.
2608         (rec_write_field): Don't get a 'name' argument.
2609         (rec_writer_s): Field 'password' removed.
2610         (rec_writer_new_common): Don't initialize password.
2611         (rec_write_field): Encryption support removed.
2612         (rec_writer_set_password): Function removed.
2614         * torture/Makefile.am (REC_WRITER_TSUITE): Tests for
2615         rec_write_record_with_fex removed.
2617         * src/rec-writer.c (rec_write_record_with_fex): Function removed.
2618         * utils/recutl.c (recutl_eval_field_expression): Likewise.
2620 2012-02-29  Jose E. Marchesi  <jemarch@gnu.org>
2622         torture: failing unit test adapted to new API.
2623         * torture/rec-writer/rec-write-rset.c: Add the 'mode' argument
2624         when calling rec_write_rset.
2626 2012-02-29  Jose E. Marchesi  <jemarch@gnu.org>
2628         src,utils: set high-level logic moved to librec and recset
2629         adapted.
2630         * utils/recset.c (recset_process_add): Function removed.
2631         (recset_process_set): Likewise.
2632         (recset_process_ren): Likewise.
2633         (recset_process_del): Likewise.
2634         (recset_process_actions): Use the new function in the library.
2636         * src/rec-db.c (rec_db_set): New function.
2637         (rec_db_set_act_rename): Likewise.
2638         (rec_db_set_act_set): Likewise.
2639         (rec_db_set_act_add): Likewise.
2640         (rec_db_set_act_delete): Likewise.
2642 2012-02-29  Jose E. Marchesi  <jemarch@gnu.org>
2644         src,utils: query, insert and delete high-level logic moved to
2645         librec and utilities adapted.
2646         * torture/utils/recdel.sh (recdel-index-list): New test.
2647         (recdel-case-insensitive): Likewise.
2648         (recdel-case-sensitive): Likewise.
2650         * src/rec-db.c (rec_db_delete): New function.
2652         * torture/utils/recins.sh (multiple-records-case): New input file.
2653         (recins-case-insensitive): New test.
2654         (recins-case-sensitive): New test.
2656         * src/rec-rset.c (rec_rset_set_type): Get a const char* for the
2657         'type' argument.
2659         * src/rec-db.c (rec_db_insert): New function.
2661         * torture/utils/recsel.sh (recsel_descriptor): New test.
2663         * src/rec-writer.c (rec_writer_s): New field "collapse_p".
2664         (rec_writer_new_common): Writers don't collapse output by default.
2665         (rec_writer_set_collapse): New function.
2667         * utils/recutl.c (recutl_indexes): Global is now a pointer to
2668         size_t.
2669         (recutl_init): Initialize recutl_indexes.
2670         (recutl_index_p): Removed.
2671         (recutl_index_add_random): Likewise.
2672         (recutl_reset_indexes): Adapted to *size_t.
2673         (recutl_num_indexes): Likewise.
2674         (recutl_index): New function.
2676         * src/rec-writer.c (rec_write_rset): Get a 'mode' argument.
2678         * src/rec-db.c (rec_db_query): Uniq the records if requested by
2679         the user.
2681         * utils/recsel.c (recsel_parse_args): Set recsel_write_mode when
2682         -P and -R are found.
2683         (recsel_print_values): Global removed.
2684         (recsel_print_row): Global removed.
2686 2012-02-28  Jose E. Marchesi  <jemarch@gnu.org>
2688         src,utils,torture: new writer modes values and values_row, and
2689         some improvements in the writer algorithms.
2690         * utils/recutl.c (recutl_write_db_to_file): Write the db into the
2691         file only if there are record sets to write.  Otherwise create an
2692         empty file.
2694         * src/rec-writer.c (rec_write_string): New function.
2696         * torture/rec-writer/rec-write-comment.c
2697         (rec_write_comment_nominal): Added test with three lines.
2699         * torture/rec-writer/rec-write-record.c (rec_write_record_values):
2700         New unit test.
2701         (rec_write_record_values_row): Likewise.
2703         * torture/rec-writer/rec-write-field.c (rec_write_field_values):
2704         New unit test.
2705         (rec_write_field_values_row): Likewise.
2707         * src/rec-writer.c (rec_write_field_with_rset): Implement
2708         REC_WRITER_VALUES and REC_WRITER_VALUES_ROW semantics.
2710         * src/rec.h (rec_writer_mode_e): New write modes REC_WRITER_VALUES
2711         and REC_WRITER_VALUES_ROW.
2713 2012-02-28  Jose E. Marchesi  <jemarch@gnu.org>
2715         src: random indexes support added to rec_db_query.
2716         * src/rec-db.c (rec_db_query): Get an INDEX paramerter pointing to
2717         a list of index intervals.
2718         (rec_db_record_selected_p): Likewise.
2719         (rec_db_record_selected_p): Handle indexes.
2720         (rec_db_add_random_indexes): New function.
2721         (rec_db_indexes_p): New function.
2723 2012-02-28  Jose E. Marchesi  <jemarch@gnu.org>
2725         src: first version of rec_db_query.
2726         * src/rec-db.c (rec_db_query): New function.
2727         (rec_db_process_fex): New function.
2728         (rec_db_record_selected_p): New function.
2730         * src/rec.h: Prototype for rec_db_query.
2732 2012-02-27  Jose E. Marchesi  <jemarch@gnu.org>
2734         src: small changes in rec-db.
2735         * src/rec-db.c (rec_db_s): Field 'size' is now of type size_t.
2736         (rec_db_destroy): Be a no-operation if NULL is passed.
2737         (rec_db_size): Return a size_t value.
2738         (rec_db_get_rset): The 'position' argument is now a size_t.
2739         (rec_db_insert_rset): Likewise.
2740         (rec_db_remove_rset): Likewise.
2741         (rec_db_type_p): Get a const char* argument.
2743 2012-02-27  Jose E. Marchesi  <jemarch@gnu.org>
2745         torture: fix offline make perf.
2746         * torture/utils/Makefile.am (perf): Invoke $(srcdir)/p-recsel.sh
2747         and set srcdir.
2749 2012-02-26  Jose E. Marchesi  <jemarch@gnu.org>
2751         python: start of the python bindings for librec.
2752         * python/README: New file.
2753         * python/setup.py: Likewise.
2754         * python/recmodule.c: Likewise.
2755         (prec_version): New function.
2756         (initrec): Likewise.
2757         (prec_functions): New global.
2759 2012-02-26  Jose E. Marchesi  <jemarch@gnu.org>
2761         src,doc,torture: support for UUID field type and UUID auto fields.
2762         * torture/utils/config.sh.in (UUID_SUPPORT): Set to @have_uuid@.
2764         * torture/utils/recfix.sh (uuid-fields-ok): New input file.
2765         (uuid-fields-invalid): Likewise.
2766         (recfix-uuid-ok): New test.
2767         (recfix-uuid-invalid): Likewise.
2769         * doc/recutils.texi (Other types): UUID type documented.
2770         (%auto): Likewise.
2772         * src/rec-int.c (rec_int_check_descriptor): Allow auto-incremented
2773         fields of type uuid if suuport for uuids is compiled in.
2775         * src/rec-rset.c (rec_rset_add_auto_fields): Handle REC_TYPE_UUID.
2776         (rec_rset_add_auto_field_uuid): New function.
2778         * src/rec.h (rec_type_kind_e): Added entry REC_TYPE_UUID.
2780         * src/rec-types.c (REC_TYPE_UUID_NAME): New constant.
2781         (REC_TYPE_CLASS_RE): Add REC_TYPE_UUID_NAME.
2782         (rec_type_check_uuid): New function.
2783         (rec_type_new): Handle REC_TYPE_UUID.
2784         (rec_type_kind_str): Likewise.
2785         (rec_type_check): Likewise.
2786         (rec_type_parse_type_kind): Likewise.
2788         * src/Makefile.am (librec_la_LIBADD): link with UUIDLIBS when
2789         appropriate.
2791         * configure.ac: Check for libuuid and subst UUIDLIBS.
2792         Define the automake conditional UUID_TYPE.
2794         * README-dev: List the dependency on libuuid.
2796 2012-02-26  Jose E. Marchesi  <jemarch@gnu.org>
2798         src,doc,torture: support for rewrite rules in field expressions.
2799         * torture/utils/recsel.sh (recsel-fex-rewrite-all): New test.
2800         (recsel-fex-rewrite-subscript-single): Likewise.
2801         (recsel-fex-rewrite-subscript-multi): Likewise.
2802         (recsel-fex-rewrite-several): Likewise.
2804         * torture/rec-fex/rec-fex-elem-rewrite-to.c
2805         (rec_fex_elem_field_rewrite_to_default): New unit test.
2806         (rec_fex_elem_field_rewrite_to_nominal): Likewise.
2808         * torture/Makefile.am (REC_FEX_TSUITE): Added
2809         rec-fex/rec-fex-elem-field-rewrite-to.c.
2811         * torture/rec-fex/tsuite-rec-fex.c (tsuite_rec_fex): Added
2812         test_rec_fex_elem_rewrite_to.
2814         * torture/rec-fex/rec-fex-elem-rewrite-to.c: New file.
2815         (test_rec_fex_elem_rewrite_to): New function.
2817         * doc/recutils.texi (Field Expressions): Documentation for rewrite
2818         rules added.
2820         * torture/rec-writer/rec-write-field.c (rec_write_field_rewrite):
2821         New unit test.
2822         (rec_write_field_sexp_rewrite): Likewise.
2824         * src/rec-writer.c (rec_write_record_with_fex): Invoke
2825         rec_write_field passing the rewrite_to property of the fex elem.
2826         (rec_write_field): Get an extra argument 'name'.
2827         (rec_write_field_with_rset): Likewise.
2828         (rec_write_record_with_rset): Adapt to new
2829         rec_write_field_with_rset.
2830         (rec_write_field_str): Likewise.
2832         * src/rec-fex.c (rec_fex_parse_elem): The 'str' field must contain
2833         a copy of the textual entry (including rewrite rules and
2834         subscripts) and not just the field name.
2835         (rec_fex_elem_rewrite_to): New function.
2837         * src/rec.h (REC_FNAME_SUB_RE): Allow the inclusion of a rewrite
2838         rule at the end of the entry.
2840         * src/rec-fex.c (rec_fex_elem_s): New field 'rewrite_to'.
2841         (rec_fex_parse_elem): Parse the rewrite rule if it is present in
2842         the fex entry.
2844 2012-02-26  Jose E. Marchesi  <jemarch@gnu.org>
2846         * TESTS: Regenerated.
2848 2012-02-26  Jose E. Marchesi  <jemarch@gnu.org>
2850         torture: performance tests for recsel using a sex with regexp
2851         matching.
2852         * torture/utils/p-recsel.sh (recsel-200-records-sex-regexp): New
2853         test.
2854         (recsel-500-records-sex-regexp): Likewise.
2855         (recsel-1000-records-sex-regexp): Likewise.
2856         (recsel-10000-records-sex-regexp): Likewise.
2857         (recsel-20000-records-sex-regexp): Likewise.
2859 2012-02-25  Jose E. Marchesi  <jemarch@gnu.org>
2861         torture: support for performance test, and some performance recsel
2862         tests.
2863         * torture/utils/testutils.sh: Get a second parameter 'perf'.
2864         (test_tool): Calculate and print timing statistics if $perf is not
2865         empty.
2867         * torture/utils/p-recsel.sh: New file.
2869         * torture/utils/Makefile.am (perf): New rule.
2870         * Makefile.am (perf): Likewise.
2872 2012-02-25  Jose E. Marchesi  <jemarch@gnu.org>
2874         utils: fix short option for --random in help strings.
2875         * utils/recutl.c (recutl_print_help_record_selection): The short
2876         command line option for --random is -m not -R.
2878 2012-02-25  Jose E. Marchesi  <jemarch@gnu.org>
2880         src,utils,torture: support for compound field names removed, and
2881         code cleanup.
2882         * torture/utils/recset.sh (recset-rename-all-key): Don't use a
2883         compound field name.
2885         * doc/recutils.texi (Compound Field Names): Section removed,
2886         because it is now obsolete.
2887         (mdb2rec Examples): Removed examples involving compound field
2888         names.
2890         * src/rec.h (REC_FNAME_RE): Remove the trailing colon.
2892         * torture/utils/recsel.sh (compound-names): Input file removed,
2893         since there are not compound names anymore.
2894         (recsel-sex-field-names): Test removed.
2895         (recsel-sex-field-names-2): Likewise.
2897         * src/rec-sex-lex.l (FIELD_NAME): Set to contain just one name
2898         part.
2900         * src/rec-fex.c (rec_fex_parse_str_simple): Remove the trailing :
2901         from the field names if present.
2902         (rec_fex_parse_elem): Likewise.
2904         * torture/rec-fex/rec-fex-elem-field-name-str.c: Removed.
2906         * torture/rec-field-name/rec-field-name-p.c: Renamed.
2908         * torture/rec-field-name/rec-field-name-normalise.c: Renamed from
2909         rec-field-name-part-normalise.c.
2911         * torture/rec-field-name/rec-field-name-destroy.c: File removed.
2912         * torture/rec-field-name/rec-field-name-str-p.c: Likewise.
2913         * torture/rec-field-name/rec-field-name-size.c: Likewise.
2914         * torture/rec-field-name/rec-field-name-set.c: Likewise.
2915         * torture/rec-field-name/rec-field-name-ref-p.c: Likewise.
2916         * torture/rec-field-name/rec-field-name-new.c: Likewise.
2917         * torture/rec-field-name/rec-field-name-get.c: Likewise.
2918         * torture/rec-field-name/rec-field-name-eql-p.c: Likewise.
2919         * torture/rec-field-name/rec-field-name-dup.c: Likewise.
2921         * torture/rec-field-name/tsuite-rec-field-name.c: Removed test
2922         cases for the no longer existing rec_field_name_* functions.
2924         * utils/recins.c (recins_parse_args): Adapted to the new field
2925         names.
2926         * utils/mdb2rec.c (get_field_name): Likewise.
2927         (process_table): Likewise.
2928         * utils/rec2csv.c (rec2csv_parse_args): Likewise.
2929         (rec2csv_generate_csv): Likewise.
2930         * utils/csv2rec.c (field_cb): Likewise.
2931         * utils/recset.c (recset_process_add): Likewise.
2932         (recset_process_set): Likewise.
2933         (recset_process_ren): Likewise.
2934         (recset_process_del): Likewise.
2936         * utils/recutl.c (recutl_order_by_field): Field name is now a NULL
2937         terminated string.
2938         * utils/recsel.c (recutl_sort_by_field): Likewise.
2939         (recsel_group_by_field): Likewise.
2941         * src/rec-types.c (rec_type_check_int): Get a const char*
2942         argument.
2943         (rec_type_check_bool): Likewise.
2944         (rec_type_check_range): Likewise.
2945         (rec_type_check_real): Likewise.
2946         (rec_type_check_size): Likewise.
2947         (rec_type_check_line): Likewise.
2948         (rec_type_check_regexp): Likewise.
2949         (rec_type_check_date): Likewise.
2950         (rec_type_check_email): Likewise.
2951         (rec_type_check_enum): Likewise.
2952         (rec_type_check_field): Likewise.
2954         * src/rec-crypt.c (rec_encrypt): Get const char* arguments.
2955         (rec_decrypt): Likewise.
2956         (rec_decrypt_field): Likewise.
2957         (rec_decrypt_record): Likewise.
2958         (rec_encrypt_field): Likewise.
2960         * src/rec-sex-parser.c (rec_sex_parser_set_in): Get a const char *
2961         argument.
2962         (rec_sex_parser_run): Likewise.
2964         * src/rec-sex.c (rec_sex_destroy): Be a no-operation if NULL is
2965         passed.
2966         (rec_sex_compile): Get a const char * argument.
2967         (rec_sex_eval_node): Adapted to new field names.
2969         * src/rec-int.c (rec_int_rec_type_p): Get a const char * argument.
2970         (rec_int_rec_type_p): Use REC_FNAME_RE instead of
2971         REC_FNAME_PART_RE.
2973         * src/rec-types.c (rec_type_check): Get a const char * argument.
2975         * src/rec-int.c (rec_int_check_field_type): Simplified, since
2976         there are no compound field names anymore.
2977         (rec_int_check_record_mandatory): Adapted to the new field names.
2978         (rec_int_check_record_unique): Likewise.
2979         (rec_int_check_record_prohibit): Likewise.
2980         (rec_int_check_record_key): Likewise.
2981         (rec_int_check_descriptor): Likewise.
2983         * src/rec-writer.c (rec_writer_destroy): Be a no-operation if NULL
2984         is passed.
2985         (rec_write_field_with_rset): Adapted to the new field names.
2986         (rec_write_field_name): Likewise.
2987         (rec_write_record_with_fex): Likewise.
2989         * src/rec-parser.c (rec_parser_new): Get a const char* argument.
2990         (rec_parser_new_str): Likewise.
2991         (rec_parser_destroy): Be a no-operation if a NULL pointer is
2992         passed.
2993         (rec_parse_field_name): Store the field name in a char string.
2994         (rec_parse_field_name_part): Removed.
2995         (rec_parse_field): Adapted to the new field names.
2996         (rec_parse_field_name_str): Removed.
2997         (rec_parse_field_name_str): Return a char*.
2998         (rec_parse_record_str): Get a const char* argument.
3000         * src/rec-fex.c (struct rec_fex_elem_s): Use a const char* for the
3001         referred field(s) name.
3002         (rec_fex_init): New function.
3003         (rec_fex_destroy): Be a no-operation if a NULL pointed is passed.
3004         (rec_fex_new): Use const chars* for the field names.
3005         (rec_fex_check): Get const char* parameters for the strings.
3006         (rec_fex_size): Return a size_t.
3007         (rec_fex_elem_field_name): Return a const char *.
3008         (rec_fex_elem_set_field_name): Get a const char * argument and
3009         return a boolean denoting out-of-memory.
3010         (rec_fex_elem_field_name_str): Removed.
3011         (rec_fex_member_p): Get a const char * argument for the field
3012         names.
3013         (rec_fex_append): Likewise.
3014         (rec_fex_parse_str_simple): Get const char* arguments for the
3015         strings.
3016         (rec_fex_parse_str_subscripts): Likewise.
3017         (rec_fex_parse_elem): Likewise.
3019         * src/rec-rset.c (struct rec_rset_fprops_s): fname is now a const
3020         char *.
3021         (struct rec_rset_s): order_by_field is now a const char*.
3022         (rec_rset_order_by_field): Return a const char *.
3023         (rec_rset_destroy): Adapted to the new field names.
3024         (rec_rset_dup): Likewise.
3025         (rec_rset_set_type): Likewise.
3026         (rec_rset_rename_field): Likewise.
3027         (rec_rset_field_confidential_p): Likewise.
3028         (rec_rset_get_field_type): Likewise.
3029         (rec_rset_set_order_by_field): Likewise.
3030         (rec_rset_sort): Likewise.
3031         (rec_rset_group): Likewise.
3032         (rec_rset_record_compare_fn): Likewise.
3033         (rec_rset_update_field_props): Likewise.
3034         (rec_rset_get_props): Likewise.
3035         (rec_rset_add_auto_field_int): Likewise.
3036         (rec_rset_add_auto_field_date): Likewise.
3038         * src/rec-field-name.c (rec_field_name_equal_p): New function.
3040         * src/rec-record.c (rec_record_field_p): Get a const char* for the
3041         field name.
3042         (rec_record_get_num_fields_by_name): Likewise.
3043         (rec_record_get_field_by_name): Likewise.
3044         (rec_record_remove_field_by_name): Likewise.
3045         (rec_record_uniq): Adapted to the new field names.
3047         * src/rec-field.c (rec_field_name_str): Removed.
3048         (rec_field_equal_p): Use strcmp to compare field names.
3049         (rec_field_destroy): Be a no-operation if passed a NULL pointer.
3050         (rec_field_init): New function.
3051         (rec_field_new): Adapted to the new field names, and handle out of
3052         memory eventualities.
3053         (rec_field_dup): Likewise.
3054         (rec_field_to_comment): Handle out-of-memory conditions properly.
3056         * src/rec-field-name.c (rec_field_name_normalise): Renamed from
3057         rec_field_name_part_normalise.
3058         (rec_field_name_p): Renamed from rec_field_name_str_p.
3059         (rec_std_field_name_new): Removed.
3060         (rec_field_name_destroy): Likewise.
3061         (rec_field_name_size): Likewise.
3062         (rec_field_name_get): Likewise.
3063         (rec_field_name_set): Likewise.
3064         (rec_field_name_dup): Likewise.
3065         (rec_field_name_eql_p): Likewise.
3066         (rec_field_name_equal_p): Likewise.
3067         (rec_field_name_ref_p): Likewise.
3068         (rec_field_name_str_p): Likewise.
3069         (rec_field_name_part_str_p): Remove
3070         (rec_std_field_name): Return a const char*.
3072         * src/rec.h (REC_FNAME_PART_RE): Removed.
3073         (rec_field_name_*): Function prototypes removed.
3075         * src/rec-field.c (rec_field_s): Change the 'name' field to be a
3076         NULL terminated string.
3077         (rec_field_name): Return a const char*.
3078         (rec_field_set_name): Get the name as a const char * and return a
3079         boolean indicating out-of-memory.
3080         (rec_field_value): Return a const char*.
3081         (rec_field_source): Return a const char*.
3082         (rec_field_set_source): Get a const char * and return a boolean
3083         indicating out-of-memory.
3084         (rec_field_location_str): Return a const char*.
3085         (rec_field_char_location_str): Return a const char*.
3087 2012-02-24  Jose E. Marchesi  <jemarch@gnu.org>
3089         src: documentation improvements in the public header.
3090         * src/rec.h: Improve the documentation of the functions related
3091         with the rec_field ADT.
3093 2012-02-22  Jose E. Marchesi  <jemarch@gnu.org>
3095         src,utils: handle out-of-memory conditions.
3096         * src/rec-rset.c (rec_rset_add_auto_field_date): Return a boolean
3097         indicating whether there was enough memory to complete the
3098         operation.
3099         (rec_rset_add_auto_field_int): Likewise.
3100         (rec_rset_add_auto_fields): Return a copy of the record set or
3101         NULL in an out-of-memory condition.
3102         (rec_rset_sort): Return a copy of the record set, or NULL in an
3103         out-of-memory condition.
3105         * utils/recsel.c (recsel_process_data): Emit an out of error
3106         message when appropriate.
3107         * utils/recins.c (recins_insert_record): Likewise.
3108         (recins_add_new_record): Likewise.
3109         * utils/recfix.c (recfix_do_auto): Likewise.
3110         (recfix_do_sort): Likewise.
3111         * utils/rec2csv.c (rec2csv_process_data): Likewise.
3113         * src/rec-rset.c (rec_rset_init): New function.
3114         (rec_rset_new): Use rec_rset_init and rec_rset_destroy in
3115         out-of-memory conditions.
3116         (rec_rset_destroy): Be a no-operation if NULL is passed.
3117         (rec_rset_destroy): Also assume that other ADT destructors behave
3118         the same.
3119         (rec_rset_dup): Use rec_rset_init and rec_rset_destroy in
3120         out-of-memory conditions.
3121         (rec_rset_group): Return a copy of RSET or NULL if out of memory.
3122         (rec_rset_merge_records): Return a copy of TO_RECORD, or NULL if
3123         out of memory.
3125         * src/rec-mset.c (rec_mset_destroy): Be a no-op if the passed
3126         pointer is NULL.
3127         (rec_mset_init): New function.
3128         (rec_mset_new): Call to rec_mset_init and rec_mset_destroy if
3129         in an end-of-memory condition.
3130         (rec_mset_dup): Likewise.
3131         (rec_mset_sort): API changed to return false if there is not
3132         enough memory to perform the operation, leaving the original mset
3133         untoched.
3134         (rec_mset_insert_at): Call rec_mset_elem_destroy when out of memory.
3135         (rec_mset_elem_init): New function.
3136         (rec_mset_insert_after): Call rec_mset_elem_destroy when out of
3137         memory.
3138         (rec_mset_add_sorted): Likewise.
3139         (rec_mset_elem_destroy): Be a no-operation if called with NULL.
3141         * src/rec-record.c (rec_record_dup): Use rec_record_init and
3142         rec_record_destroy in out-of-memory conditions.
3143         (rec_record_init): New function.
3144         (rec_record_new): Use rec_record_init.
3145         (rec_record_destroy): Be a no-op if the passed pointer is NULL.
3147         * src/rec-field-name.c (rec_field_name_set): Return false if
3148         strdup returns NULL.
3150         * src/rec-crypt.c (rec_encrypt_field): Return false if strdup
3151         returns NULL.
3153         * src/rec-field.c (rec_field_set_location): Avoid a segmentation
3154         fault if malloc returns NULL.
3156 2012-02-20  Giuseppe Scrivano  <giuseppe@southpole.se> (tiny change)
3158         src,utils: fail gracefully on allocation errors.
3159         * src/rec-parser.c (rec_parse_field): Return an error if `new' was
3160         not allocated correctly.
3161         * utils/recsel.c (main): Fail gracefully if `db' was not allocated
3162         correctly.
3164 2012-01-19  Jose E. Marchesi  <jemarch@gnu.org>
3166         utils: error reporting must always use recutl_fatal or
3167         recutl_error.
3168         * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Use recutl_fatal
3169         instead of fprintf.
3170         (RECORD_SELECTION_ARGS_CASES): Added a trailing \n to an error
3171         message missing it.
3173 2012-01-17  Jose E. Marchesi  <jemarch@gnu.org>
3175         doc: use same optarg names in --help outputs and the manual.
3176         * doc/recutils.texi (recsel Invocation): Use same optarg names
3177         than in the synopsis used in --help.
3178         (recins Invocation): Likewise.
3179         (recdel Invocation): Likewise.
3180         (recset Invocation): Likewise.
3181         * utils/recutl.c (recutl_print_help_record_selection): Likewise.
3183 2012-01-17  Jose E. Marchesi  <jemarch@gnu.org>
3185         doc: make the texinfo documentation easier to find.
3186         * man/Makefile.am (rec2csv.1): Use the 'recutils' manual instead
3187         of the name of the utilities.
3188         (csv2rec.1): Likewise.
3189         (mdb2rec.1): Likewise.
3190         (recdel.1): Likewise.
3191         (recfix.1): Likewise.
3192         (recinf.1): Likewise.
3193         (recins.1): Likewise.
3194         (recsel.1): Likewise.
3195         (recset.1): Likewise.
3196         (recfmt.1): Likewise.
3198         * doc/recutils.texi: Entries for the individual utilities in the
3199         info index.
3201 2012-01-16  Jose E. Marchesi  <jemarch@gnu.org>
3203         src,utils: fixes of typos in message strings.
3204         * src/rec-int.c (rec_int_check_rset): Use 'shall' instead of
3205         'should' in text messages.
3206         (rec_int_check_descriptor): Likewise.
3208         * utils/recins.c (recutl_print_help): Typos in help strings fixed.
3210 2012-01-15  Jose E. Marchesi  <jemarch@gnu.org>
3212         recsel: print an error if an invalid fex is passed to -p,-P or -R.
3213         * utils/recsel.c (recsel_parse_args): Print an error message if an
3214         invalid fex is passed to -p, -P or -R.
3216 2012-01-14  Jose E. Marchesi  <jemarch@gnu.org>
3218         manual: documentation of -G,--group-by.
3219         * doc/recutils.texi (recsel Invocation): Documentation of
3220         -G|--group-by.
3222 2012-01-14  Jose E. Marchesi  <jemarch@gnu.org>
3224         torture: tests for the group-by operation.
3225         * torture/utils/recsel.sh (group-records): New input file.
3226         (recsel-group-records): New test.
3227         (recsel-group-records-sort): Likewise.
3228         (recsel-group-records-non-existing-field): Likewise.
3229         (recsel-group-one-record): Likewise.
3230         (recsel-group-records-missing): Likewise.
3232 2012-01-14  Jose E. Marchesi  <jemarch@gnu.org>
3234         librec,torture: record sorting criteria adjusted to keep the
3235         relative positions of 'equal' records.
3236         * torture/utils/recfix.sh (Bool): Fix expected result to expect
3237         the sorting algorithm to keep the relative order of equal fields.
3238         (unsorted-int-with-equals): New input file.
3239         (unsorted-range-with-equals): Likewise.
3240         (unsorted-real-with-equals): Likewise.
3241         (unsorted-lex-with-equals): Likewise.
3242         (unsorted-date-with-equals): Likewise.
3243         (recfix-sort-ints-with-equals): New test.
3244         (recfix-sort-ranges-with-equals): Likewise.
3245         (recfix-sort-reals-with-equals): Likewise.
3246         (recfix-sort-lex-with-equals): Likewise.
3247         (recfix-sort-dates-with-equals): Likewise.
3249         * src/rec-rset.c (rec_rset_record_compare_fn): Keep the relative
3250         order of 'equal' fields when sorting.  This implies a penalty in
3251         performance, but makes the sorting algorithm to show a more
3252         predictable behaviour, especially when using for record grouping.
3254 2012-01-14  Jose E. Marchesi  <jemarch@gnu.org>
3256         recsel,librec: implementation of the group-by operation.
3257         * src/rec-rset.c (rec_rset_group): New function.
3258         (rec_rset_merge_records): New function.
3260         * utils/recsel.c (recsel_process_data): Invoke rec_rset_group_by
3261         if a group-by field was specified in the command line.
3263         * src/rec.h: Prototype for rec_rset_group.
3265         * utils/recsel.c (recsel_group_by_field): New global.
3266         (GNU_longOptions): New option --group-by.
3267         (recutl_print_help): Documentation for -G|--group-by.
3268         (recsel_parse_args): Manage -G|--group-by.
3270 2012-01-13  Jose E. Marchesi  <jemarch@gnu.org>
3272         Preparation for 1.5.
3273         * utils/recutl.c: Include time.h.
3275         * NEWS: Date updated in the 1.5 entry.
3277         * configure.ac: Version number changed to 1.5.
3279 2012-01-13  Jose E. Marchesi  <jemarch@gnu.org>
3281         torture,utils: make the tests run properly in CRLF systems, and
3282         missing header included in recutl.c.
3283         * utils/recutl.c: Include stdint.h, since int32_t is used in the
3284         file.
3286         * torture/utils/testutils.sh: Post-process the output of the tools
3287         to remove CR characters.  This avoid the tests to fail when
3288         running in MSDOS or Windows systems.  Problem reported and patch
3289         sent by Bruno Haible.
3291 2012-01-13  Jose E. Marchesi  <jemarch@gnu.org>
3293         * gnulib update.
3295 2012-01-12  Jose E. Marchesi  <jco@terma.com>
3297         librec: enumeration mixing in rec-parser fixed.
3298         * src/rec-parser.c (rec_parser_init_common): Reset parser->error
3299         to REC_PARSER_NOERROR.
3301 2012-01-12  Jose E. Marchesi  <jemarch@gnu.org>
3303         Preparation for 1.4.93.
3304         * configure.ac: Version number changed to 1.4.93.
3306 2012-01-12  Jose E. Marchesi  <jemarch@gnu.org>
3308         Portability issues with random and variadic macros fixed.
3309         * utils/recutl.c (recutl_index_add_random): Use random_r and
3310         srandom_r instead of random and srandom.
3311         (recutl_index_add_random): Be careful to generate the requested
3312         number of randoms.
3314         * lib/random_r.c: Imported from gnulib.
3315         * m4/random_r.m4: Likewise.
3317         * configure.ac: Require C99 with the macro AC_PROG_CC_C99.
3319 2012-01-11  Jose E. Marchesi  <jemarch@gnu.org>
3321         Preparation for 1.4.92.
3322         * configure.ac: Version number changed to 1.4.92.
3324 2012-01-11  Jose E. Marchesi  <jemarch@gnu.org>
3326         torture: don't run encryption related tests if crypt support was
3327         not compiled into the library.
3328         * torture/utils/recsel.sh: Run encryption related tests only if
3329         crypt_support is "yes".
3330         It defaults to "yes".
3332         * torture/utils/Makefile.am (TESTS_ENVIRONMENT): Pass
3333         crypt_support to the test scripts.
3335 2012-01-11  Jose E. Marchesi  <jemarch@gnu.org>
3337         utils: accept -s|--password only if compiled with encryption
3338         support.
3339         * utils/recutl.h: Define ENCRYPTION_SHORT_ARGS.
3341         * utils/recins.c (recins_parse_args): Likewise.
3343         * utils/recsel.c (recsel_parse_args): Process -s|--password only
3344         if compiled with encryption support.
3346 2012-01-11  Jose E. Marchesi  <jemarch@gnu.org>
3348         * gnulib modules fprintf-posix, vasprintf-posix and printf-posix
3349         imported.
3351 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3353         * strcasestr gnulib module imported.
3354         * gnulib update.
3356 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3358         librec,utils: handle the return values of asprintf and fread.
3359         * utils/recutl.c (recutl_read_file): Handle fread errors.
3361         * src/rec-int.c (ADD_ERROR): Don't ignore the value returned by
3362         asprintf.
3363         * utils/rec2csv.c (rec2csv_generate_csv): Likewise.
3364         * src/rec-types.c (rec_type_check_range): Likewise.
3365         (rec_type_check_size): Likewise.
3366         * src/rec-rset.c (rec_rset_add_auto_field_int): Likewise.
3367         * src/rec-parser.c (rec_parser_perror): Likewise.
3368         * src/rec-fex.c (rec_fex_str): Likewise.
3370 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3372         Preparation for 1.4.91.
3373         * configure.ac: Version number changed to 1.4.91.
3375 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3377         librec: compilation problem in remote descriptors support fixed.
3378         * src/rec-int.c (rec_int_merge_remote): Missing variable
3379         tmpfile_des added.
3381 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3383         Preparation for 1.4.90.
3384         * NEWS: Entry for 1.5.
3386         * configure.ac: Version number changed to 1.4.90.
3387         * po/de.po: Updated.
3388         * po/fi.po: Likewise.
3389         * po/nl.po: Likewise.
3390         * po/recutils.pot: Likewise.
3391         * po/sv.po: Likewise.
3393 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3395         Warning fixes.
3396         * utils/recfmt.c (recfmt_process_db): Useless variable rset_size
3397         removed.
3399         * src/rec-mset.c (rec_mset_dup): Useless variable new_elem
3400         removed.
3401         (rec_mset_sort): Likewise.
3402         (rec_mset_dump): Use %zd in printf to print size_t values.
3403         * utils/recinf.c (print_info_file): Likewise.
3404         * src/rec-int.c (rec_int_check_rset): Likewise.
3405         (rec_int_check_descriptor): Likewise.
3407         * libcsv/libcsv.c: Copyright year update.
3409 2012-01-10  Jose E. Marchesi  <jco@terma.com>
3411         * doc/recutils.texi: FSF copyright years updated in recutils.texi.
3413 2012-01-10  Jose E. Marchesi  <jemach@gnu.org>
3415         Removal of warnings.
3416         * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Likewise.
3418         * utils/recutl.c (recutl_index_list_parse): Likewise.
3420         * src/rec-fex.c (rec_fex_check): Likewise.
3422         * src/rec-int.c (rec_int_merge_remote): Likewise.
3424         * src/rec-rset.c (rec_rset_rename_field): Likewise.
3426         * src/rec-record.c (rec_record_subset_p): Unused variables removed.
3427         (rec_record_uniq): Likewise.
3429         * src/rec-types.c (rec_type_check_re): Unused function removed.
3431         * src/rec-field-name.c: Include rec-utils.h.
3433         * src/rec-mset.c (rec_mset_iterator_next): Unused variable removed.
3435 2012-01-10  Jose E. Marchesi  <jemarch@gnu.org>
3437         Unit tests fixes.
3438         * src/rec-writer.c (rec_write_field_with_rset): Don't write the
3439         blank character before field values if printin sexps.
3441         * torture/rec-field/rec-field-to-comment.c
3442         (rec_field_to_comment_nominal): Adjusted to the new behaviour of
3443         the writer with fields having empty values.
3445 2012-01-09  Jose E. Marchesi  <jemarch@gnu.org>
3447         librec: rec_mset_append gets an extra argument indicating the
3448         type of element for counting.
3449         * src/rec-mset.c (rec_mset_append): Get an argument elem_type.
3450         (rec_mset_dup): Use new rec_mset_append.
3452         * src/rec.h: New argument elem_type to rec_mset_append.
3454         * utils/recset.c (recset_process_add): Likewise.
3455         (recset_process_set): Likewise.
3456         * utils/recins.c (recins_insert_record): Likewise.
3457         (recins_parse_args): Likewise.
3458         * utils/mdb2rec.c (process_table): Likewise.
3459         (process_table): Likewise.
3460         * utils/csv2rec.c (field_cb): Likewise.
3461         (record_cb): Likewise.
3462         * src/rec-int.c (rec_int_merge_remote): Likewise.
3463         * src/rec-parser.c (rec_parse_record): Likewise.
3464         (rec_parse_record): Likewise.
3465         (rec_parse_record): Likewise.
3466         * src/rec-rset.c (rec_rset_set_type): Likewise.
3468 2012-01-09  Jose E. Marchesi  <jemarch@gnu.org>
3470         torture: adapt unit tests to the new librec api.
3471         * torture/rec-parser/rec-parse-record.c: Adapted to the new librec
3472         API.
3473         * torture/rec-writer/rec-write-db.c: Likewise.
3474         * torture/rec-writer/rec-write-record-with-fex.c: Likewise.
3475         * torture/rec-writer/rec-write-rset.c: Likewise.
3476         * torture/rec-writer/rec-write-record.c: Likewise.
3477         * torture/rec-parser/rec-parse-record-str.c: Likewise.
3479 2012-01-09  Jose E. Marchesi  <jemarch@gnu.org>
3481         algol68: dist problem fixed.
3482         * algol68/Makefile.am (nodist_librec_a68_a_SOURCES): Don't
3483         distribute the generated C files from the algol68 sources.
3485 2012-01-09  Jose E. Marchesi  <jco@terma.com>
3487         torture: get some unit tests up to date.
3488         * torture/Makefile.am (REC_MSET_TSUITE): rec-mset-get.c renamed to
3489         rec-mset-get-at.c.
3491         * torture/rec-mset/rec-mset-get.c (rec_mset_get_empty): Likewise.
3493         * torture/rec-mset/rec-mset-count.c: Include rec.h instead of
3494         rec-mset.h.
3495         (rec_mset_count_existing): Adapted to the new mset semantics.
3497         * torture/rec-mset/rec-mset-type-p.c: Likewise.
3498         * torture/rec-mset/rec-mset-register-type.c: Likewise.
3499         * torture/rec-mset/rec-mset-new.c: Likewise.
3500         * torture/rec-mset/rec-mset-get.c: Likewise.
3501         * torture/rec-mset/rec-mset-dup.c: Likewise.
3502         (rec_mset_dup_nonempty): Adapted to the new mset semantics.
3504 2012-01-08  Jose E. Marchesi  <jemarch@gnu.org>
3506         utils: support for the selection of random records in recsel,
3507         recins, recdel and recset.
3508         * torture/utils/recset.sh (recset-random-all): New test.
3509         (recset-random-one): Likewise.
3511         * torture/utils/recdel.sh (recdel-random-all): New test.
3512         (recdel-random-all-force): Likewise.
3514         * torture/utils/recins.sh (one-record): New input file.
3515         (recins-random-all): New test.
3516         (recins-random-one): Likewise.
3518         * torture/utils/recsel.sh (recsel-random-all): New test.
3519         (recsel-random-one): Likewise.
3520         (recsel-num-and-random): Likewise.
3521         (recsel-sex-and-random): Likewise.
3522         (recsel-quick-and-random): Likewise.
3524         * doc/recutils.texi (recsel Invocation): --random|-m documented.
3525         (recins Invocation): Likewise.
3526         (recdel Invocation): Likewise.
3527         (recset Invocation): Likewise.
3529         * utils/recset.c (recutl_random): New global.
3530         (recset_process_actions): Manage random records.
3532         * utils/recdel.c (recutl_random): New global.
3533         (recdel_delete_records): Manage random records.
3534         (recutl_print_help): Document --random|-r.
3536         * utils/recins.c (recutl_random): New global.
3537         (recins_add_new_record): Manage random records.
3539         * doc/recutils.texi (recins Invocation): Likewise.
3541         * utils/recsel.c (recsel_process_data): Manage random indexes.
3543         * utils/recutl.c (recutl_reset_indexes): New function.
3545         * utils/recsel.c (recutl_print_help): Synopsis updated with -r.
3547         * utils/recutl.h (RECORD_SELECTION_ARGS): RANDOM_ARG added.
3548         (RECORD_SELECTION_LONG_ARGS): Entry for random.
3549         (RECORD_SELECTION_SHORT_ARGS): Likewise.
3551         * utils/recsel.c (recutl_random): New global.
3553         * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Manage
3554         --random|-r.
3556         * utils/recutl.c (recutl_index_add_random): New function.
3557         (recutl_print_help_record_selection): Documentation for
3558         --random|-r.
3559         (recutl_random): New global variable.
3561         * utils/recutl.h (recutl_index_add_random): New function
3562         prototype.
3564 2012-01-08  Jose E. Marchesi  <jemarch@gnu.org>
3566         recutl: remove an arbitrary limit in the number of indexes.
3567         * utils/recutl.c (recutl_index_s): New structure.
3568         (recutl_index_list_parse): Allocate the indexes list dynamically.
3570 2012-01-08  Jose E. Marchesi  <jemarch@gnu.org>
3572         Copyright years update.
3573         * utils/recutl.c (recutl_print_version): Copyright updated.
3574         * doc/recutils.texi: Likewise.
3576 2012-01-08  Jose E. Marchesi  <jemarch@gnu.org>
3578         manual: documentation for the new indexes system.
3579         * utils/recsel.c (recutl_print_help): Documentation updated.
3580         * utils/recutl.c (recutl_print_help_record_selection): Likewise.
3582         * doc/recutils.texi (recsel Invocation): Update description of -n.
3583         (recins Invocation): Likewise.
3584         (recdel Invocation): Likewise.
3585         (recset Invocation): Likewise.
3587 2012-01-08  Jose E. Marchesi  <jemarch@gnu.org>
3589         torture: tests for the new indexes system.
3590         * utils/recins.c (recins_add_new_record): Dup the record to
3591         insert, since it could be used to replace more than one record.
3593         * torture/utils/recins.sh (recins-replace-range): New test.
3594         (recins-replace-several-indexes): Likewise.
3596         * torture/utils/recset.sh (recset-set-field-in-range): New test.
3597         (recset-set-field-in-several-indexes): Likewise.
3599         * torture/utils/recsel.sh (recsel-index-toobig): New test.
3600         (recsel-index-range-1): Likewise.
3601         (recsel-index-range-2): Likewise.
3602         (recsel-index-range-3): Likewise.
3603         (recsel-index-several): Likewise.
3604         (recsel-index-invalid-1): Likewise.
3605         (recsel-index-invalid-2): Likewise.
3606         (recsel-index-invalid-3): Likewise.
3607         (recsel-index-invalid-4): Likewise.
3609 2012-01-07  Jose E. Marchesi  <jemarch@gnu.org>
3611         utils: support for lists of indexes including ranges.
3612         * utils/recset.c (recutl_num): Global variable removed.
3613         (recset_process_actions): Use the new indexes system.
3614         (recset_process_ren): Likewise.
3616         * utils/recins.c (recutl_num): Global variable removed.
3617         (recins_add_new_record): Use the new indexes system.
3619         * utils/recdel.c (recutl_num): Global variable removed.
3620         (recdel_delete_records): Use new indexes system.
3621         (recdel_parse_args): Likewise.
3622         (main): Likewise.
3624         * utils/recsel.c (recsel_process_data): Use new indexes system.
3626         * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Use
3627         recutl_index_list_parse to handle -n.
3629         * utils/recutl.c (recutl_num_indexes): New function.
3630         (recutl_index_p): New function.
3632         * utils/recsel.c (recutl_num): Global variable deleted.
3634         * utils/recutl.c (INDEX_LIST_ENTRY_RE): New constant.
3635         (INDEX_LIST_RE): Likewise.
3636         (recutl_index_list_parse): New function.
3638         * utils/recutl.h (recutl_index_list_s): New structure.
3640 2012-01-07  Jose E. Marchesi  <jemarch@gnu.org>
3642         recins: implement the auto fields using the rec_rset facilities.
3643         * utils/recins.c (recins_add_auto_field_int): Function deleted.
3644         (recins_add_auto_field_date): Likewise.
3645         (recins_add_auto_fields): Likewise.
3646         (recins_insert_record): Use rec_rset_add_auto_fields instead of
3647         recins_add_auto_fields.
3648         (recins_insert_record): Likewise.
3650 2012-01-07  Jose E. Marchesi  <jemarch@gnu.org>
3652         recfix: New operation --auto.
3653         * torture/utils/recfix.sh (missing-auto-fields): New input file.
3654         (recfix-missing-auto-fields): New test.
3656         * doc/recutils.texi (recfix Invocation): Documentation for the
3657         --auto operation.
3658         (recfix Examples): Example with --auto added.
3660         * utils/recfix.c (recfix_op): RECFIX_OP_AUTO.
3661         (GNU_longOptions): Entry for --auto.
3662         (recutl_print_help): Documentation for --auto.
3663         (recfix_parse_args): Handle the --auto operation.
3664         (main): Likewise.
3666         * src/rec-rset.c (rec_rset_add_auto_fields): New function.
3667         (rec_rset_add_auto_field_int): Likewise.
3668         (rec_rset_add_auto_field_date): Likewise.
3669         Include errno.h and locale.h.
3671         * utils/recfix.c (recfix_do_auto): New function.
3673 2012-01-07  Jose E. Marchesi  <jemarch@gnu.org>
3675         recsel: Support for --uniq|-U.
3676         * torture/utils/recsel.sh (duplicated-fields): New input file.
3677         (recsel-uniq): New test.
3678         (recsel-uniq-long): New test.
3680         * doc/recutils.texi (recsel Invocation): Documentation for
3681         --uniq|-U.
3683         * utils/recsel.c (GNU_longOptions): New command line argument
3684         --uniq|-U.
3685         (recutl_print_help): Documentation for --uniq|-U.
3686         (recsel_parse_args): Handle --uniq|-U.
3687         (recsel_uniq): New global.
3688         (recsel_process_data): Remove duplicated fields in the processed
3689         records if requested by the user with --uniq|-U.
3691 2012-01-04  Jose E. Marchesi  <jemarch@gnu.org>
3693         librec: Initial implementation of the rec_record_uniq function.
3694         * src/rec-record.c (rec_record_uniq): New function.
3696         * src/rec.h: Prototype for rec_record_uniq.
3698 2012-01-02  Jose E. Marchesi  <jemarch@gnu.org>
3700         mset: disposal callback is now actually used.  Memory leak fixed.
3701         * src/rec-mset.c (rec_mset_elem_destroy): Dispose the data stored
3702         in elements upon removal.
3704 2012-01-02  Jose E. Marchesi  <jemarch@gnu.org>
3706         librec: improved sort support.
3707         * src/rec-record.c (rec_record_dup): Don't pass a 'sorted'
3708         argument to rec_mset_dup.
3709         * src/rec-rset.c (rec_rset_dup): Likewise.
3710         (rec_rset_sort): Use rec_mset_sort.
3712         * src/rec-mset.c (rec_mset_sort): New function.
3713         (rec_mset_dup): Don't sort.
3715         * src/rec.h: New prototype for rec_mset_sort, and rec_mset_dup
3716         modified to not get the 'sorted' argument.
3718 2011-12-28  Jose E. Marchesi  <jemarch@gnu.org>
3720         writer: don't write a blank after the field name if the field
3721         value is empty.
3722         * torture/utils/recsel.sh (empty-field-values): New input file.
3723         (recsel-empty-field-values): New test.
3725         * src/rec-writer.c (rec_write_field_with_rset): Print a blank
3726         after the field name only if the field value is not the empty
3727         string.
3729 2011-12-28  Jose E. Marchesi  <jemarch@gnu.org>
3731         torture: system tests for csv2rec.
3732         * torture/utils/csv2rec.sh: New file.
3733         (simple-table): New input file.
3734         (csv2rec-simple-table): New test.
3735         (simple-table-quotes): New input file.
3736         (csv2rec-simple-table-quotes): New test.
3737         (empty-columns): New input file.
3738         (csv2rec-empty-columns): New test.
3739         (csv2rec-empty-columns-omit): Likewise.
3740         (multi-line): New input file.
3741         (csv2rec-multi-line): New test.
3743         * torture/utils/Makefile.am (TESTS): csv2rec.sh added.
3745 2011-12-28  Jose E. Marchesi  <jemarch@gnu.org>
3747         * src/rec.h: Documentation for the rec_int_check_* functions.
3749 2011-12-26  Jose E. Marchesi  <jemarch@gnu.org>
3751         librec,utils: new sorting mechanism on top of the new mset
3752         implementation.
3753         * torture/utils/rec2csv.sh (sort): New input file.
3754         (rec2csv-sort): New test.
3755         (rec2csv-sort-field): Likewise.
3757         * src/rec-rset.c (rec_rset_record_compare_fn): Incorrect results
3758         were being calculated if a non-existing field was given to -S.
3760         * torture/utils/recsel.sh (sort): New input file.
3761         (recsel-sort): New test.
3762         (recsel-sort-field): Likewise.
3763         (recsel-sort-field-nonexist): Likewise.
3765         * utils/recfix.c (recfix_do_sort): Rewritten to use rec_rset_sort.
3766         * utils/rec2csv.c (rec2csv_process_data): Likewise.
3767         * utils/recsel.c (recsel_process_data): Likewise.
3769         * src/rec-rset.c (struct rec_rset_s): Field ordered removed.
3770         (rec_rset_set_ordered): Function removed.
3771         (rec_rset_ordered): Function removed.
3773         * utils/rec2csv.c (rec2csv_parse_args): Likewise.
3775         * utils/recfmt.c (main): Likewise.
3777         * utils/recfix.c (recfix_do_sort): Likewise.
3779         * utils/recsel.c (recsel_parse_args): Don't use a sorting parser.
3781         * utils/recutl.c (recutl_sorting_parser): Function removed.
3783         * src/rec-parser.c (struct rec_parser_s): Fiels related with
3784         sorting removed.
3785         (rec_parse_rset): Don't sort.
3786         (rec_parser_set_ordered): Function removed.
3787         (rec_parser_ordered): Likewise.
3788         (rec_parser_sort_rset): Likewise.
3790         * src/rec-record.c (rec_record_dup): Pass sorted=false to
3791         rec_mset_dup.
3793         * src/rec-mset.c (rec_mset_dup): Take a new parameter 'sort'.
3795 2011-12-25  Jose E. Marchesi  <jemarch@gnu.org>
3797         mset,recins: fix some problems on the removal of elements.
3798         * src/rec-mset.c (rec_mset_remove_elem): Update statistics.
3799         (rec_mset_remove_at): Don't update statistics, because
3800         rec_mset_remove_elem already does that internally.
3802         * utils/recins.c (recins_add_new_record): Fix the replace of
3803         selected record using the provided record.
3805 2011-12-25  Jose E. Marchesi  <jemarch@gnu.org>
3807         utils: missing rec_record_set_container added.
3808         * utils/mdb2rec.c (process_table): Set the rset container in the
3809         record to insert.
3810         * utils/recins.c (recins_insert_record): Likewise.
3812 2011-12-25  Jose E. Marchesi  <jemarch@gnu.org>
3814         librec,utils: new mset iterators and API used in the codebase.
3815         * utils/mdb2rec.c (process_table): Use rec_mset_append.
3817         * utils/rec2csv.c (rec2csv_generate_csv): Use iterators.
3818         (rec2csv_determine_fields): Likewise.
3820         * utils/csv2rec.c (field_cb): Use rec_mset_append.
3821         (record_cb): Likewise.
3823         * utils/recfix.c (recfix_do_crypt): Use iterators.
3824         * utils/recfmt.c (recfmt_process_db): Likewise.
3826         * utils/recset.c (recset_process_actions): Use iterators.
3827         (recset_process_add): Use rec_mset_append.
3828         (recset_process_set): Likewise.
3830         * src/rec-mset.c (rec_mset_elem_destroy): Don't invoke the
3831         disposal callback, since that is executed as part of
3832         gl_list_remove_node.
3833         (rec_mset_elem_set_type): New function.
3834         (rec_mset_iterator_next): Update the list_node field of the mset
3835         elements retrieved by iterating the list.
3837         * utils/recins.c (recins_add_auto_field_int): Use iterators and
3838         new mset API.
3839         (recins_add_auto_field_date): Likewise.
3840         (recins_insert_record): Likewise.
3841         (recins_parse_args): Likewise.
3842         (recins_add_new_record): Likewise.
3844         * src/rec-parser.c (rec_parse_rset): Set the container for new
3845         records.
3847         * src/rec-record.c (rec_record_s): New field 'container' to hold a
3848         pointer managed by the user of the record.
3849         (rec_record_new): Initialize the container pointer.
3850         (rec_record_dup): Copy the container pointer.
3851         (rec_record_container): New function.
3852         (rec_record_set_container): New function.
3854         * utils/recsel.c (recsel_process_data): Use iterators.
3856         * src/rec-parser.c (rec_parse_rset): Use mset functions.
3857         (rec_parse_record): Likewise.
3859         * src/rec-sex.c (rec_sex_eval): Use iterators.
3861         * src/rec-int.c (rec_int_check_rset): Use iterators.
3862         (rec_int_check_record_types): Likewise.
3863         (rec_int_check_record_secrets): Likewise.
3864         (rec_int_check_record_key): Likewise.
3865         (rec_int_check_descriptor): Likewise.
3866         (rec_int_merge_remote): Likewise.
3868         * src/rec-writer.c (rec_write_record_with_rset): Use iterators.
3869         (rec_write_rset): Likewise.
3871         * src/rec-rset.c (rec_rset_num_elems): Return a size_t type.
3872         (rec_rset_num_records): Likewise.
3873         (rec_rset_num_comments): Likewise.
3874         (rec_rset_mset): New function.
3875         (rec_rset_update_field_props): Use iterators.
3876         (rec_rset_update_types): Likewise.
3878         * src/rec-record.c (rec_record_get_num_fields_by_name): Use
3879         iterators.
3880         (rec_record_get_field_by_name): Likewise.
3882         * src/rec-mset.c (rec_mset_search): Use iterators.
3884         * src/rec-record.c (rec_record_get_field_index): Use iterators.
3885         (rec_record_get_field_index_by_name): Likewise.
3886         (rec_record_contains_value): Likewise.
3887         (rec_record_get_field): Function removed.
3888         (rec_record_get_comment): Likewise.
3889         (rec_record_remove_at): Likewise.
3891         * src/rec-mset.c (rec_mset_iter_gl2mset): New function.
3892         (rec_mset_iter_mset2gl): Likewise.
3893         (rec_mset_iterator_next): Use gl2mset and mset2gl instead of
3894         memcpy.
3896         * src/rec-rset.c (rec_rset_rename_field): Use iterators.
3898         * src/rec-record.c (rec_record_new): Note about MSET_FIELD and
3899         MSET_COMMENT added.
3900         (rec_record_subset_p): Rewritten to use mset iterators.
3901         (rec_record_mset): New function.
3902         (rec_record_get_elem): Function removed.
3904         * src/rec.h (MSET_FIELD): New constant.
3905         (MSET_COMMENT): Likewise.
3907 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
3909         * src/rec.h: Comments API properly documented.
3911 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
3913         mset: implementation of iterators ala gl_lib.
3914         * src/rec-mset.c (rec_mset_iterator): New function.
3915         (rec_mset_iterator_next): Likewise.
3916         (rec_mset_iterator_free): Likewise.
3918         * src/rec.h: Prototypes for new functions related to iterators:
3919         rec_mset_iterator, rec_mset_iterator_next and
3920         rec_mset_iterator_free.
3922 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
3924         mset: use an explicit type for element types.
3925         * src/rec-mset.c (struct rec_mset_elem_s): Use rec_mset_type_t.
3926         (struct rec_mset_s): count is now of type size_t.
3927         (rec_mset_get_at): Use new types.
3928         (rec_mset_remove_at): Likewise.
3929         (rec_mset_insert_at): Likewise.
3930         (rec_mset_type_p): Likewise.
3931         (rec_mset_register_type): Likewise.
3932         (rec_mset_count): Likewise.
3933         (rec_mset_get_at): Likewise.
3934         (rec_mset_first): Likewise.
3935         (rec_mset_next): Likewise.
3937         * src/rec.h: Change mset functions using positions to use size_t
3938         variables instead of ints.
3939         (rec_mset_type_t): New data type.
3941 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
3943         src: move the stuff of rec-mset.h to rec.h and document the API.
3944         * src/rec-record.c: Stop including rec-mset.h.
3945         * src/rec-rset.c: Likewise.
3947         * src/rec-mset.c: Include rec.h instead of rec-mset.h.
3949         * src/Makefile.am (librec_la_SOURCES): rec-mset.h removed.
3951         * src/rec-mset.h: File deleted.
3953         * src/rec.h: Stuff from rec-mset.h moved there.
3954         (rec_mset_new): New prototype, and documented.
3955         (rec_mset_destroy): Likewise.
3956         (rec_mset_dup): Likewise.
3957         (rec_mset_type_p): Likewise.
3958         (rec_mset_register_type): Likewise.
3959         (rec_mset_get_at): Likewise.
3960         (rec_mset_insert_at): Likewise.
3961         (rec_mset_append): Likewise.
3962         (rec_mset_add_sorted): Likewise.
3963         (rec_mset_insert_after): Likewise.
3964         (rec_mset_remove_at): Likewise.
3965         (rec_mset_remove): Likewise.
3966         (rec_mset_search): Likewise.
3967         (rec_mset_first): Likewise.
3968         (rec_mset_next): Likewise.
3969         (rec_mset_elem_new): Likewise.
3970         (rec_mset_elem_destroy): Likewise.
3971         (rec_mset_elem_type): Likewise.
3972         (rec_mset_elem_data): Likewise.
3973         (rec_mset_elem_set_data): Likewise.
3974         (rec_mset_elem_equal_p): Likewise.
3976 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
3978         mset: several optimizations.
3979         * src/rec-rset.c (rec_rset_get_elem): Likewise.
3980         (rec_rset_get_record): Likewise.
3981         (rec_rset_get_comment): Likewise.
3983         * src/rec-record.c (rec_record_get_elem): rec_mset_get is now
3984         called rec_mset_get_at.
3985         (rec_record_get_field): Likewise.
3986         (rec_record_get_comment): Likewise.
3988         * src/rec-mset.c (rec_mset_remove_at): Use gl_list_get_at instead
3989         of gl_list_remove_at.
3990         (rec_mset_get): Optimization when the requested element is of any
3991         type.
3992         (rec_mset_get_at): Renamed from rec_mset_get.
3994 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
3996         torture: xfail tests failing are reported as failures.
3997         * torture/utils/testutils.sh: Accumulate an error if an xfail test
3998         does not fail.
4000 2011-12-22  Jose E. Marchesi  <jemarch@gnu.org>
4002         src: auto fields not having an explicit type are now implicitly
4003         typed as integers.
4004         * doc/recutils.texi (%auto): Document that auto fields are
4005         integers by default.
4007         * torture/utils/recins.sh (auto-notype): New input file.
4008         (recins-auto-notype): New test.
4010         * torture/utils/recfix.sh (recfix-auto-notype): Adapted to new
4011         semantics.
4012         (auto-invalid-type): New input file.
4013         (recfix-auto-invalid-type): New test.
4015         * src/rec-rset.c (rec_rset_update_field_props): Auto fields not
4016         having an explicit type are implicitly typed as integers.
4018 2011-12-20 Jose Marchesi <jco@wilhelm>
4020         Tasktool operations.
4021         * TODO: Task 20 resolved to 'DISCARDED'.
4022         Note added for task 24.
4023         Task 16 resolved to 'DISCARDED'.
4024         Task 10 edited.
4025         Task 35 resolved to 'DONE'.
4026         Task 26 resolved to 'DONE'.
4028 2011-12-20  Jose E. Marchesi  <jco@terma.com>
4030         recfix: interactive password prompt.
4031         * doc/recutils.texi (recfix Invocation): Document the interactive
4032         behaviour of recfix when it needs a password.
4034         * utils/recfix.c (recfix_parse_args): Prompt for a password to the
4035         user if needed, and ignore empty passwords.
4037 2011-12-20  Jose E. Marchesi  <jco@terma.com>
4039         recins: avoid code duplication in encryption code.
4040         * utils/recins.c (recins_encrypt_record): New function.
4041         (recins_insert_record): Use recins_encrypt_record.
4042         (recins_add_new_record): Likewise.
4044 2011-12-20  Jose E. Marchesi  <jco@terma.com>
4046         utils: interactive password prompt in recins.
4047         * doc/recutils.texi (recins Encryption): Document the interactive
4048         behaviour of recins when it needs a password.
4050         * utils/recins.c (recins_insert_record): Prompt for a password to
4051         the user if needed, and ignore empty passwords.
4052         (recins_add_new_record): Likewise.
4054 2011-12-20  Jose E. Marchesi  <jco@terma.com>
4056         utils: interactive password prompt in recsel.
4057         * utils/recsel.c (recsel_process_data): Use the provided password
4058         only if it not the empty string.
4060         * doc/recutils.texi (recsel Encryption): Document the interactive
4061         behaviour of recsel when it needs a password.
4063         * utils/recsel.c (recsel_process_data): Ask for a password if
4064         recsel was called interactively, a password is needed and -s was
4065         provided alone.
4066         (GNU_longOptions): allow optional arguments to PASSWORD_ARG.
4068         * utils/recutl.c: New global variable recutl_interactive_p.
4069         (recutl_interactive): New function.
4070         (recutl_init): Initialize recutl_interactive.
4072 2011-12-20  Jose E. Marchesi  <jemarch@gnu.org>
4074         * gnulib module getpass-gnu imported.
4076 2011-12-20  Jose E. Marchesi  <jemarch@gnu.org>
4078         src: support for hexadecimal and octal literals in selection
4079         expressions.
4080         * doc/recutils.texi (SEX Operands): Document the usage of
4081         hexadecimal and octal literals in selection expressions.
4083         * torture/utils/recsel.sh (recsel-sex-integer-equal-hex): New
4084         test.
4085         (recsel-sex-integer-equal-oct): Likewise.
4087         * src/rec-sex-lex.l: Modified to recognize hexadecimal and octal
4088         literals as integers.
4090 2011-12-19  Jose E. Marchesi  <jemarch@gnu.org>
4092         src: support for hexadecimal and octal numbers in type
4093         descriptions, field values and %size entries.
4094         * doc/recutils.texi (%size): Mention that hexadecimal and octal
4095         numbers can be used in %size entries.
4097         * src/rec-utils.h (REC_INT_SIZE_RE): Rewritten to allow hex and
4098         octal constants.
4100         * torture/utils/recfix.sh (size-exact-hex): New input file.
4101         (size-exact-oct): Likewise.
4102         (recfix-size-exact-hex): New test.
4103         (recfix-size-exact-oct): Likewise.
4105         * doc/recutils.texi (Escalar types): Document that hexadecimal and
4106         octal numbers can be used to define ranges.
4107         (String types): Ditto for 'size' types.
4109         * src/rec-types.c (rec_type_parse_size): Make sure the user
4110         specified type is not negative.
4112         * torture/utils/recfix.sh (ranges-hex-invalid): New input file.
4113         (recfix-range-hex-xfail): New test.
4114         (ranges-oct-ok): New input file.
4115         (ranges-oct-invalid): Likewise.
4116         (recfix-range-oct-ok): New test.
4117         (recfix-range-oct-xfail): Likewise.
4118         (type-size-valid): New input file.
4119         (type-size-valid-hex): Likewise.
4120         (type-size-valid-oct): Likewise.
4121         (type-size-invalid): Likewise.
4122         (type-size-invalid-negative): Likewise.
4123         (recfix-type-size-valid): New test.
4124         (recfix-type-size-valid-hex): Likewise.
4125         (recfix-type-size-valid-oct): Likewise.
4126         (recfix-type-size-invalid): Likewise.
4127         (recfix-type-size-invalid-negative): Likewise.
4129         * src/rec-utils.c (rec_parse_int): Support hexadecimal numbers.
4131         * src/rec-types.c (REC_TYPE_INT_RE): New constant.
4132         (REC_TYPE_RANGE_DESCR_RE): Use REC_TYPE_INT_RE.
4133         (REC_TYPE_SIZE_DESCR_RE): Likewise.
4135         * torture/utils/recfix.sh (type-int-valid): Add integers in both
4136         hexadecimal and octal formats.
4137         (type-int-invalid): Likewise.
4138         (ranges-hex-ok): New input file.
4139         (recfix-ranges-hex-ok): New test.
4141         * src/rec-types.c (REC_TYPE_INT_VALUE_RE): Allow letters a-f and
4142         A-F in hexadecimal constants.
4144 2011-12-10  Jose E. Marchesi  <jemarch@gnu.org>
4146         src,utils: initial support for hexadecimal and octal numbers.
4147         * src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Use
4148         REC_TYPE_INT_VALUE_RE.
4149         (REC_TYPE_SIZE_DESCR_RE): Likewise.
4151         * src/rec-int.c (rec_int_check_descriptor): Error message fixed.
4153         * doc/recutils.texi (Escalar types): Document octal and
4154         hexadecimal numbers.
4156         * src/rec-types.c (REC_TYPE_INT_VALUE_RE): Modified to allow a 0x
4157         prefix.
4159         * src/rec-utils.c (rec_atoi): Pass 'base' as 0 to strtol to
4160         support numbers in hexadecimal and octal representation.
4162 2011-12-19  Jose E. Marchesi  <jco@terma.com>
4164         utils: make recfix to exit with an error status if there is a
4165         parse error.
4166         * utils/recutl.c (recutl_parse_db_from_file): Return 'false' if a
4167         syntax error is found by the parser.
4169 2011-12-06  Jose E. Marchesi  <jemarch@gnu.org>
4171         src: allow tabs in blank lines between records.
4172         * src/rec-parser.c (rec_parse_rset): Make the parser to ignore
4173         tabs appearing between records.
4175 2011-12-05  Jose E. Marchesi  <jemarch@gnu.org>
4177         src: support for several numeration bases in rec_atoi.
4178         * src/rec-utils.c (rec_parse_int): Likewise.
4180         * src/rec-sex-lex.l (rec_sex_lex_extract_index): Likewise.
4182         * src/rec-sex.c (ATOI_VAL): Likewise.
4183         (rec_sex_op_real_p): Likewise.
4185         * src/rec-rset.c (rec_rset_record_compare_fn): Pass the base
4186         argument to rec_atoi.
4188         * src/rec-utils.c (rec_atoi): Get a new argument with the base of
4189         the number.
4191 2011-11-27  Jose E. Marchesi  <jemarch@gnu.org>
4193         librec: use rec_match intead of regex functions.
4194         * src/rec-fex.c (rec_fex_check): Use rec_match instead of
4195         regcomp/regexec.
4197 2011-11-27  Jose E. Marchesi  <jemarch@gnu.org>
4199         qa: syntax fixes.
4200         * algol68/rec.a68: Trailing blanks removed.
4202         * .x-sc_prohibit_xalloc_without_use: New file.
4204 2011-11-27  Jose E. Marchesi  <jemarch@gnu.org>
4206         utils,librec: encrypted fields are now decrypted when using field
4207         expressions in recsel.
4208         * torture/utils/recsel.sh (confidential): New input file.
4209         (recsel-confidential): New test.
4210         (recsel-confidential-fex): New test.
4211         (recsel-confidential-fex-value): New test.
4212         (recsel-confidential-num): New test.
4214         * utils/recsel.c (recsel_process_data): Pass recsel_password to
4215         recutl_eval_field_expression.
4217         * utils/recutl.c (recutl_eval_field_expression): Get a new
4218         argument, 'password'.
4219         (recutl_eval_field_expression): Set the passed password, if any,
4220         to decrypt confidential fields.
4222         * src/rec-writer.c (rec_write_record_with_fex): Decrypt
4223         confidential fields before printing them out.
4225 2011-11-27  Jose E. Marchesi  <jemarch@gnu.org>
4227         librec: initialize passwords in writers, and avoid code
4228         replication.
4229         * src/rec-writer.c (rec_writer_new_str): Initialize the password
4230         field to NULL.
4231         (rec_writer_new_common): New function.
4232         (rec_writer_new): Use rec_writer_new_common.
4233         (rec_writer_new_str): Likewise.
4235 2011-11-26  Jose E. Marchesi  <jemarch@gnu.org>
4237         Distribution fixes.
4238         * etc/Makefile.am (dist_lisp_DATA): Install and distribute
4239         ob-rec.el.
4241         * README-dev: Remove information incorrectly copied from the
4242         libgnupdf README-dev file.
4244 2011-11-23  Jose E. Marchesi  <jemarch@gnu.org>
4246         Wrappers for flexible buffers in the Algol68 frontend.
4247         * algol68/rec.a68: Cast pointers to void* for values of mode CSTR.
4248         Keep 'rec init' and 'rec fini'.
4249         (MODE RECBUF): New mode.
4250         (rec buf new): New procedure.
4251         (rec buf close): New procedure.
4252         (rec buf putc): New procedure.
4253         (rec buf puts): New procedure.
4254         (rec buf rewind): New procedure.
4256 2011-11-20  Jose E. Marchesi  <jemarch@gnu.org>
4258         librec: avoid duplication of regular expressions and generalize
4259         the usage of the rec_match_* functions.
4260         * src/rec-types.c (rec_type_check_int): Use rec_match instead of
4261         rec_type_check_re.
4262         (rec_type_check_field): Likewise.
4263         (rec_type_check_bool): Likewise.
4264         (rec_type_check_real): Likewise.
4265         (rec_type_check_line): Likewise.
4266         (rec_type_check_email): Likewise.
4267         (rec_type_check_enum): Likewise.
4268         (rec_type_check_re): Function deleted.
4270         * src/rec-sex.c (rec_sex_eval_node): Use rec_match and
4271         rec_match_insensitive.
4273         * src/rec-utils.c (rec_match_int): New function.
4274         (rec_match_insensitive): New function.
4276         * src/rec-rset.c (rec_rset_type_field_p): Use
4277         REC_FNAME_LIST_CS_RE.
4278         (rec_rset_type_field_fex): Likewise.
4279         (rec_rset_type_field_type): Likewise.
4281         * src/rec-field-name.c (rec_field_name_part_str_p): Use rec_match
4282         instead of regcomp/regexec.
4283         (rec_field_name_str_p): Likewise.
4284         * src/rec-int.c (rec_int_rec_type_p): Likewise.
4286         * src/rec-fex.c (rec_fex_check): Use the REC_*_RE constants.
4288         * src/rec-utils.h (REC_FNAME_LIST_CS_RE): New constant.
4289         (REC_FNAME_LIST_RE): Likewise.
4290         (REC_FNAME_LIST_SUB_RE): Likewise.
4292 2011-11-20  Jose E. Marchesi  <jemarch@gnu.org>
4294         librec: avoid duplication of error reporting code in rec-int.c.
4295         * src/rec-int.c (ADD_ERROR): New macro.
4296         (rec_int_check_rset): Use ADD_ERROR.
4297         (rec_int_check_rset): Likewise.
4298         (rec_int_check_record_mandatory): Likewise.
4299         (rec_int_check_record_unique): Likewise.
4300         (rec_int_check_record_prohibit): Likewise.
4301         (rec_int_check_record_secrets): Likewise.
4302         (rec_int_check_record_key): Likewise.
4303         (rec_int_check_descriptor): Likewise.
4304         (rec_int_merge_remote): Likewise.
4306 2011-11-20  Jose E. Marchesi  <jemarch@gnu.org>
4308         librec: avoid duplication of special field names in the codebase.
4309         * src/rec-parser.c (rec_parse_rset): Use rec_std_field_name.
4311         * src/rec-int.c (rec_int_check_descriptor): Use rec_std_field_name.
4312         (rec_int_merge_remote): Likewise.
4313         (rec_int_check_record_mandatory): Likewise.
4314         (rec_int_check_record_unique): Likewise.
4315         (rec_int_check_record_prohibit): Likewise.
4316         (rec_int_check_record_key): Likewise.
4318         * src/rec-rset.c (rec_rset_rename_field): Use rec_std_field_name.
4319         (rec_rset_set_type): Likewise.
4320         (rec_rset_type): Likewise.
4321         (rec_rset_url): Likewise.
4322         (rec_rset_update_size_constraints): Likewise.
4323         (rec_rset_update_field_props): Likewise.
4324         (rec_rset_update_types): Likewise.
4326         * src/rec-field-name.c (rec_std_field_name_s): New structure type.
4327         (rec_std_field_name_s): Global containing the names for the
4328         standard fields.
4329         (rec_std_field_name): New function.
4331 2011-11-19  Jose E. Marchesi  <jemarch@gnu.org>
4333         utils: new function recutl_yesno.
4334         * utils/recutl.c (recutl_yesno): New function.
4336 2011-11-19  Jose E. Marchesi  <jemarch@gnu.org>
4338         * gnulib update, and module readline imported.
4340 2011-11-19  Jose E. Marchesi  <jemarch@gnu.org>
4342         manual: document the -q,--quick command line argument in the
4343         utilities supporting it.
4344         * doc/recutils.texi (recsel Invocation): Documentation for the
4345         -q,--quick command line argument.
4346         (recdel Invocation): Likewise.
4347         (recins Invocation): Likewise.
4348         (recset Invocation): Likewise.
4350 2011-11-19  Jose E. Marchesi  <jemarch@gnu.org>
4352         torture: tests for -q,--quick.
4353         * torture/utils/recset.sh (multiple-records): New input file.
4354         (recset-quick-simple): New test.
4356         * torture/utils/recins.sh (recins-quick-simple): New test.
4358         * torture/utils/recdel.sh (recdel-quick-simple): New test.
4360         * torture/utils/recsel.sh (recsel-quick-simple): New test.
4361         (recsel-quick-and-sex): Likewise.
4362         (recsel-sex-and-quick): Likewise.
4363         (recsel-num-and-quick): Likewise.
4364         (recsel-quick-and-num): Likewise.
4366 2011-11-19  Jose E. Marchesi  <jemarch@gnu.org>
4368         recins: memory bug when several records get replaced fixed.
4369         * utils/recins.c (recins_add_new_record): Insert copies of the new
4370         record to insert, to cover cases where more than one record is
4371         replaced.
4373 2011-11-19  Jose E. Marchesi  <jemarch@gnu.org>
4375         utils: recset, recins, recdel and recsel adapted to support the
4376         -q, --quick option.
4377         * utils/recset.c (recset_process_actions): Honour
4378         recutl_quick_str.
4379         (recset_process_ren): Likewise.
4381         * utils/recins.c (recins_add_new_record): Honour recutl_quick_str.
4383         * utils/recdel.c (recdel_delete_records): Honour recutl_quick_str.
4384         (recdel_parse_args): Take into account recutl_quick_str when
4385         deciding whether a request to delete all records.
4386         (main): Likewise.
4388         * src/rec-record.c (rec_record_contains_value): New function.
4390         * utils/recutl.h (RECORD_SELECTION_SHORT_ARGS): Updated with q:.
4392         * utils/recset.c: New global recutl_quick_str.
4394         * utils/recdel.c: New global recutl_quick_str.
4395         (recutl_print_help): Document the usae of -q, --quick.
4397         * utils/recins.c: New global recutl_quick_str.
4398         (recutl_print_help): Document the usage of -q, --quick.
4400         * utils/recutl.c (recutl_print_help_record_selection): Document
4401         the usage of -q, --quick.
4403         * utils/recutl.h (RECORD_SELECTION_ARGS): QUICK_ARG added.
4404         (RECORD_SELECTION_LONG_ARGS): Entry for QUICK_ARG.
4405         (RECORD_SELECTION_ARGS_CASES): Likewise.
4407         * utils/recsel.c (recsel_process_data): Improve grammar in
4408         comment.
4409         (recutl_print_help): Document the usage of -q, --quick.
4410         (recutl_quick_str): New global variable.
4412 2011-11-15  Jose E. Marchesi  <jemarch@gnu.org>
4414         rec-init and rec-fini defined in the algol68 binding.
4415         * algol68/rec.a68 (rec init): New procedure.
4416         (rec fini): Likewise.
4418 2011-11-13  Jose E. Marchesi  <jemarch@gnu.org>
4420         Initial work on the Algol 68 binding for librec.
4421         * algol68/nameseed: New file.
4423         * Makefile.am (SUBDIRS): Recurse into algol68/ in case an Algol68
4424         compiler is available.
4426         * configure.ac: Check for the ca68 compiler.
4428         * algol68/Makefile.am: New file.
4430         * algol68/rec.a68: New file.
4431         Define 'rec major version', 'rec minor version' and 'rec version
4432         string'.
4434 2011-11-06  Jose E. Marchesi  <jemarch@gnu.org>
4436         configure: generation of the lexer fixed.
4437         * configure.ac: Define LEX_OUTPUT_ROOT so ylwrap can work
4438         propertly when flex is installed.
4440 2011-11-03  Jose E. Marchesi  <jemarch@gnu.org>
4442         Preparation for 1.4.
4443         * NEWS: Updated.
4445         * configure.ac: Version number changed to 1.4.
4447 2011-11-02  Jose E. Marchesi  <jemarch@gnu.org>
4449         Preparation for 1.3.91.
4450         * configure.ac: Version number changed to 1.3.91.
4452 2011-11-02  Jose E. Marchesi  <jemarch@gnu.org>
4454         src: endianess problem fixed in rec_encrypt/rec_decrypt.
4455         * src/rec-utils.h: Include stdlib.h and declare rec_endian_swap.
4457         * src/rec-utils.c (rec_endian_swap): New function.
4459         * src/rec-crypt.c (rec_encrypt): Store the crc always in
4460         little-endian.
4461         (rec_decrypt): Restore the crc in little-endian.
4463 2011-11-01  Jose E. Marchesi  <jemarch@gnu.org>
4465         * src/rec-crypt.c (rec_encrypt): Store the crc bytes in a way
4466         independant of the endianess.
4468 2011-11-01  Jose E. Marchesi  <jemarch@gnu.org>
4470         torture: portability problem with malloc.h fixed.
4471         * torture/rec-fex/rec-fex-str.c: Include stdlib.h instead of
4472         malloc.h to avoid problems in systems not featuring the second
4473         header.
4475 2011-10-31  Jose E. Marchesi  <jemarch@gnu.org>
4477         torture: support the running of the tests in Windows.
4478         * torture/utils/testutils.sh: Append $EXEEXT to the utility name.
4479         Source config.sh.
4481         * torture/utils/config.sh.in (EXEEXT): Make it available to the
4482         tests.
4484 2011-10-31  Jose E. Marchesi  <jemarch@gnu.org>
4486         Fixes to avoid warnings while compiling the codebase.
4487         * src/rec-utils.c (rec_parse_regexp): Set result to NULL if there
4488         is not match.
4490         * src/rec-types.c (rec_type_descr_p): Get a const char* parameter.
4491         (rec_type_new): Likewise.
4493         * src/rec-rset.c (rec_rset_update_field_props): Make p and q const
4494         char*.
4496         * src/rec-utils.c (rec_skip_blanks): Get a const char** parameter.
4497         (rec_parse_regexp): Likewise.
4498         (rec_atoi): Likewise.
4499         (rec_atod): Likewise.
4500         (rec_extract_file): Likewise.
4501         (rec_extract_url): Likewise.
4502         (rec_extract_type): Likewise.
4503         (rec_parse_int): Likewise.
4504         (rec_extract_size_condition): Likewise.
4506         * src/rec-rset.c (rec_rset_type_field_p): Make local pointer p
4507         const.
4509         * src/rec-writer.c (rec_write_record): Return
4510         rec_write_record_with_rset.
4511         (rec_write_field): Likewise with rec_write_field_with_rset.
4513         * utils/recset.c (recset_process_actions): Parenthesis around &&
4514         and || added.
4515         * utils/recdel.c (recdel_delete_records): Likewise.
4517         * utils/mdb2rec.c (process_table): Use column_name instead of
4518         col->name.
4520         * utils/recfix.c (recfix_do_crypt): Unused variable elem_record
4521         removed.
4522         (main): Unused variable db removed.
4524         * utils/recutl.c: Include sys/stat.h.
4526 2011-10-31  Jose E. Marchesi  <jemarch@gnu.org>
4528         torture: fix warnings in the rec-mset unit tests.
4529         * torture/rec-mset/elem-types.h (type1_disp): Free s instead of
4530         the void pointer.
4531         (type2_disp): Likewise.
4533 2011-10-31  Jose E. Marchesi  <jemarch@gnu.org>a
4535         Examples sections removed from the --help outputs.
4536         * utils/csv2rec.c (recutl_print_help): Examples removed from
4537         --help output.
4538         * utils/recset.c (recutl_print_help): Likewise.
4539         * utils/recsel.c (recutl_print_help): Likewise.
4540         * utils/recins.c (recutl_print_help): Likewise.
4541         * utils/recinf.c (recutl_print_help): Likewise.
4542         * utils/recfmt.c (recutl_print_help): Likewise.
4543         * utils/recdel.c (recutl_print_help): Likewise.
4544         * utils/rec2csv.c (recutl_print_help): Likewise.
4545         * utils/mdb2rec.c (recutl_print_help): Likewise.
4547 2011-10-31  Jose E. Marchesi  <jemarch@gnu.org>
4549         gnulib update.
4551 2011-10-30  Jose E. Marchesi  <jemarch@gnu.org>
4553         configure: do not require flex and bison at build time.
4554         * utils/recdel.c: Include xalloc.h.
4556         * configure.ac: Use gl_BISON instead of AM_PROG_YACC.
4558 2011-10-30  Jose E. Marchesi  <jemarch@gnu.org>
4560         Don't run tests associated with confidential fields when building
4561         the tools without crypt support.
4562         * .gitignore: torture/utils/config.sh added.
4564         * torture/utils/recfix.sh: include config.sh and test the
4565         encryption support only if the utilities were built with that
4566         support.
4568         * configure.ac: Generate torture/utils/config.sh
4570         * torture/utils/config.sh.in: New file.
4572         * configure.ac (REC_CRYPT_SUPPORT): Define and subst
4573         CRYPT_SUPPORT.
4575 2011-10-30  Jose E. Marchesi  <jemarch@gnu.org>
4577         Fixes for problems detected by the clang analyzer.
4578         * src/rec-sex.c (rec_sex_eval_node): Take care about possible
4579         divisions by zero when evaluating / and %.
4581         * utils/csv2rec.c (main): Unused local variable 'out' removed.
4583         * utils/recfmt.c (recfmt_process_db): Use rset_size to avoid
4584         calculating the size of the rset at every iteration.
4586         * torture/rec-comment/rec-comment-set-text.c
4587         (rec_comment_set_text_nominal): Use new version of
4588         rec_comment_set_text.
4590         * src/rec-comment.c (rec_comment_set_text): Get a pointer to
4591         comment in order to set its value.
4593         * src/rec-mset.c (rec_mset_remove_at): Unused local elem_type
4594         removed.
4596         * src/rec-parser.c (rec_parser_perror): Usage of uninitialized
4597         pointer fixed.
4599 2011-10-30  Jose E. Marchesi  <jemarch@gnu.org>
4601         Preparation for 1.3.90.
4602         * NEWS: Updated for 1.3.90.
4604         * configure.ac: Version updated to 1.3.90.
4606 2011-10-30  Jose E. Marchesi  <jemarch@gnu.org>
4608         * doc/recutils.texi (recsel Encryption): Written.
4609         (recins Encryption): Written.
4611 2011-10-29  Jose E. Marchesi  <jemarch@gnu.org>
4613         manual: documentation for %confidential fields.
4614         * doc/recutils.texi (%confidential): Written.
4616 2011-10-27  Jose E. Marchesi  <jemarch@gnu.org>
4618         Don't allow several %sort entries in record descriptors.
4619         * doc/recutils.texi (%sort): Document that only one %sort per
4620         record descriptor is allowed.
4622         * torture/utils/recfix.sh (recfix-sort-several-fields-invalid):
4623         New test.
4625         * src/rec-int.c (rec_int_check_descriptor): It is an error to have
4626         several %sort fields in a record descriptor.
4628 2011-10-27  Jose E. Marchesi  <jemarch@gnu.org>
4630         manual: documentation for %sort.
4631         * doc/recutils.texi (%sort): Written.
4633 2011-10-26  Jose E. Marchesi  <jemarch@gnu.org>
4635         manual: documenttion for %mandatory, %prohibit, %unique, %key and
4636         %auto rewritten.
4637         * doc/recutils.texi (%mandatory and %prohibit): Written.
4638         (%unique and %key): Written.
4639         (%auto): Improved and relocated.
4641 2011-10-25  Jose E. Marchesi  <jemarch@gnu.org>
4643         * doc/recutils.texi (Record Descriptors): Reworked and simplified.
4645 2011-10-16  Jose E. Marchesi  <jemarch@gnu.org>
4647         syntax fixes.
4648         * utils/recdel.c: Don't include xalloc.h.
4650         * .x-sc_prohibit_undesirable_word_seq: New file.
4652         * .x-sc_prohibit_strings_without_use: New file.
4654         * .x-sc_prohibit_path_max_allocation: New file.
4656         * .x-sc_prohibit_doubled_word: Ignored lib/*.
4658         * README-dev: Spell file systme.
4660 2011-10-13  Jose E. Marchesi  <jemarch@gnu.org>
4662         * doc/recutils.texi (Comments): Relocated.
4663         (Fields and Records): Matusalen -> Matusalem.
4665 2011-10-13  Jose E. Marchesi  <jemarch@gnu.org>
4667         manual: document the encryption options in recsel and recins.
4668         * doc/recutils.texi (recsel Invocation): Global options added,
4669         including a description of the --password argument.
4670         (recins Invocation): Document --password.
4671         (recins Invocation): Document --case-insensitive.
4673 2011-10-12  Jose E. Marchesi  <jemarch@gnu.org>
4675         torture: tests for the --sort operation of recfix.
4676         * torture/utils/recfix.sh (recfix-sort-ints): New test.
4677         (recfix-sort-ranges): New test.
4678         (recfix-sort-reals): New test.
4679         (recfix-sort-lex): New test.
4680         (recfix-sort-dates): New test.
4681         (recfix-sort-booleans): New test.
4683 2011-10-11  Jose E. Marchesi  <jemarch@gnu.org>
4685         * README-dev: URL to the git repo updated.
4687 2011-10-07  Jose E. Marchesi  <jemarch@gnu.org>
4689         recfix: manage --encrypt when there are already encrypted fields
4690         in the database.
4691         * torture/utils/recfix.sh (recfix-encrypt-already-encrypted): New
4692         test.
4693         (recfix-encrypt-already-encrypted-force): New test.
4695         * utils/recfix.c (recfix_do_crypt): Emit an error if an already
4696         encrypted field is found, unless --force was specified in the
4697         command line.
4698         (recutl_print_help): --force documented.
4699         (recfix_parse_args): Recognize --force.
4701         * src/rec-crypt.c (rec_encrypt_field): Make sure the field is not
4702         already encrypted before encrypting it.
4704 2011-10-07  Jose E. Marchesi  <jemarch@gnu.org>
4706         utils: typo fixed in help string.
4707         * utils/recsel.c (recutl_print_help): Typo in help string fixed.
4709 2011-10-06  Jose E. Marchesi  <jemarch@gnu.org>
4711         build: documentation of dependencies updated.
4712         * README-dev: Dependency on libgcrypt documented.
4714 2011-10-05  Jose E. Marchesi  <jemarch@gnu.org>
4716         manual: little fix.
4717         * doc/recutils.texi (mdb2rec Examples): Example fixed. Reported by
4718         Sven Wick.
4720 2011-10-04  Jose E. Marchesi  <jemarch@gnu.org>
4722         torture: tests for the --encrypt and --decrypt options of recfix.
4723         * torture/utils/recfix.sh (recfix-encrypt): New test.
4724         (recfix-encrypt-password-long): Likewise.
4725         (recfix-encrypt-without-password): Likewise.
4726         (recfix-encrypt-password-before-operation): Likewise.
4727         (recfix-decrypt-invalid-password): Likewise.
4729 2011-10-03  Jose E. Marchesi  <jemarch@gnu.org>
4731         torture: tests for the --check operation of recfix regarding
4732         encryption, and some fixes.
4733         * src/rec-int.c (rec_int_check_record_secrets): Return the number
4734         of errors that occurred while checking the integrity.
4736         * torture/utils/recfix.sh (recfix-with-operation): New test.
4737         (recfix-confidential): Likewise.
4738         (recfix-invalid-confidential): Likewise.
4739         (recfix-confidential-with-unencrypted-fields): Likewise.
4741 2011-10-03  Jose E. Marchesi  <jemarch@gnu.org>
4743         manual: documentation for recfix updated.
4744         * doc/recutils.texi (recfix Invocation): Documentation for the new
4745         synopsis of recfix, including a description of all the supported
4746         operations.
4747         (recfix Examples): Add more examples covering the several
4748         supported operations.
4750 2011-10-03  Jose E. Marchesi  <jemarch@gnu.org>
4752         * utils/recfix.c (recfix_do_crypt): Don't check integrity before
4753         doing an en/decryption operation.
4755 2011-10-03  Jose E. Marchesi  <jemarch@gnu.org>
4757         librec: more encryption related routines, and encryption support
4758         in recfix.
4759         * utils/recfix.c (recfix_do_crypt): Use rec_decrypt_record.
4761         * src/rec-crypt.c (rec_decrypt_record): New function.
4763         * src/rec-writer.c (rec_write_field_with_rset): Use
4764         rec_decrypt_field.
4766         * src/rec-crypt.c (rec_decrypt_field): New function.
4768         * utils/recfix.c (recfix_do_crypt): Adapted to the new semantics
4769         of rec_encrypt_record.
4770         * utils/recins.c (recins_insert_record): Likewise.
4771         (recins_add_new_record): Likewise.
4773         * src/rec-crypt.c (rec_encrypt_field): New function.
4774         (rec_encrypt_record): Use rec_encrypt_field.
4776 2011-09-30  Jose E. Marchesi  <jemarch@gnu.org>
4778         * utils/recins.c (recins_insert_record): Use rec_encrypt_record.
4779         (recins_encrypt_fields): Function removed.
4781         * src/rec-crypt.c (rec_encrypt_record): New function.
4783         * utils/recfix.c (main): Invoke the recfix_do_* functions
4784         depending on the selected operation.
4785         (recfix_do_check): New function.
4786         (recfix_check_database): Renamed from recfix_process_data.
4787         (recfix_parse_args): Made static, and adapted to use the new
4788         recfix_do_* functions.
4789         (recfix_do_sort): New function.
4791 2011-09-30  Jose E. Marchesi  <jemarch@gnu.org>
4793         build: install lisp files in the proper directory.
4794         * etc/Makefile.am: Install rec-mode.el in the proper place, and
4795         use the dist_ prefix instead of the EXTRA_DIST automake variable.
4796         Suggested by Ludovic Courtes.
4798 2011-09-19  Jose E. Marchesi  <jemarch@gnu.org>
4800         lib: missing sorting cases added.
4801         * src/rec-rset.c (rec_rset_record_compare_fn): Date sorting
4802         algorithm fixed.
4803         (rec_rset_record_compare_fn): Real sorting implemented.
4804         (rec_rset_record_compare_fn): Likewise for booleans.
4806 2011-09-11  Jose E. Marchesi  <jemarch@gnu.org>
4808         manual: argument description fixed.
4809         * doc/recutils.texi (Common Options): The description of the '--'
4810         option was truncated.  Fixed.
4812 2011-09-04  Jose E. Marchesi  <jemarch@gnu.org>
4814         recfix: normalise invocation to allow more commands.
4815         * utils/recfix.c: New type recfix_op.
4816         (recutl_print_help): Adapted to the new synopsis of recfix.
4817         (recutl_print_help): Don't include examples in the --help output.
4819 2011-09-01  Jose E. Marchesi  <jemarch@gnu.org>
4821         build: linking with libgcrypt fixed.
4822         * src/Makefile.am (librec_la_LIBADD): Link with $LTLIBGCRYPT if
4823         compiling with encryption support.
4824         * utils/Makefile.am (COMMONLIBS): Likewise.
4826 2011-08-28  Jose E. Marchesi  <jemarch@gnu.org>
4828         crypt: fix build with crypt support disabled.
4829         * src/rec-rset.c (rec_rset_get_props): Update confidential_p only
4830         if compiling with encryption support.
4832 2011-08-28  Jose E. Marchesi  <jemarch@gnu.org>
4834         recfix: check for non-encrypted confidential fields.
4835         * src/rec-int.c: Copyright year updated.
4836         (rec_int_check_record): Call rec_int_check_record_secrets.
4837         (rec_int_check_record_secrets): New function.
4839 2011-08-28  Jose E. Marchesi  <jemarch@gnu.org>
4841         lib: regression affecting auto fields fixed.
4842         * utils/recins.c (recins_add_new_record): Fix regression causing
4843         the loosing of the auto fields.
4844         (recins_add_new_record): Avoid memory leak destroying
4845         recins_record.
4847         * src/rec-rset.c (rec_rset_get_props): Initialize confidential_p
4848         to false.
4850 2011-08-28  Jose E. Marchesi  <jemarch@gnu.org>
4852         crypt: support for CRC and encrypted prefix.
4853         * src/rec-crypt.c: Include crc.h.
4854         (rec_decrypt): Check the CRC of decrypted data.
4855         (rec_encrypt): Append the CRC when encrypting.
4857 2011-08-28  Jose E. Marchesi  <jemarch@gnu.org>
4859         gnulib: imported module crc.
4860         * lib/crc.c: Imported from gnulib.
4861         * lib/crc.h: Likewise.
4863 2011-08-28  Jose E. Marchesi  <jemarch@gnu.org>
4865         * src/rec-writer.c (rec_write_record_with_rset): New function.
4866         (rec_write_field_with_rset): New function.
4868         * utils/recsel.c (recsel_process_data): Set the password of the
4869         writer, if specified on the command line.
4871         * src/rec-writer.c (rec_writer_new): Initialize the password field
4872         of the writer structure.
4873         (rec_writer_destroy): Free the memory used by the password, if
4874         any.
4875         (rec_writer_set_password): New function.
4877         * utils/recsel.c (recutl_print_help): Support the -s, --password
4878         option.
4879         (recsel_parse_args): Likewise.
4881         * src/rec-crypt.c (rec_decrypt): New function.
4883 2011-08-27  Jose E. Marchesi  <jemarch@gnu.org>
4885         * utils/recins.c: Include base64.h.
4887         * gnulib base64 module imported.
4889 2011-08-26  Jose E. Marchesi  <jemarch@gnu.org>
4891         * src/Makefile.am (librec_la_SOURCES): Compile rec-crypt.c if
4892         encryption is supported.
4894         * src/rec-crypt.c: New file.
4896         * utils/recins.c (recins_encrypt_fields): New function.
4898         * src/rec-rset.c (rec_rset_confidential): New function.
4900         * utils/recins.c: New variable recins_password.
4901         (recutl_print_help): Document -s,--password.
4902         (recins_parse_args): Set recins_password.
4904         * src/rec-utils.c (rec_encrypt): New function.
4905         (rec_decrypt): New function.
4906         (rec_passphrase_cb): New function.
4908         * src/rec-utils.c: Include gcrypt.h.
4910         * src/rec-int.c (rec_int_check_descriptor): Check for the value of
4911         %confidential entries.
4913         * src/rec-rset.c (rec_rset_rename_field): Rename field names in
4914         %confidential fields.
4915         (rec_rset_update_field_props): Set the confidential property of
4916         fields.
4918 2011-08-25  Jose E. Marchesi  <jemarch@gnu.org>
4920         * doc/recutils.texi (recfmt Templates): Typo fixed.
4922 2011-08-24  Jose E. Marchesi  <jemarch@gnu.org>
4924         * doc/recutils.texi (Introduction): Comment about YAML.
4926 2011-08-24  Jose E. Marchesi  <jemarch@gnu.org>
4928         * configure.ac: Complain if flex or bison are not found and exit.
4930 2011-08-24  Jose E. Marchesi  <jemarch@gnu.org>
4932         * Time-stamp marks removed from the entire codebase and syntax
4933         checks fixes.
4935 2011-08-15  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
4937         librec: Don't #include <config.h> in rec.h.
4938         * src/rec.h: Don't #include <config.h>.
4940 2011-08-05  Jose E. Marchesi  <jemarch@gnu.org>
4942         librec: acknowledge %sort entries when renaming fields.
4943         * src/rec-rset.c (rec_rset_rename_field): Rename fields used as
4944         sorting criteria in %sort: entries.
4946         * torture/utils/recset.sh: Tests renaming fields updated to cover
4947         %sort entries.
4949 2011-08-05  Jose E. Marchesi  <jco@terma.com>
4951         * etc/ob-rec.el (org-babel-execute:rec): Separate header when
4952         generating tables.
4953         (org-babel-execute:rec): Generate raw data when executed with
4954         results: verbatim.
4956 2011-08-05  Jose E. Marchesi  <jemarch@gnu.org>
4958         ob-rec: support for :sort and minor fixes.
4959         * etc/ob-rec.el (org-babel-execute:rec): Support for :sort added.
4960         (org-babel-execute:rec): Emit rec data, and not csv, when executed
4961         with results: scalar, html or code.
4963 2011-07-29  Jose E. Marchesi  <jemarch@gnu.org>
4965         librec: sorting by date values implemented.
4966         * src/rec-rset.c (rec_rset_record_compare_fn): Sorting by date
4967         value implementing.
4969         * src/rec-sex.c (rec_sex_eval_node): Use rec_timespec_subtract.
4971         * src/rec-utils.c (rec_timespec_subtract): Moved from rec-sex.c.
4973 2011-07-28  Jose E. Marchesi  <jemarch@gnu.org>
4975         manual: documentation for %sort and %typedef.
4976         * doc/recutils.texi (Record Descriptors): Document %typedef in the
4977         list of special fields.
4978         (Record Descriptors): Likewise for %sort.
4979         (recsel Invocation): Document -S,--sort.
4980         (rec2csv Invocation): Likewise.
4982 2011-07-21  Jose E. Marchesi  <jemarch@gnu.org>
4984         manual: documentation for the sorting option of recfix.
4985         * doc/recutils.texi (recfix Invocation): Synopsis fixed.
4986         (recfix Invocation): Document the --sort operation.
4987         (recfix Examples): Example of --sort added.
4989 2011-07-21  Jose E. Marchesi  <jemarch@gnu.org>
4991         recfix: support the phisical sort operation.
4992         * utils/recfix.c (main): Use recutl_read_db_from_file.
4993         (recfix_parse_args): Set the value of recfix_file from the command
4994         line and complain if no file was provided.
4995         (recutl_print_help): Document the new usage of the command.
4996         (recutl_print_help): Documnt the --sort option.
4997         (recfix_parse_args): Manage --sort.
4998         (main): Update the rec file if an operation requires it.
5000 2011-07-21  Jose E. Marchesi  <jemarch@gnu.org>
5002         librec: check the integrity of %sort entries, and tests.
5003         * torture/utils/recfix.sh (recfix-sortcheck-valid): New test.
5004         (recfix-sortcheck-with-blanks): Likewise.
5005         (recfix-sortcheck-invalid-empty): Likewise.
5006         (recfix-sortcheck-invalid-field-name): Likewise.
5008         * src/rec-int.c (rec_int_check_descriptor): Make sure that %sort
5009         fields have correct values.
5011 2011-07-21  Jose E. Marchesi  <jemarch@gnu.org>
5013         librec: options -S,--sort supported in recsel and rec2csv.
5014         * utils/rec2csv.c (recutl_print_help): Documentation for
5015         --sort,-S.
5016         (rec2csv_parse_args): Manage --sort, -S.
5018         * utils/recsel.c: New command-line argument --sort, -S.
5019         (recutl_print_help): Documentation for --sort, -S.
5020         (recsel_parse_args): Manage -S.
5022         * doc/recutils.texi (recinf Invocation): -S is not like
5023         --print-sexps anymore.
5025         * utils/recutl.c (recutl_sorting_parser): Get a field name as a
5026         sorting criteria.
5028         * src/rec-rset.c (rec_rset_update_field_props): %sort only has an
5029         effect if order_by_field is not already set in the record set.
5031         * src/rec-parser.c (rec_parser_new): Initialize order_by_field to
5032         NULL.
5033         (rec_parser_set_order_by_field): New function.
5035         * src/rec-rset.c: New function.
5036         (rec_rset_order_by_field): New function.
5038 2011-07-19  Jose E. Marchesi  <jemarch@gnu.org>
5040         librec: record sorting implementation, and tools adjusted.
5041         * utils/recsel.c (main): Likewise.
5043         * utils/recfmt.c (main): Likewise.
5045         * utils/rec2csv.c (main): Call recutl_sorting_parser with the
5046         appropriate value.
5048         * utils/recutl.c (recutl_sorting_parser): New function.
5050         * utils/recutl.c (recutl_parse_db_from_file): Set the ordered
5051         attribute of the parser to the value of the global recutl_sort_p.
5053         * src/rec-parser.c (rec_parser_new): Initialise ordered_p to
5054         false.
5055         (rec_parser_set_ordered): New function.
5056         (rec_parser_ordered): New function.
5057         (rec_parse_rset): Set the ordered attribute of the newly created
5058         record set to the desired value.
5060         * src/rec-rset.c: New structure rec_rset_comment_s.
5061         (rec_rset_elem_comment_new): Use rec_rset_comment_s.
5062         (rec_rset_elem_comment): Likewise.
5063         (rec_rset_comment_disp_fn): Likewise.
5064         (rec_rset_comment_dup_fn): Likewise.
5065         (rec_rset_set_ordered): New function.
5066         (rec_rset_ordered): New function.
5067         (rec_rset_insert_at): Insert sorting only if ordered_p.
5068         (rec_rset_append): Likewise.
5069         (rec_rset_append_record): Likewise.
5070         (rec_rset_insert_after): Likewise.
5071         (rec_rset_dup): Copy ordered_p.
5073 2011-07-19  Jose E. Marchesi  <jco@terma.com>
5075         librec: use mset_add_sort in all record inserting operations in
5076         rec-rset.
5077         * src/rec-rset.c (rec_rset_insert_at): If the rset has a sort by
5078         field and the element to be inserted is a record, insert it using
5079         the sorting criteria instead of the requested location.
5080         (rec_rset_append): Likewise.
5081         (rec_rset_insert_after): Likewise.
5083 2011-07-18  Jose E. Marchesi  <jemarch@gnu.org>
5085         librec: initial support for %sort.
5086         * src/rec-rset.c (rec_rset_comment_compare_fn): New function.
5087         (rec_rset_record_compare_fn): New function.
5088         (rec_rset_update_field_props): Manage the %sort special field.
5090         * src/rec-record.c (rec_record_new): Pass NULL for the compare
5091         function to rec_mset_register_type.
5093         * src/rec-mset.c (rec_mset_add_sorted): New function.
5094         (rec_mset_new): Initialize the compare_fn function for types to
5095         NULL.
5096         (rec_mset_dup): Make a copy of compare_fn.
5097         (rec_mset_register_type): Get a compare_fn argument.
5098         (rec_mset_elem_compare_fn): New function.
5100         * src/rec-mset.h: New type rec_mset_compare_fn_t.
5102         * src/rec-rset.c: New attribute 'order_by_field' in struct
5103         rec_rsets.
5104         New structure rec_rset_record_s.
5105         (rec_rset_new): Initialise the order by field name to NULL.
5106         (rec_rset_destroy): Destroy the order by field name if it exists
5107         in the record set.
5108         (rec_rset_dup): Care about the order by field, if any.
5109         (rec_rset_append_record): Use rec_mset_add_sorted to add the
5110         record to the mset if there is a sort by field.
5111         (rec_rset_elem_record_new): Insert a rec_rset_record_t instead of a
5112         rec_record_t in the mset.
5113         (rec_rset_record_disp_fn): Destroy a rec_rset_record_t structure,
5114         including the contained record.
5115         (rec_rset_record_dup_fn): Dup a rec_rset_record_t structure,
5116         including the contained record.
5118 2011-07-17  Jose E. Marchesi  <jemarch@gnu.org>
5120         torture: system tests for typedefs.
5121         * torture/utils/recfix.sh (typedef-valid): New input file.
5122         (typedef-valid-xfail): Likewise.
5123         (typedef-valid-with-blanks): Likewise.
5124         (typedef-valid-with-blanks-xfail): Likewise.
5125         (typedef-valid-order): Likewise.
5126         (typedef-valid-order-xfail): Likewise.
5127         (typedef-valid-chain): Likewise.
5128         (typedef-valid-chain-xfail): Likewise.
5129         (typedef-valid-multiple): Likewise.
5130         (typedef-valid-multiple-xfail): Likewise.
5131         (typedef-invalid-bad-type): Likewise.
5132         (typedef-invalid-chain-undefined): Likewise.
5133         (typedef-invalid-chain-loop): Likewise.
5134         (recfix-typedef-valid): New test.
5135         (recfix-typedef-valid-xfail): Likewise.
5136         (recfix-typedef-valid-with-blanks): Likewise.
5137         (recfix-typedef-valid-with-blanks-xfail): Likewise.
5138         (recfix-typedef-valid-order): Likewise.
5139         (recfix-typedef-valid-order-xfail): Likewise.
5140         (recfix-typedef-valid-chain): Likewise.
5141         (recfix-typedef-valid-chain-xfail): Likewise.
5142         (recfix-typedef-valid-multiple): Likewise.
5143         (recfix-typedef-valid-multiple-xfail): Likewise.
5144         (recfix-typedef-invalid-bad-type): Likewise.
5145         (recfix-typedef-invalid-chain-undefined): Likewise.
5146         (recfix-typedef-invalid-chain-loop): Likewise.
5148 2011-07-17  Jose E. Marchesi  <jemarch@gnu.org>
5150         manual: documentation for %typedef.
5151         * doc/recutils.texi (Field Types): Rewritten to introduce field
5152         types in a clearer way.
5153         (Declaring types): New section.
5154         (Type descriptions): New section.
5155         (Escalar types): Rewritten as a subsection.
5156         (String types): Likewise.
5157         (Enumerated types): Likewise.
5158         (Other types): Likewise.
5159         (Types and fields): New section.
5161 2011-07-17  Jose E. Marchesi  <jemarch@gnu.org>
5163         librec: support for synonyms in type registries.
5164         * src/rec-rset.c (rec_rset_update_types): Manage the declaration
5165         of synonyms in %typedef entries.
5167         * src/rec-types.c: New struct rec_type_reg_entry_s.
5168         (rec_type_reg_destroy): Adapted to the new structure of type
5169         registry entries.
5170         (rec_type_reg_add): Likewise.
5171         (rec_type_reg_get): Likewise.
5172         (rec_type_reg_add_synonym): New function.
5174         * src/rec-int.c (rec_int_check_descriptor): Check for the
5175         existance of referred named types.
5177 2011-07-17  Jose E. Marchesi  <jemarch@gnu.org>
5179         librec: support for %typedef.
5180         * src/rec-int.c (rec_int_check_descriptor): Verify %typedef
5181         entries.
5183         * src/rec-types.c: REC_TYPE_NAME_RE renamed to REC_TYPE_CLASS_RE
5184         to not collide with the macro of the same name defined in rec.h.
5186         * src/rec.h (REC_TYPE_NAME_RE): New constant.
5188         * src/rec-int.c (rec_int_check_descriptor): Accept type names in
5189         type descriptions.
5191         * src/rec-rset.c (rec_rset_rename_field): Update field props after
5192         the rename of a field.
5193         (rec_rset_update_types): Rewritten to process %typedef entries.
5194         (rec_rset_type_field_p): Allow %type entries with named types.
5196 2011-07-16  Jose E. Marchesi  <jemarch@gnu.org>
5198         librec: manage anonymous types using the fields props structures.
5199         * src/rec-rset.c (rec_rset_new): Create an empty types registry.
5201         * src/rec-types.c: Data structures storing the associations
5202         removed.
5203         (rec_type_reg_destroy): Assocs code removed. Destroy the types.
5204         (rec_type_reg_assoc): Deleted.
5205         (rec_type_reg_assoc_anon): Deleted.
5206         (rec_type_reg_field_type): Deleted.
5208         * src/rec-int.c (rec_int_check_field_type): Use
5209         rec_rset_get_field_name instead of the type registry of the rset.
5210         (rec_int_check_descriptor): Likewise.
5212         * src/rec-rset.c (rec_rset_update_field_props): Renamed from
5213         rec_rset_update_auto_fields.
5214         (rec_rset_get_field_type): Use the field properties to find and
5215         return the type of a given field.
5216         (rec_rset_update_field_props): Update type properties in the field
5217         props.
5219 2011-07-16  Jose E. Marchesi  <jemarch@gnu.org>
5221         librec: manage auto fields with the new fields properties
5222         structure in record sets.
5223         * utils/recins.c (recins_add_auto_fields): rec_rset_auto now
5224         returns the auto fields in the right order, so no need to reverse
5225         it.
5227         * src/rec-rset.c: New structure rec_rset_fprops_s to hold the
5228         properties of a field.
5229         New field field_props in the rec_rset_s struct.
5230         (rec_rset_new): Initialise field_props to NULL.
5231         (rec_rset_get_props): New function.
5232         (rec_rset_update_auto_fields): Update field_props instead of the
5233         auto_fields fex.
5234         (rec_rset_auto): Build a fex from the contents of field_props and
5235         return it.
5236         (rec_rset_destroy): Destroy field_props.
5238 2011-07-16  Jose E. Marchesi  <jemarch@gnu.org>
5240         torture: type-reg tests adapted.
5241         * torture/rec-type-reg/rec-type-reg-assoc-anon.c: Renamed from
5242         rec-type-reg-register.c, and adapted to the new semantics.
5244         * torture/rec-type-reg/rec-type-reg-get.c: Adapted to the new
5245         semantics of rec_type_reg_get.
5247 2011-07-15  Jose E. Marchesi  <jemarch@gnu.org>
5249         librec: support for named types in type registries.
5250         * src/rec-rset.c (rec_rset_get_field_type): Likewise.
5252         * src/rec-int.c (rec_int_check_field_type): Use
5253         rec_type_reg_get_type instead of rec_type_reg_get.
5254         (rec_int_check_descriptor): Likewise.
5256         * src/rec-types.c (rec_type_reg_add): New function.
5257         (rec_type_reg_assoc_anon): Renamed from rec_type_reg_register.
5258         (rec_type_reg_assoc): New function.
5259         (rec_type_reg_get): New function.
5260         (rec_type_reg_assoc): Renamed from rec_type_reg_get and adapted to
5261         use the new registry internal structure.
5263 2011-07-14  Jose E. Marchesi  <jemarch@gnu.org>
5265         librec: attribute 'name' for types.
5266         * torture/rec-type/tsuite-rec-type.c (tsuite_rec_type): Test cases
5267         for rec_type_name and rec_type_set_name added.
5269         * torture/rec-type/rec-type-name.c: New file.
5270         (rec_type_name_anonymous): New test.
5271         (rec_type_name_nominal): New test.
5273         * torture/rec-type/rec-type-set-name.c: New file.
5274         (rec_type_set_name_nominal): New test.
5276         * src/rec-types.c: New field 'name' in struct rec_type_s to hold
5277         the name of the type, or NULL for an anonymous type.
5278         (rec_type_name): New function.
5279         (rec_type_set_name): New function.
5280         (rec_type_new): Initialize the name to NULL.
5281         (rec_type_new): type_name_str renamed to type_kind_str to avoid
5282         confusion.
5283         (rec_type_destroy): Deallocate type->name upon destruction.
5285 2011-07-14  Jose E. Marchesi  <jemarch@gnu.org>
5287         librec: improvements in the api of rec_type.
5288         * torture/rec-type/rec-type-check.c: Changed to use the new
5289         rec_type_* API.
5290         * torture/rec-type/rec-type-descr-p.c: Likewise.
5291         * torture/rec-type-reg/rec-type-reg-get.c: Likewise.
5292         * torture/rec-type-reg/rec-type-reg-register.c: Likewise.
5293         * torture/rec-type/rec-type-new.c: Likewise.
5294         * torture/rec-type/rec-type-kind-str.c: Likewise.
5295         * torture/rec-type/rec-type-kind.c: Likewise.
5296         * torture/rec-type/rec-type-equal-p.c: Likewise.
5297         * torture/rec-type/rec-type-destroy.c: Likewise.
5299         * torture/rec-type/tsuite-rec-type.c: Tests for rec_type_descr_fex
5300         and rec_type_descr_type removed.
5302         * src/rec-rset.c (rec_rset_type_field_type): New function.
5303         (rec_rset_rename_field): Use rec_rset_type_field_type instead of
5304         rec_type_descr_type.
5306         * src/rec-types.c: rec_type_descr_fex function removed.
5307         * src/rec.h: Likewise.
5309         * src/rec-rset.c (rec_rset_update_types): Parse the list of fields
5310         before invoking rec_type_new while processing %type: special
5311         fields.
5312         (rec_rset_type_field_p): New function.
5313         (rec_rset_update_types): Use rec_rset_type_field_p instead of
5314         rec_type_descr_p.
5315         (rec_rset_rename_field): Likewise.
5316         (rec_rset_type_field_fex): New function.
5317         (rec_rset_rename_field): Use rec_rset_type_field_fex instead of
5318         rec_type_descr_fex.
5319         (rec_rset_update_types): Likewise.
5321         * src/rec-int.c (rec_int_check_descriptor): Likewise.
5323         * src/rec-types.c (rec_type_new): Do not expect the list of field
5324         names in the STR parameter.
5326         * src/rec-utils.c (rec_parse_regexp): Don't store the result of
5327         the parsing in 'result' if it is NULL.
5329 2011-06-21  Jose E. Marchesi  <jco@terma.com>
5331         build: get offline builds working again.
5332         * man/Makefile.am (rec2csv.1): Use $(builddir) to get offline
5333         builds working.
5334         (csv2rec.1): Likewise.
5335         (mdb2rec.1): Likewise.
5336         (recdel.1): Likewise.
5337         (recfix.1): Likewise.
5338         (recinf.1): Likewise.
5339         (recins.1): Likewise.
5340         (recsel.1): Likewise.
5341         (recset.1): Likewise.
5342         (recfmt.1): Likewise.
5344         * .gitignore: build-aux/config.guess, build-aux/config.sub.
5346 2011-06-19  Jose E. Marchesi  <jemarch@gnu.org>
5348         utils: avoid the truncation of the result of getopt_long in
5349         architectures featuring unsigned chars.
5350         * utils/recfix.c (recfix_parse_args): 'ret' shall be an integer to
5351         not truncate the -1 returned by getopt_long in architectures
5352         featuring unsigned chars.
5353         * utils/recsel.c (recsel_parse_args): Likewise.
5354         * utils/recinf.c (main): Likewise.
5355         * utils/recfmt.c (recfmt_parse_args): Likewise.
5357 2011-06-19  Jose E. Marchesi  <jemarch@gnu.org>
5359         m4: files installed by libtool removed.  They were causing a clash
5360         on some systems shipping old versions of libtool.
5361         * m4/ltoptions.m4: Deleted.
5363 2011-06-17  Jose E. Marchesi  <jemarch@gnu.org>
5365         recins: create the specified file if it does not exist.
5366         * doc/recutils.texi (recins Invocation): recins will create a new
5367         file if it does not exist.
5369         * utils/recset.c (main): Likewise.
5371         * utils/recdel.c (main): Print an error message if the file could
5372         not be opened.
5374         * utils/recutl.c (recutl_read_db_from_file): Return NULL if the
5375         file could not be opened.
5377         * utils/recins.c (main): If the specified file does not exist then
5378         create and populate an empty database.
5380 2011-06-17  Jose E. Marchesi  <jemarch@gnu.org>
5382         recins: generate parseable dates that are locale independent.
5383         * utils/recins.c: Include locale.h.
5384         (recins_add_auto_field_date): Set the LC_TIME locale setting to
5385         "C" before calling strftime and restore it to the environment
5386         value afterwards.
5388 2011-06-09  Jose E. Marchesi  <jemarch@gnu.org>
5390         ob-rec.el is not part of Emacs.
5391         * etc/ob-rec.el: Not part of Emacs yet.
5393 2011-06-09  Jose E. Marchesi  <jemarch@gnu.org>
5395         gitignore updated.
5396         * .gitignore: Several entries added to the ignore list.
5398 2011-05-24  Jose E. Marchesi  <jemarch@gnu.org>
5400         On MAC OS X, GNU libtoolize is named 'glibtoolize'.
5401         * autogen.sh: Use glibtoolize instead of libtoolize in Darwin
5402         systems.  Reported and fixed by Sven Wick.
5404 2011-05-18  Jose E. Marchesi  <jemarch@gnu.org>
5406         Updates to the FSD file.
5407         * FSD (Version): Updated to 1.3
5408         (MaturityLevel): Updated to Production.
5409         (HelpList): New entry.
5411 2011-05-16  Jose E. Marchesi  <jemarch@gnu.org>
5413         Fix size constraint handling on LP64 systems.  Patch sent by Daiki
5414         Ueno.
5416 2011-05-10 Jose E. Marchesi <jemarch@termi>
5418         Tasktool operations.
5419         * TODO: Task 25 resolved to 'DONE'.
5420         Task 35 created.
5422 2011-05-10  Jose E. Marchesi  <jemarch@gnu.org>
5424         librec: support for double quotes for delimiting string literals,
5425         and unescaped newline characters.
5426         * torture/utils/recsel.sh (recsel-sex-string-single-quote): New
5427         test.
5428         (recsel-sex-string-double-quote): New test.
5429         (recsel-sex-string-multiline): New test.
5431         * doc/recutils.texi (SEX Operands): Description of string literals
5432         updated to cover the usage of " as a delimiter and the support for
5433         non-scaped newline characters.
5435         * src/rec-sex-lex.l: Regular expression for string literals
5436         changed to support both ' and " style quotes and to support
5437         newline characters.
5439 2011-05-05  Jose E. Marchesi  <jemarch@gnu.org>
5441         Remove unneeded library linkages.  Problem reported by Sven Wick.
5442         * utils/Makefile.am (mdb2rec_LDADD): Don't link mdb2rec with glib
5443         in a direct way.
5444         (COMMONLIBS): Don't link the utilities with libgnu.la.
5446         * torture/Makefile.am (runtests_LDADD): Typo fixed: CHECK_LIBS to
5447         CHECKLIBS.
5449         * src/Makefile.am (librec_la_LIBADD): Link with libcurl only if
5450         the REMOVE_ESCRIPTORS automake conditional is set.
5452         * configure.ac: Avoid automatic linking with libcurl by specifying
5453         an action for library-if-found in AC_CHECK_LIB.
5454         Same for libcheck.
5455         Subst CHECKLIBS.
5457 2011-05-04  Jose E. Marchesi  <jemarch@gnu.org>
5459         ob-rec.el imported in the repo.
5460         * etc/ob-rec.el: New file.
5462 2011-03-23  Jose E. Marchesi  <jemarch@gnu.org>
5464         readme: added note about year intervals in the copyrights.
5465         * README: The GNU maintainers guide asks to include an explicit
5466         statement explaining the usage of year intervals in the copyright
5467         notifications.
5469 2011-02-11  Jose E. Marchesi  <jemarch@gnu.org>
5471         Preparation for 1.3.
5472         * .gitignore: Trailing empty line removed.
5474         * configure.ac: Version changed to 1.3.
5476 2011-02-11  Jose E. Marchesi  <jemarch@gnu.org>
5478         Translations updated.
5479         * po/de.po: Updated from the translation project.
5480         * po/fi.po: Likewise.
5481         * po/nl.po: Likewise.
5482         * po/sv.po: Likewise.
5484 2011-02-09  Jose E. Marchesi  <jemarch@gnu.org>
5486         Documentation for %size.
5487         * doc/recutils.texi (Record Descriptors): Documentation of the
5488         %size special field.
5490 2011-02-09  Jose E. Marchesi  <jemarch@gnu.org>
5492         Tests for the %size special field.
5493         * torture/utils/recfix.sh: New input files size-invalid-1,
5494         size-invalid-2, size-exact-zero, size-exact-zero-invalid,
5495         size-exact, size-exact-invalid, size-less, size-less-invalid,
5496         size-less-equal, size-less-equal-invalid, size-bigger,
5497         size-bigger-invalid, size-bigger-equal and
5498         size-bigger-equal-invalid.
5499         (recfix-size-invalid-1): New test.
5500         (recfix-size-invalid-2): New test.
5501         (recfix-size-exact-zero): New test.
5502         (recfix-size-exact-zero-invalid): New test.
5503         (recfix-size-exact): New test.
5504         (recfix-size-exact-invalid): New test.
5505         (recfix-size-less): New test.
5506         (recfix-size-less-invalid): New test.
5507         (recfix-size-less-equal): New test.
5508         (recfix-size-less-equal-invalid): New test.
5509         (recfix-size-bigger): New test.
5510         (recfix-size-bigger-invalid): New test.
5511         (recfix-size-bigger-equal): New test.
5512         (recfix-size-bigger-equal-invalid): New test.
5514 2011-02-08  Jose E. Marchesi  <jemarch@gnu.org>
5516         portability fix for macos x.
5517         * torture/rec-type/rec-type-descr-type.c: Include stdlib.h for
5518         malloc, not malloc.h.  Macos X does not provide malloc.h
5520 2011-02-08  Jose E. Marchesi  <jemarch@gnu.org>
5522         manual: several texinfo fixes and improvements.
5523         * doc/recutils.texi: Use @dots{}.
5524         Use @: after i.e. and e.g. to avoid texinfo to insert double
5525         spacing.
5526         (recfmt Examples): Fix incomplete statement.
5527         Use @var{} for all the parameters in synopsis.
5529 2011-02-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5531         Fix typos and nits in the manual.
5532         * doc/recutils.texi (Introduction, Record Descriptors)
5533         (SEX Operands, recsel Invocation, recset Invocation)
5534         (recfix Examples, recfmt Templates, rec2csv Conversion):
5535         Fix typos, add a few @noindent's.
5537 2011-02-08  Jose E. Marchesi  <jemarch@gnu.org>
5539         warnings fixed in the codebase.
5540         * src/rec-utils.c (rec_extract_size): Cast the second argument to
5541         rec_parse_int from size_t* to int*.
5543         * src/rec-rset.c (rec_rset_update_size_constraints): Unused
5544         variable record_elem removed.
5545         (rec_rset_source): Unused variable rset_elem removed.
5547         * src/rec-int.c (rec_int_merge_remote): Return 0.
5548         (rec_int_check_descriptor): Unused variables size_max, size_min,
5549         size and invalid_sizes removed.
5551         * utils/recins.c (recins_add_new_record): Unused variables
5552         errors_str_size, errors_str and errors_buf removed.
5553         (recins_add_auto_field_int): Unused variable new_field removed.
5555         * utils/recdel.c (recdel_delete_records): Unused variable
5556         'errors_buf' removed.
5558         * utils/recfmt.c (recfmt_apply_template): Unused variable 'n'
5559         removed.
5561         * utils/rec2csv.c (rec2csv_generate_csv): Unused variable
5562         'field_index' removed.
5564         * utils/mdb2rec.c (get_field_name): Unused variables field_part_0,
5565         field_part_1 and field_part_2 removed.
5566         (process_table): Unused variable j removed.
5567         (process_mdb): Unused variables 'in' and 'rset' removed.
5568         (main): Set 'ret' to success or failure.
5570         * torture/rec-type-reg/rec-type-reg-get.c (START_TEST): Unused
5571         variable 'type' removed.
5573         * torture/rec-parser/rec-parse-db.c (START_TEST): Unused variable
5574         stm removed.
5576         * torture/rec-parser/rec-parser-eof.c (START_TEST): Unused
5577         variable ci removed.
5579 2011-02-07  Jose E. Marchesi  <jemarch@gnu.org>
5581         List of ignored files updated.
5582         * .gitignore: Ignore generated po/*mo files.
5583         Ignore the doc/manual directory.
5585 2011-02-07  Jose E. Marchesi  <jemarch@gnu.org>
5587         librec: implementation of the %size field.
5588         * src/rec-rset.c (rec_rset_min_records): New function.
5589         (rec_rset_max_records): New function.
5590         (rec_rset_source): New function.
5592         * src/rec-int.c (rec_int_check_rset): Verify the size restrictions
5593         of the record set.
5595         * src/rec-utils.c (rec_extract_size): New function.
5596         (rec_extract_size_condition): Likewise.
5598         * src/rec-rset.c (rec_rset_update_size_constraints): New function.
5600         * src/rec-utils.c (rec_match): New function.
5602         * src/rec-rset.c (struct rec_rset_s): New fields min_size and
5603         max_size.
5604         (rec_rset_new): Initialize rset->size_min and rset->size_max.
5605         (rec_rset_set_descriptor): Update size constraints.
5606         (rec_rset_update_size_constraints): New function.
5607         Include stdint.h for SIZE_MAX.
5609         * src/rec-int.c (rec_int_check_descriptor): Check for the validity
5610         of values of %size fields.
5612 2011-02-07  Jose E. Marchesi  <jemarch@gnu.org>
5614         librec: problem with non initialized variable fixed.
5615         * src/rec-int.c (rec_int_check_descriptor): Initialize 'res' to 0.
5617 2011-02-04  Jose E. Marchesi  <jemarch@gnu.org>
5619         Preparation for 1.2.
5620         * NEWS: Updated for 1.2.
5622         * configure.ac: Version changed from 1.1.90 to 1.2.
5624 2011-02-04  Jose E. Marchesi  <jemarch@gnu.org>
5626         Translations for German, Swedish, Finnish and Ducht.
5627         * po/de.po: New file from the FTP.
5628         * po/sv.po: Likewise.
5629         * po/nl.po: Likewise.
5630         * po/fi.po: Likewise.
5632         * po/LINGUAS: New file.
5634 2011-02-04  Jose E. Marchesi  <jemarch@gnu.org>
5636         manual: some examples fixed.
5637         * doc/recutils.texi (Escalar types): Fix example.
5638         (Enumerated types): Likewise.
5640 2011-02-02  Jose E. Marchesi  <jemarch@gnu.org>
5642         Preparation for 1.1.90.
5643         * .x-sc_prohibit_strcmp: Added torture/*.
5645         * .x-sc_prohibit_stddef_without_use: New file.
5647         * po/recutils.pot: Updated for 1.1.90.
5649         * NEWS: Updated for 1.1.90.
5651         * configure.ac: Version changed to 1.1.90.
5653 2011-02-02  Jose E. Marchesi  <jemarch@gnu.org>
5655         rec2csv: documentation.
5656         * doc/recutils.texi (rec2csv): New section.
5657         (rec2csv Invocation): New section.
5658         (rec2csv Examples): New section.
5659         (rec2csv Conversion): New section.
5661 2011-02-02  Jose E. Marchesi  <jemarch@gnu.org>
5663         rec2csv: tests.
5664         * torture/utils/Makefile.am (TESTS): rec2csv added.
5666         * torture/utils/rec2csv.sh: New file.  New input files
5667         'default-records', 'missing-fields', 'missing-fields-first',
5668         'multi-line', 'escape-quotes', 'repeated-fields',
5669         'repeated-missing' and 'several-types'.
5670         (rec2csv-default-record): New test.
5671         (rec2csv-missing-fields): New test.
5672         (rec2csv-missing-fields-first): New test.
5673         (rec2csv-multi-line): New test.
5674         (rec2csv-escape-quotes): New test.
5675         (rec2csv-repeated-fields): New test.
5676         (rec2csv-repeated-missing): New test.
5677         (rec2csv-default-type): New test.
5678         (rec2csv-with-type): New test.
5679         (rec2csv-nonexistent-type): New test.
5681 2011-02-02  Jose E. Marchesi  <jemarch@gnu.org>
5683         rec2csv: print data.
5684         * utils/rec2csv.c (rec2csv_process_data): Process either the
5685         specified record rset, or the default one, or the only rset
5686         existing in the file.
5688 2011-02-02  Jose E. Marchesi  <jemarch@gnu.org>
5690         rec2csv: print headers.
5691         * utils/rec2csv.c (rec2csv_determine_fields): New function.
5692         * utils/rec2csv.c (rec2csv_generate_csv): Likewise.
5694         * src/rec-fex.c (rec_fex_member_p): Get arguments 'min' and 'max'.
5695         * src/rec-rset.c (rec_rset_update_auto_fields): Use the additional
5696         parameters of rec_fex_member_p.
5698 2011-01-31  Jose E. Marchesi  <jemarch@gnu.org>
5700         rec2csv: skeleton of the utility.
5701         * man/Makefile.am (man_MANS): rec2csv.1 added.
5702         (rec2csv.1): New rule.
5704         * utils/Makefile.am (bin_PROGRAMS): rec2csv added.
5705         (rec2csv_SOURCES): Defined.
5706         (rec2csv_LDADD): Defined.
5708         * utils/rec2csv.c: New file.
5709         (recutl_print_help): New function.
5710         (parse_args): Likewise.
5711         (rec2csv_process_data): Likewise.
5712         (main): Likewise.
5714 2011-01-30  Jose E. Marchesi  <jemarch@gnu.org>
5716         recins: prepend the auto-generated fields.
5717         * torture/utils/recins.sh: Tests adapted.
5719         * utils/recins.c (recins_add_auto_field_int): Prepend the
5720         auto-generated field instead of appending it.
5721         (recins_add_auto_field_date): Likewise.
5723 2011-01-30  Jose E. Marchesi  <jemarch@gnu.org>
5725         Documentation for the auto generated fields.
5726         * doc/recutils.texi (Record Descriptors): List %auto in the list
5727         of allowed special fields.
5728         (recins Invocation): Document --no-auto.
5729         (Auto Generated Fields): auto-generated fields documentation.
5731 2011-01-30  Jose E. Marchesi  <jemarch@gnu.org>
5733         Tests for the auto generated fields.
5734         * torture/utils/recins.sh: New input files auto-fields and
5735         auto-range-overflow.
5736         (recins-auto-fields): New test.
5737         (recins-no-auto): New test.
5738         (recins-auto-range-overflow): New test.
5739         (recins-auto-range-overflow-force): New test.
5741         * torture/utils/recfix.sh: New input files auto-int, auto-range,
5742         auto-date, auto-notype and auto-nofex.
5743         (recfix-auto-int): New test.
5744         (recfix-auto-range): New test.
5745         (recfix-auto-date): New test.
5746         (recfix-auto-notype): New test.
5747         (recfix-auto-nofex): New test.
5749 2011-01-30  Jose E. Marchesi  <jemarch@gnu.org>
5751         Implementation of auto generated fields.
5752         * utils/recins.c: New argument --no-auto.
5754         * src/rec-types.c (rec_type_min): New function.
5755         (rec_type_max): New function.
5757         * src/rec.h: New function rec_rset_get_field_type.
5759         * utils/recins.c (recins_add_new_record): Add auto-set fields when
5760         replacing a record.
5761         (recins_insert_record): Likewise.
5762         (recins_add_auto_fields): New function.
5763         (recins_add_auto_field_int): New function.
5764         (recins_add_auto_field_date): New function.
5766         * torture/rec-fex/rec-fex-new.c: Adapt tests to the new semantics
5767         of rec_fex_new (NULL,...).
5769         * src/rec.h: New functions rec_fex_append and rec_fex_member_p.
5770         * src/rec-fex.c (rec_fex_append): Implemented.
5771         (rec_fex_member_p): Implemented.
5772         (rec_fex_new): Create an empty FEX if the str parameter is NULL.
5774         * src/rec-rset.c (struct rec_rset_s): New 'auto_fields' member.
5775         (rec_rset_new): Initialize 'auto_fields'.
5776         (rec_rset_set_descriptor): Call rec_rset_update_auto_fields.
5777         (rec_rset_update_auto_fields): New function.
5778         (rec_rset_auto): New function.
5780         * src/rec.h: New function rec_rset_auto, that returns a list with
5781         the names of the auto-set fields in the rset.
5783         * src/rec-int.c (rec_int_check_descriptor): Check that
5784         auto-incremented fields are of type int.
5786 2011-01-29  Jose E. Marchesi  <jemarch@gnu.org>
5788         utils: recdel now performs an integrity check of the resulting
5789         database.
5790         * doc/recutils.texi (recdel Invocation): Documentation for
5791         '--force' and '--verbose'.
5792         (recins Invocation): Likewise.
5793         (recset Invocation): Likewise.
5795         * torture/utils/recdel.sh: New input file 'integrity-fail'.
5796         New input file 'external-types'.
5797         New input file 'external'.
5798         (recdel-integrity-fail): New test.
5799         (recdel-force-restrictions): New test.
5800         (recdel-external-fail): New test.
5801         (recdel-no-external): New test.
5803         * utils/recins.c (recins_add_new_record): Use
5804         recutl_check_integrity.
5806         * utils/recdel.c: New parameter --verbose.
5807         New parameter --no-external.
5809         * utils/recutl.h: New function 'recutl_check_integrity'.
5810         * uitls/recutl.c: Likewise.
5812 2011-01-29  Jose E. Marchesi  <jemarch@gnu.org>
5814         utils: fix the output of integrity error messages.
5815         * utils/recins.c (recins_add_new_record): Dont use recutl_error to
5816         report the integrity errors.
5817         * utils/recset.c (recset_process_actions): Likewise.
5819 2011-01-29  Jose E. Marchesi  <jemarch@gnu.org>
5821         librec: manage problems with the remote descriptors as integrity
5822         errors.
5823         * src/rec-int.c (rec_int_check_descriptor): Call
5824         rec_int_merge_remote.
5825         (rec_int_merge_remote): Return 1 if there is an error fetching the
5826         remote descriptor.  0 otherwise.
5827         (rec_int_merge_remote): Get an errors parameter.
5828         (rec_int_merge_remote): Manage errors as integrity errors.
5830 2011-01-28  Jose E. Marchesi  <jemarch@gnu.org>
5832         librec: avoid descriptor expansion when using remote descriptors.
5833         * src/rec-int.c (rec_int_check_rset): Save a backup of the
5834         rset descriptor before to merge any remote descriptor, and restore
5835         it before returning.
5837         * torture/utils/recins.sh: New input files external-descriptor and
5838         external-descriptor-types.
5839         (recins-external-descriptor): New test.
5841 2011-01-25  Jose E. Marchesi  <jemarch@gnu.org>
5843         manual: Fix the description of %unique, %prohibit, %mandatory,
5844         %url and %type.
5845         * doc/recutils.texi (Record Descriptors): Fix the documentation of
5846         %prohibit, %mandatory and %unique so it says that the field names
5847         are separated by blanks.
5848         (Record Descriptors): Note that %url can be followed by an URL or
5849         a file path.
5850         (Record Descriptors): Clarify that the list of field names in
5851         %type shall be separated by commas.
5853         Problems reported by Jean-François Ollier.
5855 2011-01-24  Jose E. Marchesi  <jemarch@gnu.org>
5857         manual: document the supported regexp flavor.
5858         * doc/recutils.texi (Regular Expressions): New chapter.
5859         (String types): Clarify the supported regexp flavor.
5860         (Field Values): Likewise.
5862 2011-01-24  Jose E. Marchesi  <jemarch@gnu.org>
5864         gnulib: update and import regexprops-generic.
5865         * doc/regexprops-generic.texi: New file.
5867         * lib/iswblank.c: New file.
5869 2011-01-23  Jose E. Marchesi  <jemarch@gnu.org>
5871         recutl: make recset and recins to keep the permissions of the
5872         operated rec file.
5873         * utils/recutl.c (recutl_write_db_to_file): New variables st1 and
5874         stat_result.
5875         (recutl_write_db_to_file): Record the file attributes of the
5876         original rec file and use its mode in the replace file.
5877         Copyright updated.
5879         Problem reported, and solution outlined by Jean-François Ollier.
5881 2011-01-23  Jose E. Marchesi  <jemarch@gnu.org>
5883         torture: tests checking the %prohibit restriction.
5884         * torture/utils/recfix.sh: New input files prohibited-fields and
5885         prohibited-fields-fail.
5886         (recfix-prohibited-fields-ok): New test.
5887         (recfix-prohibited-fields-fail): New test.
5889 2011-01-22  Jose E. Marchesi  <jemarch@gnu.org>
5891         Use Task instead of Issue in examples involving TODO.
5892         * doc/recutils.texi (recsel Examples): Issue replaced by Task.
5893         (recins Examples): Likewise.
5894         (recdel Examples): Likewise.
5895         * utils/recinf.c (recutl_print_help): Likewise.
5897 2011-01-14  Jose E. Marchesi  <jemarch@gnu.org>
5899         tasktool: use --set-add.
5900         * tasktool (tt_process_cmd_resolve): Use the --set-add option of
5901         tasktool to insert the ClosedAt field when resolving to DONE.
5903 2011-01-14 Jose E. Marchesi <jemarch@gnu.org>
5905         Tasktool operations.
5906         * TODO: Task 29 resolved to 'DONE'.
5907         Task 29 resolved to 'DONE'.
5909 2011-01-12  Jose E. Marchesi  <jemarch@gnu.org>
5911         reset: support for the set-add operation.
5912         * doc/recutils.texi (recset Invocation): Documentation for the -S,
5913         --set-add command line option.
5915         * torture/utils/recset.sh (recset-set-add-1): New test.
5916         (recset-set-add-2): New test.
5917         (recset-set-add-3): New test.
5919         * utils/recset.c (RECSET_ACT_SET_ADD): New action.
5920         (COMMON_ARGS): SET_ADD_ACTION_ARG added.
5921         (recutl_print_help): Document -S, --set-add.
5922         (recset_parse_args): Manage the set-add option.
5923         (recset_process_actions): Likewise.
5924         (recset_process_set): New parameter 'add_p' that tells whether to
5925         add missing fields with the given value.
5926         (CHECK_ACTION_PREREQ): New macro.
5927         (recset_parse_args): Use CHECK_ACTION_PREREQ to avoid code
5928         repetition.
5930 2011-01-10  Jose E. Marchesi  <jemarch@gnu.org>
5932         TODO: put a comment at the beginning asking to execute ./tasktool
5933         --help.
5934         * tasktool (tt_db_template_header): Modified to include a note
5935         about executing ./tasktool --help.
5937         * TODO: Likewise.
5939 2011-01-10  Jose E. Marchesi  <jemarch@gnu.org>
5941         librec: support for comments in enum descriptions.
5942         * doc/recutils.texi (Enumerated types): Comments in enum
5943         descriptions documented.
5944         Copyright updated.
5946         * torture/utils/recfix.sh: New input file 'enum-valid'.
5947         New input file 'enum-invalid-1'.
5948         New input file 'enum-invalid-2'.
5949         (recfix-enum-valid): New test.
5950         (recfix-enum-invalid-1): New test.
5951         (recfix-enum-invalid-2): New test.
5953         * src/rec-types.c (rec_type_parse_enum): Skip comments in
5954         enum descriptions.
5956 2010-12-23  Jose E. Marchesi  <jemarch@gnu.org>
5958         Preparation for 1.1.
5959         * .x-sc_prohibit_have_config_h: New file.
5961         * po/POTFILES.in: Updated.
5963         * m4/pkg.m4: Relicense from GPLv2+ to GPLv3+.
5965         * NEWS: Updated to version 1.1.
5967         * man/Makefile.am (man_MANS): recfmt.1 added.
5968         (recfmt.1): New rule.
5970         * configure.ac: Package version changed to 1.1.
5972 2010-12-23  Jose E. Marchesi  <jemarch@gnu.org>
5974         rec-sex: support for the string concatenation operator.
5975         * doc/recutils.texi (SEX Operators): Documentation for the string
5976         concatenation operator.
5978         * src/rec-sex.c (rec_sex_eval_node): Manage REC_SEX_OP_CONCAT.
5980         * src/rec-sex-ast.h: New operation REC_SEX_OP_CONCAT.
5982         * src/rec-sex-tab.y: Declare REC_SEX_TOK_AMP as a token.
5984         * src/rec-sex-lex.l: Recognize REC_SEX_TOK_AMP.
5986 2010-12-23  Jose E. Marchesi  <jemarch@gnu.org>
5988         rec-sex: support for the conditional expression.
5989         * doc/recutils.texi (SEX Operators): Documentation for the ternary
5990         conditional operator added.
5992         * src/rec-sex.c (rec_sex_eval_node): Manage REC_SEX_OP_COND.
5994         * src/rec-sex-tab.y (CREATE_NODE_OP3): Macro defined.
5996         * src/rec-sex-ast.h: New operation REC_SEX_OP_COND.
5998         * src/rec-sex-tab.y: Declare REC_SEX_TOK_QM and REC_SEX_TOK_COLON
5999         as tokens.
6001         * src/rec-sex-lex.l: Recognize REC_SEX_TOK_QM and
6002         REC_SEX_TOK_COLON.
6004 2010-12-23  Jose E. Marchesi  <jemarch@gnu.org>
6006         manual: first draft of the documentation for recfmt.
6007         * doc/recutils.texi (recfmt): New chapter.
6008         (recfmt Invocation): New section.
6009         (recfmt Templates): New section.
6010         (recfmt Examples): New section.
6012 2010-12-23  Jose E. Marchesi  <jemarch@gnu.org>
6014         recfmt: use SEX expressions in template slots and change the slot
6015         format.
6016         * src/rec-sex.c (rec_sex_compile): Set the parser ast only if the
6017         parsing was successful.
6019         * src/rec-sex-tab.y (exp): Grammar changed to require an
6020         expression.
6022         * src/rec-sex.c (rec_sex_eval_str): New function.
6024         * utils/recfmt.c (recfmt_apply_template): Use {{...}} marks
6025         instead of <#...>.
6026         (recfmt_get_subst): New function.
6028 2010-12-22  Jose E. Marchesi  <jemarch@gnu.org>
6030         recfmt: initial version.
6031         * torture/utils/Makefile.am (TESTS): recfmt.sh added.
6033         * torture/utils/recfmt.sh: New file.
6034         (recfmt-empty-template): New test.
6035         (recfmt-empty-file): New test.
6036         (recfmt-all-records): New test.
6037         (recfmt-slot-beginning): New test.
6038         (recfmt-no-prolog): New test.
6039         (recfmt-subscripts): New test.
6040         (recfmt-non-matching-records): New test.
6041         (recfmt-empty-slot): New test.
6042         (recfmt-invalid-slot): New test.
6044         * src/rec-record.c (rec_record_get_field_by_name): Return NULL if
6045         the specified field is not found, instead of the last field of the
6046         record.
6048         * utils/recutl.h: New function recutl_warning.
6049         New function recutl_read_file.
6050         * utils/recutl.c (recutl_warning): Implemented.
6051         (recutl_read_file): Implemented.
6053         * utils/recfmt.c (recfmt_process_db): New function.
6054         (rec_fmt_apply_template): New function.
6056         * utils/Makefile.am (bin_PROGRAMS): recfmt added.
6058         * utils/recfmt.c: New file.
6059         (recutl_print_help): New function.
6060         (recfmt_parse_args): New function.
6061         (main): New function.
6063 2010-12-22  Jose E. Marchesi  <jemarch@gnu.org>
6065         torture: manage errors when running the utilities in the system
6066         tests.
6067         * torture/utils/testutils.sh: Make the tests to fail if there is
6068         an error running a system test.
6070 2010-12-21  Jose E. Marchesi  <jemarch@gnu.org>
6072         Portability fixes.
6073         * torture/utils/testutils.sh: Use the portable 'expr' instead of
6074         'bc'.
6076         * src/Makefile.am (AM_CFLAGS): gcc specific options -Wall and
6077         -fno-strict-aliasing removed.
6079         * utils/recutl.h: Include progname.h so the declaration of
6080         program_name is accessible in all the utilities.
6082         * utils/csv2rec.c: program_name global variable removed.
6083         * utils/recset.c: Likewise.
6084         * utils/recsel.c: Likewise.
6085         * utils/recins.c: Likewise.
6086         * utils/recinf.c: Likewise.
6087         * utils/recfix.c: Likewise.
6088         * utils/recdel.c: Likewise.
6089         * utils/mdb2rec.c: Likewise.
6091         * utils/recutl.c: Include progname.h and use set_progname.
6093         * module 'progname' imported from gnulib.
6095         * src/rec.c: Remove the setting of a program_name variable when
6096         compiling with mingw.
6098         * src/rec-sex.c (ATOTS_VAL): Use parse_datetime instead of
6099         get_date.
6100         Include parse-datetime.h instead of getdate.h.
6101         * src/rec-types.c: Likewise.
6103         * po/Makevars.template: Removed.
6105         * README-dev: libcsv dependency removed.
6106         Added a note asking for a recent version of flex.
6108         * m4/pkg.m4: Copied from /usr/share/aclocal/pkg.m4.
6110 2010-12-20  Jose E. Marchesi  <jemarch@gnu.org>
6112         Build a librec.dll in mingw.
6113         * src/Makefile.am (AM_LDFLAGS): Use -no-undefined.
6115         * src/rec.c: Avoid an undefined symbol in the generated
6116         librec.dll.
6118 2010-12-20  Jose E. Marchesi  <jemarch@gnu.org>
6120         Fix compilation in mingw32.
6121         * src/rec-sex-lex.l: Use %top to get config.h included at the top
6122         of the generated file.
6124         * strsep module imported from gnulib.
6125         * mkdstemp module imported from gnulib.
6127 2010-12-20  Jose E. Marchesi  <jemarch@gnu.org>
6129         echo -n is not recognized in macosx.  Use printf instead.
6130         * torture/utils/testutils.sh (test_declare_input_file): Use printf
6131         instead of echo -n.
6132         (test_tool): Likewise.
6133         * tasktool (tt_email_p): Likewise.
6134         (tt_process_cmd_note): Likewise.
6135         (tt_process_cmd_create): Likewise.
6137 2010-12-19  Jose E. Marchesi  <jemarch@gnu.org>
6139         Misc portability problems fixed.
6140         * utils/recutl.h: Make recutl_fatal and recutl_error to get a
6141         const char pointer as its first argument.
6143         * utils/recutl.c: Include locale.h.
6145         * src/rec-writer.c (rec_write_comment): Use strdup instead of
6146         strdupa.
6147         (rec_write_comment): Avoid freeing a tail of a string returned by
6148         strdup.
6150 2010-12-19  Jose E. Marchesi  <jemarch@gnu.org>
6152         Include gettext.h instead of libintl.h.
6153         * src/rec.c: Include gettext.h instead of libintl.h.
6154         * utils/recutl.c: Likewise.
6155         * utils/recset.c: Likewise.
6156         * utils/recsel.c: Likewise.
6157         * utils/recins.c: Likewise.
6158         * utils/recinf.c: Likewise.
6159         * utils/recfix.c: Likewise.
6160         * utils/recdel.c: Likewise.
6161         * utils/mdb2rec.c: Likewise.
6162         * utils/csv2rec.c: Likewise.
6163         * src/rec-utils.c: Likewise.
6164         * src/rec-types.c: Likewise.
6165         * src/rec-parser.c: Likewise.
6166         * src/rec-int.c: Likewise.
6167         * src/rec-field-name.c: Likewise.
6168         * src/rec-fex.c: Likewise.
6170 2010-12-19  Jose E. Marchesi  <jemarch@gnu.org>
6172         gettext-h module imported from gnulib.
6173         * m4/configmake.m4: New file.
6175 2010-12-19  Jose E. Marchesi  <jemarch@gnu.org>
6177         librec: use %zu instead of %d to print size_t values in *printf
6178         calls.
6179         * src/rec-field.c (rec_field_set_location): Use %zu instead of %d
6180         to print size_t values.
6181         (rec_field_set_char_location): Likewise.
6182         * src/rec-types.c (rec_type_check_size): Likewise.
6183         * src/rec-parser.c (rec_parser_perror): Likewise.
6184         * src/rec-record.c (rec_record_set_location): Likewise.
6185         (rec_record_set_char_location): Likewise.
6187 2010-12-19  Jose E. Marchesi  <jemarch@gnu.org>
6189         librec: use the safer construction asprintf instead of sprintf.
6190         * src/rec-fex.c (rec_fex_str): Use asprintf instead of sprintf.
6191         * src/rec-types.c (rec_type_check_size): Likewise.
6192         (rec_type_check_range): Likewise.
6193         * src/rec-record.c (rec_record_set_location): Likewise.
6194         (rec_record_set_char_location): Likewise.
6195         * src/rec-parser.c (rec_parser_perror): Likewise.
6196         * src/rec-int.c (rec_int_check_field_type): Likewise.
6197         (rec_int_check_record_mandatory): Likewise.
6198         (rec_int_check_record_unique): Likewise.
6199         (rec_int_check_record_prohibit): Likewise.
6200         (rec_int_check_record_key): Likewise.
6201         (rec_int_check_descriptor): Likewise.
6202         * src/rec-field.c (rec_field_set_location): Likewise.
6204 2010-12-18 Jose E. Marchesi <jemarch@termi>
6206         Tasktool operations.
6207         * TODO: Task 30 resolved to 'DONE'.
6209 2010-12-18  Jose E. Marchesi  <jemarch@gnu.org>
6211         Stop using the non portable open_memstream.
6212         * torture/rec-writer/rec-write-comment.c: Use the
6213         rec_writer_new_str function instead of open_memstream and file
6214         streams.
6215         * torture/rec-writer/rec-write-rset.c: Likewise.
6216         * torture/rec-writer/rec-write-record-with-fex.c: Likewise.
6217         * torture/rec-writer/rec-write-record.c: Likewise.
6218         * torture/rec-writer/rec-write-field-name.c: Likewise.
6219         * torture/rec-writer/rec-write-field.c: Likewise.
6220         * torture/rec-writer/rec-write-db.c: Likewise.
6222         * utils/recins.c: Don't use open_memstream.
6223         * utils/recset.c: Likewise.
6224         * utils/recutl.c: Likewise.
6226         * src/rec-buf.c: New file.
6228         * src/rec.h: Get a char** argument instead of a stream for the
6229         'errors' argument of the function rec_int_check_db,
6230         rec_int_check_rset, rec_int_check_record and
6231         rec_int_check_field_type.
6232         rec_buf_* moved there from pdf-utils.h.
6234         * src/rec-writer.c: Support a rec_buf_t backend in the writer.
6235         (rec_writer_new_str): New function.
6236         (rec_writer_puts): Use the rec_buf backend if selected.
6237         (rec_writer_putc): Likewise.
6238         (rec_write_field_str): Use a rec_buf_t backed writer.
6239         (rec_write_field_name_str): Likewise.
6240         (rec_write_comment_str): Likewise.
6242         * src/rec-record.c (rec_record_to_comment): Use rec_buf_new
6243         instead of the non portable open_memstream.
6244         * src/rec-rset.c (rec_rset_rename_field): Likewise.
6246         * src/rec-types.c (rec_type_check): Use rec_buf_new instead of the
6247         non portable open_memstream.
6248         (rec_type_check_int): Likewise.
6249         (rec_type_check_field): Likewise.
6250         (rec_type_check_bool): Likewise.
6251         (rec_type_check_range): Likewise.
6252         (rec_type_check_real): Likewise.
6253         (rec_type_check_size): Likewise.
6254         (rec_type_check_line): Likewise.
6255         (rec_type_check_regexp): Likewise.
6256         (rec_type_check_date): Likewise.
6257         (rec_type_check_email): Likewise.
6258         (rec_type_check_enum): Likewise.
6260 2010-12-17  Jose E. Marchesi  <jemarch@gnu.org>
6262         rec-utils: new open_memstream like API for rec_buf_t.
6263         * src/rec-parser.c (rec_parse_field_name_part): Use the new
6264         rec_buf_t API.
6265         (rec_parse_comment): Likewise.
6266         (rec_parse_field_value): Likewise.
6268         * src/rec-utils.h: New interface for the rec_buf_t abstract data
6269         type, including: rec_buf_new, rec_buf_putc, rec_buf_puts and
6270         rec_buf_close.
6271         * src/rec-utils.c: rec_buf_new, rec_buf_putc, rec_buf_puts and
6272         rec_buf_close implemented based in the old implementation.
6274 2010-12-16  Jose E. Marchesi  <jemarch@gnu.org>
6276         syntax-check fixes.
6277         * libcsv/libcsv.c (VERSION): Changed to 3.0.0-recutils.
6278         Include config.h.
6280 2010-12-16 Jose E. Marchesi <jemarch@termi>
6282         Tasktool operations.
6283         * TODO: Task 34 resolved to 'DONE'.
6285 2010-12-16  Jose E. Marchesi  <jemarch@gnu.org>
6287         libcsv embedded in the source tree.
6288         * utils/csv2rec.c: Include csv.h instead of libcsv/csv.h.
6290         * utils/Makefile.am (csv2rec_LDADD): Link with libcsv.la.
6291         (AM_CPPFLAGS): Add the libcsv/ directory to the include path.
6293         * configure.ac: Checks for libcsv removed.
6294         Conditional COMPILE_CSV2REC removed.
6296         * Makefile.am (SUBDIRS): libcsv/ added.
6298         * libcsv/csv.h: Imported from libcsv-3.0.0.tar.gz and relicensed
6299         from LGPL2.1+ to GPLv3.
6300         * libcsv/libcsv.c: Likewise.
6302         * libcsv/Makefile.am: New file.
6304 2010-12-16 Jose Marchesi <jco@wilhelm>
6306         Tasktool operations.
6307         * TODO: Task 34 created.
6309 2010-12-15  Jose E. Marchesi  <jemarch@gnu.org>
6311         tasktool: first version of log subcommand.
6312         * tasktool (tt_process_cmd_log): New function.
6313         (tt_help_log): New variable.
6314         (tt_parse_arguments): Handle the 'log' subcommand.
6316 2010-12-14  Jose E. Marchesi  <jemarch@gnu.org>
6318         librec: new function rec_buf_add_str in rec-utils.
6319         * src/rec-utils.h: New function 'rec_buf_add_str'.
6321         * src/rec-utils.c (rec_buf_add_str): New function.
6323 2010-12-14  Jose E. Marchesi  <jemarch@gnu.org>
6325         librec: rec_parser_buf abstraction moved to rec-utils as rec_buf.
6326         * src/rec-parser.c: Use the rec_buf_* functions instead of the
6327         rec_parser_buf_* functions.
6328         Include rec-utils.h.
6330         * src/rec-utils.c: Implementation of the rec_buf_t type and the
6331         rec_buf_* functions, moved and adapted from rec-parser.c.
6333         * src/rec-utils.h: New rec_buf_t abstract data type, renamed from
6334         the rec_parser_buf_t type and functions in rec-parser.h.
6336 2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
6338         Tasktool operations.
6339         * TODO: Note added for task 30.
6341 2010-12-14  Jose E. Marchesi  <jemarch@gnu.org>
6343         librec: remove the usage of the non-portable fmemopen.
6344         * torture/rec-parser/rec-parse-db.c: Replace uses of fmemopen by
6345         buffer backed parsers.
6346         * torture/rec-parser/rec-parse-field.c: Likewise.
6347         * torture/rec-parser/rec-parse-field-name.c: Likewise.
6348         * torture/rec-parser/rec-parse-record.c: Likewise.
6349         * torture/rec-parser/rec-parser-eof.c: Likewise.
6350         * torture/rec-parser/rec-parser-error.c: Likewise.
6351         * torture/rec-parser/rec-parser-perror.c: Likewise.
6352         * torture/rec-parser/rec-parser-reset.c: Likewise.
6353         * torture/rec-parser/rec-parse-rset.c: Likewise.
6355         * src/rec-parser.c (rec_parse_field_name_str): Rewritten to use
6356         rec_parser_new_str and rec_parser_eof instead of fmemopen.
6357         (rec_parse_record_str): Likewise.
6359         * torture/rec-parser/rec-parser-new-str.c: New file.
6360         (test_rec_parser_new_str): New function.
6361         (rec_parser_new_str_nominal): New test.
6363         * src/rec-parser.c: New member 'buffer' in the struct
6364         rec_parser_s.
6365         (rec_parser_init_common): New function.
6366         (rec_parser_getc): Use the buffer backend if the parser was
6367         created with rec_parser_new_str.
6368         (rec_parser_ungetc): Likewise.
6370 2010-12-13  Jose E. Marchesi  <jemarch@gnu.org>
6372         rec-mode: several fixes.
6373         * etc/rec-mode.el: Several fixes.
6374         * utils/recinf.c (print_info_file): Print "unknown" only if
6375         generated normal output.  It was breaking the sexps.
6377 2010-12-13  Jose E. Marchesi  <jemarch@gnu.org>
6379         recins: check for integrity problems regardless of operational
6380         mode.
6381         * utils/recfix.c (recfix_process_data): Use new semantics of
6382         rec_int_check_db.
6384         * src/rec-int.c (rec_int_check_db): Return the number of errors
6385         found while checking the integrity of the database.
6386         (rec_int_merge_remote): Unused variable removed.
6388         * utils/recins.c (recins_add_new_record): Check for the integrity
6389         of the new database in both operation modes: normal and replace.
6391 2010-12-13 Jose Marchesi <jco@wilhelm>
6393         Tasktool operations.
6394         * TODO: Task 30 edited.
6395         Task 30 edited.
6397 2010-12-13  Jose E. Marchesi  <jemarch@gnu.org>
6399         librec: don't allow several %rec: fields in record descriptors.
6400         * src/rec-int.c (rec_int_check_descriptor): Don't allow more than
6401         one %rec: fields in record descriptors.
6403         * torture/utils/recfix.sh: New tests 'recfix-one-rec' and
6404         'recfix-multiple-rec-in-descriptor'.
6406 2010-12-13  Jose E. Marchesi  <jemarch@gnu.org>
6408         rec-mode: initial version of rec-cmd-compile.
6409         * etc/rec-mode.el (rec-mode-edit-map): Map the rec-cmd-compile
6410         command.
6411         (rec-mode-map): Likewise.
6412         (rec-recfix): New variable.
6413         (rec-cmd-compile): New function.
6415 2010-12-10 Jose Marchesi <jemarch@gnu.org>
6417         Tasktool operations.
6418         * TODO: Task 28 resolved to 'DONE'.
6420 2010-12-10  Jose E. Marchesi  <jemarch@gnu.org>
6422         tasktool: support for categories.
6423         * tasktool (tt_task_categories): New category 'rec-mode'.
6424         (tt_process_cmd_list): Support the -c|--category parameter.
6425         (tt_db_template_task): Set 'Category' as a mandatory field.
6427         * TODO: Updated to reflect the new categories.
6429 2010-12-04 Jose E. Marchesi <jemarch@termi>
6431         Tasktool operations.
6432         * TODO: Task 30 created.
6433         Task 30 edited.
6435 2010-12-04  Jose E. Marchesi  <jemarch@gnu.org>
6437         librec: do not include malloc.h.  Include the more portable
6438         stdlib.h instead.
6439         * src/rec-fex.c: Include stdlib.h instead of malloc.h.
6440         * src/rec-field-name.c: Likewise.
6441         * src/rec-field.c: Likewise.
6442         * src/rec-parser.c: Likewise.
6443         * src/rec-record.c: Likewise.
6444         * src/rec-rset.c: Likewise.
6445         * src/rec-sex.c: Likewise.
6446         * src/rec-writer.c: Likewise.
6448 2010-12-04  Jose E. Marchesi  <jemarch@gnu.org>
6450         Avoid a segmentation fault in rec_write_rset.
6451         * src/rec-writer.c (rec_write_rset): Make sure that the descriptor
6452         of a record set exists before to try to write it.  Problem
6453         reported by Elias Pipping.
6455 2010-12-02  Jose E. Marchesi  <jemarch@gnu.org>
6457         rec-types: support ranges with implicit minimum limit.
6458         * torture/utils/recfix.sh (recfix-ranges-ok): New test.
6459         (recfix-ranges-xfail-1): New test.
6460         (recfix-ranges-xfail-2): New test.
6462         * torture/rec-type/rec-type-new.c: Test ranges with just one
6463         index.
6465         * src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Allow the omission of
6466         one of the indexes of the range.
6467         (rec_type_parse_range): Allow the omission of one of the indexes.
6469 2010-12-02  Jose E. Marchesi  <jemarch@gnu.org>
6471         mdb2rec: normalise field names appearing in %type fields.
6472         * utils/mdb2rec.c (process_table): Use normalised field name parts
6473         in the %type: entries for columns.
6475 2010-12-01 Jose E. Marchesi <jemarch@termi>
6477         Tasktool operations.
6478         * TODO: Task 29 created.
6480 2010-12-01  Jose E. Marchesi  <jemarch@gnu.org>
6482         tasktool: fix the setting of the close time when resolving.
6483         * tasktool (tt_process_cmd_resolve): Add or set the closing time
6484         for a task, depending if there is an existing 'ClosedAt' field.
6486 2010-12-01 Jose E. Marchesi <jemarch@termi>
6488         Tasktool operations.
6489         * TODO: Task 25 edited.
6490         Task 28 created.
6491         Task 27 created.
6492         Task 24 edited.
6493         Task 26 created.
6495 2010-12-01  Jose E. Marchesi  <jemarch@gnu.org>
6497         tasktool: control record support.
6498         * TODO: Control record added.
6500         * tasktool: Support for the TasktoolControl record and NextFreeId
6501         field added.
6503 2010-12-01  Jose E. Marchesi  <jemarch@gnu.org>
6505         rec-writer: cover an additional special case in rec_write_rset.
6506         * src/rec-writer.c (rec_write_rset): Cover the special case where
6507         a record set contains a set of comments followed by the record
6508         descriptor.
6510         * torture/utils/recins.sh: New tests 'recins-only-descriptor' and
6511         'recins-comments-and-descriptor'.
6513 2010-12-01  Jose E. Marchesi  <jemarch@gnu.org>
6515         tasktool: escape parameters passed to eval.
6516         * tasktool (tt_escape_single_quoted): New function.
6517         (tt_process_cmd_create): Escape all the parameters used in single
6518         quoted strings passed to eval.
6520 2010-11-30 Jose E. Marchesi <jemarch@termi>
6522         Tasktool operations.
6523         * TODO: Task 19 resolved to 'DONE'.
6524         Task 24 edited.
6525         Task 24 created.
6527 2010-11-30  Jose E. Marchesi  <jemarch@gnu.org>
6529         Tests for the before, after and sametime operators.
6530         * torture/utils/recsel.sh: New input file 'dates'.
6531         (recsel-sex-date-sametime): New test.
6532         (recsel-sex-date-before): New test.
6533         (recsel-sex-date-after): New test.
6535 2010-11-30  Jose E. Marchesi  <jemarch@gnu.org>
6537         Documentation of the before, after and sametime operators.
6538         * doc/recutils.texi (SEX Operators): Date operators documented.
6540 2010-11-30  Jose E. Marchesi  <jemarch@gnu.org>
6542         Date operators before, after and sametime implementation.
6543         * src/rec-sex.c (timespec_subtract): New function.
6544         (rec_sex_eval_node): Manage REC_SEX_OP_BEFORE.
6545         (rec_sex_eval_node): Manage REC_SEX_OP_AFTER.
6546         (rec_sex_eval_node): Manage REC_SEX_OP_SAMETIME.
6548         * src/rec-sex-ast.h: Constants for the date operators.
6550         * src/rec-sex-tab.y: Support for the date operators.
6552         * src/rec-sex-lex.l: New tokens for date operators '<<', '>>' and
6553         '=='.
6555 2010-11-29  Jose E. Marchesi  <jemarch@gnu.org>
6557         * NEWS: Updated for 1.0 release.
6559 2010-11-27  Jose E. Marchesi  <jemarch@gnu.org>
6561         Syntax check fixes.
6562         * TESTS: Regenerated.
6564         * torture/rec-record/rec-record-field-p.c: Trailing blanks
6565         removed.
6567         * torture/utils/Makefile.am (TESTS_ENVIRONMENT): Use
6568         $(PATH_SEPARATOR) instead of ':'.
6570 2010-11-27 Jose E. Marchesi <jemarch@termi>
6572         Tasktool operations.
6573         * TODO: Task 22 edited.
6575 2010-11-27  Jose E. Marchesi  <jemarch@gnu.org>
6577         Support for file paths as external descriptors.
6578         * src/rec-types.c (rec_type_check_enum): Add digits in enum
6579         constants.
6581         * doc/recutils.texi (External Descriptors): File paths in external
6582         descriptors sources documented.
6584         * src/rec-int.c (rec_int_rec_type_p): Use REC_FILE_REGEXP.
6586         * src/rec-utils.c (rec_extract_file): New file.
6588 2010-11-25 Jose E. Marchesi <jemarch@termi>
6590         Tasktool operations.
6591         * TODO: Task 23 edited.
6592         Task 18 edited.
6594 2010-11-25  Jose E. Marchesi  <jemarch@gnu.org>
6596         recset: support for -r|--rename.
6597         * torture/rec-type/rec-type-descr-type.c: New file.
6598         (test_rec_type_descr_type): New function.
6599         (rec_type_descr_type_nominal): New test.
6600         (rec_type_descr_type_invalid): New test.
6602         * src/rec-types.c (rec_type_descr_type): New function.
6604         * TODO: Regenerated.
6606         * torture/rec-fex/rec-fex-str.c: New file.
6607         (test_rec_fex_str): New function.
6608         (rec_fex_str_nominal): New test.
6610         * src/rec-fex.c (rec_fex_elem_set_field_name): New function.
6611         (rec_fex_str): New function.
6613         * src/rec-rset.c (rec_rset_rename_field): New function.
6615         * torture/utils/recset.sh:
6616         (recset-rename): New test.
6617         (recset-rename-first): New test.
6618         (recset-rename-middle): New test.
6619         (recset-rename-last): New test.
6620         (recset-rename-range-first): New test.
6621         (recset-rename-range-last): New test.
6622         (recset-rename-range-all): New test.
6623         (recset-rename-all): New test.
6624         (recset-rename-all-descriptor): New test.
6625         (recset-rename-all-key): New test.
6626         (recset-rename-invalid-fex): New test.
6628         * doc/recutils.texi (recset Invocation): Document -r|--rename.
6629         (recset Examples): Added example for recset rename.
6631         * utils/recset.c (recutl_print_help): New option -r|--rename
6632         documented.
6633         (RECSET_ACT_RENAME): New constant.
6634         (recset_process_ren): New function.
6636 2010-11-23 Jose E. Marchesi <jemarch@termi>
6638         Tasktool operations.
6639         * TODO: Task 23 created.
6641 2010-11-23  Jose E. Marchesi  <jemarch@gnu.org>
6643         System tests for the utilities.
6644         * torture/utils/recfix.sh: New file.
6645         (recfix-type-int-valid): New test.
6646         (recfix-type-int-invalid): New test.
6647         (recfix-type-real-valid): New test.
6648         (recfix-type-real-invalid): New test.
6649         (recfix-duplicated-keys): New test.
6650         (recfix-missing-mandatory): New test.
6651         (recfix-several-unique): New test.
6652         (recfix-referred-type): New test.
6653         (recfix-hidden-type): New test.
6655         * torture/utils/testutils.sh: Support expected statuses 'ok' and
6656         'xfail' in 'test_tool'.
6658         * torture/utils/recset.sh: New file.
6659         (recset-append-field): New test.
6660         (recset-set-field): New test.
6661         (recset-delete-field): New test.
6662         (recset-comment-out-field): New test.
6663         (recset-delete-non-existant): New test.
6664         (recset-comment-out-fex-first): New test.
6665         (recset-comment-out-fex-last): New test.
6666         (recset-force-integrity): New test.
6668         * torture/utils/recins.sh: New file.
6669         (recins-empty): New test.
6670         (recins-empty-with-type): New test.
6671         (recins-several-fields): New test.
6672         (recins-append): New test.
6673         (recins-append-in-type): New test.
6674         (recins-append-new-type): New test.
6675         (recins-replace): New test.
6676         (recins-replace-sex): New test.
6677         (recins-force-restrictions): New test.
6679         * torture/utils/recdel.sh: New file.
6680         (recdel-first): New test.
6681         (recdel-second): New test.
6682         (recdel-last): New test.
6683         (recdel-comment): New test.
6684         (recdel-sex): New test.
6685         (recdel-type): New test.
6686         (recdel-force-all): New test.
6688         * utils/recutl.c (recutl_write_db_to_file): Close the stream to
6689         'out' if it is not 'stdout' only.
6691         * torture/utils/recinf.sh: New file.
6692         (recinf-empty): New test.
6693         (recinf-one-record): New test.
6694         (recinf-multiple-records): New test.
6695         (recinf-multiple-named): New test.
6696         (recinf-multiple-named-descriptors): New test.
6697         (recinf-multiple-types): New test.
6698         (recinf-names-only): New test.
6700         * torture/Makefile.am (SUBDIRS): Process the current directory
6701         before 'utils/'.
6702         (recsel-sex-sharp-zero): New test.
6703         (recsel-sex-sharp-one): New test.
6704         (recsel-sex-sharp-multiple): New test.
6705         (recsel-sex-match): New test.
6707 2010-11-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6709         manual: fix overlong lines and a couple of examples.
6710         * doc/recutils.texi (recsel Invocation, recins Invocation)
6711         (recins Examples): Do not recommend appending to a file while
6712         reading it.  Avoid overlong lines in the synopses and examples.
6714 2010-11-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6716         Fix make check in VPATH case.
6717         * torture/utils/recsel.sh: Ensure $srcdir is set; read
6718         testsutils.sh from $srcdir.
6719         * torture/utils/testutils.sh: Add $srcdir to PATH.
6721 2010-11-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6723         Tasktool operations.
6724         * tasktool (tt_add_changelog_entry): Use portable sed features
6725         only.  Avoid changing more than the first matching entry.
6727 2010-11-20  Jose E. Marchesi  <jemarch@gnu.org>
6729         Support negative integer and real literals in selection
6730         expressions.
6731         * src/rec-sex-lex.l: Support negative integers and reals in the
6732         lexer level.
6734         * torture/utils/recsel.sh: Integer and real operators tests.
6736 2010-11-20 Jose E. Marchesi <jemarch@termi>
6738         Tasktool operations.
6739         * TODO: Task 11 edited.
6741 2010-11-20  Jose E. Marchesi  <jemarch@gnu.org>
6743         * tasktool (tt_process_cmd_list): Do not include tasks in
6744         "resolution" status by default.
6745         Include the status in the list.
6747 2010-11-19 Jose E. Marchesi <jemarch@termi>
6749         Tasktool operations.
6750         * TODO: Task 3 edited.
6752 2010-11-15  Jose E. Marchesi  <jemarch@gnu.org>
6754         * torture/utils/Makefile.am: New file.
6756 2010-11-15  Jose E. Marchesi  <jemarch@gnu.org>
6758         rec-sex: unit tests.
6759         * torture/rec-sex/rec-sex-eval.c: New file.
6760         (test_rec_sex_eval): New function.
6761         (rec_sex_eval_match): New test.
6762         (rec_sex_eval_nomatch): New test.
6764         * torture/rec-sex/rec-sex-compile.c: New file.
6765         (test_rec_sex_compile): New function.
6766         (rec_sex_compile_nominal): New test.
6767         (rec_sex_compile_invalid): New test.
6769         * torture/rec-sex/rec-sex-destroy.c: New file.
6770         (test_rec_sex_destroy): New function.
6771         (rec_sex_destroy_nominal): New test.
6773         * torture/rec-sex/rec-sex-new.c: New file.
6774         (test_rec_sex_new): New function.
6775         (rec_sex_new_nominal): New test.
6777         * torture/rec-sex/tsuite-rec-sex.c: New file.
6778         (tsuite_rec_sex): New function.
6780 2010-11-15  Jose E. Marchesi  <jemarch@gnu.org>
6782         utils: compilation warnings removed.
6783         * utils/recinf.c: Unused variables removed.
6784         * utils/recsel.c: Likewise.
6785         * utils/recset.c: Likewise.
6786         * utils/recins.c: Likewise.
6788 2010-11-15  Jose E. Marchesi  <jemarch@gnu.org>
6790         rec-writer: unit tests.
6791         * torture/rec-writer/rec-write-comment-str.c: New file.
6792         (test_rec_write_comment_str): New function.
6793         (rec_write_comment_str_nominal): New test.
6794         (rec_write_comment_str_sexp): New test.
6796         * torture/rec-writer/rec-write-field-str.c: New file.
6797         (test_rec_write_field_str): New function.
6798         (rec_write_field_str_nominal): New test.
6799         (rec_write_field_str_sexp): New test.
6801         * torture/rec-writer/rec-write-field-name-str.c: New file.
6802         (test_rec_write_field_name_str): New function.
6803         (rec_write_field_name_str_nominal): New test.
6804         (rec_write_field_name_str_sexp): New test.
6806         * torture/rec-writer/rec-write-db.c: New file.
6807         (test_rec_write_db): New function.
6808         (rec_write_db_nominal): New test.
6810         * torture/rec-writer/rec-write-rset.c: New file.
6811         (test_rec_write_rset): New function.
6812         (rec_write_rset_nominal): New test.
6814         * torture/rec-writer/rec-write-record-with-fex.c: New file.
6815         (test_rec_write_record_with_fex): New function.
6816         (rec_write_record_with_fex_nominal): New test.
6817         (rec_write_record_with_fex_values): New test.
6818         (rec_write_record_with_fex_rows): New test.
6820 2010-11-14  Jose E. Marchesi  <jemarch@gnu.org>
6822         rec-write unit tests.
6823         * torture/rec-writer/rec-write-record.c: New file.
6824         (test_rec_write_record): New function.
6825         (rec_write_record_nominal): New test.
6826         (rec_write_record_sexp): New test.
6828         * torture/rec-writer/rec-write-field-name.c: New file.
6829         (test_rec_write_field_name): New function.
6830         (rec_write_field_name_nominal): New test.
6831         (rec_write_field_name_sexp): New test.
6833         * torture/rec-writer/rec-write-field.c: New file.
6834         (test_rec_write_field): New function.
6835         (rec_write_field_nominal): New test.
6836         (rec_write_field_sexp): New test.
6838         * torture/rec-writer/rec-write-comment.c: New file.
6839         (test_rec_write_comment): New function.
6840         (rec_write_comment_nominal): New test.
6841         (rec_write_comment_sexp): New test.
6843         * torture/rec-writer/rec-writer-destroy.c: New file.
6844         (test_rec_writer_destroy): New function.
6845         (rec_writer_destroy_nominal): New test.
6847         * torture/rec-writer/rec-writer-new.c: New file.
6848         (test_rec_writer_new): New function.
6849         (rec_writer_new_nominal): New test.
6851         * torture/rec-writer/tsuite-rec-writer.c: New file.
6852         (tsuite_rec_writer): New function.
6854 2010-11-13  Jose E. Marchesi  <jemarch@gnu.org>
6856         rec-parser unit tests.
6857         * torture/rec-parser/rec-parser-perror.c: New file.
6858         (test_rec_parser_perror): New function.
6859         (rec_parser_perror_nominal): New test.
6861         * torture/rec-parser/rec-parser-reset.c: New file.
6862         (test_rec_parser_reset): New function.
6863         (rec_parser_reset_nominal): New test.
6865         * torture/rec-parser/rec-parser-error.c: New file.
6866         (test_rec_parser_error): New function.
6867         (rec_parser_error_nominal): New test.
6869         * torture/rec-parser/rec-parser-eof.c: New file.
6870         (test_rec_parser_eof): New function.
6871         (rec_parser_eof_nominal): New test.
6873         * torture/rec-parser/rec-parse-db.c: New file.
6874         (test_rec_parse_db): New function.
6875         (rec_parse_db_nominal): New test.
6876         (rec_parse_db_invalid): New test.
6878         * torture/rec-parser/rec-parse-rset.c: New file.
6879         (test_rec_parse_rset): New function.
6880         (rec_parse_rset_nominal): New test.
6881         (rec_parse_rset_invalid): New test.
6883         * torture/rec-parser/rec-parse-record.c: New file.
6884         (test_rec_parse_record): New function.
6885         (rec_parse_record_nominal): New test.
6886         (rec_parse_record_invalid): New test.
6888         * torture/rec-parser/rec-parse-field.c: New file.
6889         (test_rec_parse_field): New function.
6890         (rec_parse_field_nominal): New test.
6891         (rec_parse_field_invalid): New test.
6893         * torture/rec-parser/rec-parse-field-name.c: New file.
6894         (test_rec_parse_field_name): New function.
6895         (rec_parse_field_name_nominal): New test.
6896         (rec_parse_field_name_invalid): New test.
6898         * torture/rec-parser/rec-parse-field-name-str.c: New file.
6899         (test_rec_parse_field_name_str): New function.
6900         (rec_parse_field_name_str_nominal): New test.
6901         (rec_parse_field_name_str_invalid): New test.
6903         * torture/rec-parser/rec-parser-destroy.c: New file.
6904         (test_rec_parser_destroy): New function.
6905         (rec_parser_destroy_nominal): New test.
6907         * torture/rec-parser/rec-parser-new.c: New file.
6908         (test_rec_parser_new): New function.
6909         (rec_parser_new_nominal): New test.
6911         * torture/rec-parser/tsuite-rec-parser.c: New file.
6912         (tsuite_rec_parser): New function.
6914 2010-11-12  Jose E. Marchesi  <jemarch@gnu.org>
6916         rec-field unit tests.
6917         * torture/rec-field/rec-field-to-comment.c: New file.
6918         (test_rec_field_to_comment): New function.
6919         (rec_field_to_comment_nominal): New test.
6921         * torture/rec-field/rec-field-set-char-location.c: New file.
6922         (test_rec_field_set_char_location): New function.
6923         (rec_field_set_char_location_nominal): New test.
6925         * torture/rec-field/rec-field-char-location-str.c: New file.
6926         (test_rec_field_char_location_str): New function.
6927         (rec_field_char_location_str_nominal): New test.
6929         * torture/rec-field/rec-field-char-location.c: New file.
6930         (test_rec_field_char_location): New function.
6931         (rec_field_char_location_nominal): New test.
6933         * torture/rec-field/rec-field-set-location.c: New file.
6934         (test_rec_field_set_location): New function.
6935         (rec_field_set_location_nominal): New test.
6937         * torture/rec-field/rec-field-location-str.c: New file.
6938         (test_rec_field_location_str): New function.
6939         (rec_field_location_str_nominal): New test.
6941         * torture/rec-field/rec-field-location.c: New file.
6942         (test_rec_field_location): New function.
6943         (rec_field_location_nominal): New test.
6945         * torture/rec-field/rec-field-set-source.c: New file.
6946         (test_rec_field_set_source): New function.
6947         (rec_field_set_source_nominal): New test.
6949         * torture/rec-field/rec-field-source.c: New file.
6950         (test_rec_field_source): New function.
6951         (rec_field_source_nominal): New test.
6953         * torture/rec-field/rec-field-equal-p.c: New file.
6954         (test_rec_field_equal_p): New function.
6955         (rec_field_equal_p_equal): New test.
6956         (rec_field_equal_p_nonequal): New test.
6958         * torture/rec-field/rec-field-name-str.c: New file.
6959         (test_rec_field_name_str): New function.
6960         (rec_field_name_str_nominal): New test.
6962         * torture/rec-field/rec-field-destroy.c: New file.
6963         (test_rec_field_destroy): New function.
6964         (rec_field_destroy_nominal): New test.
6966         * torture/rec-field/rec-field-new-str.c: New file.
6967         (test_rec_field_new_str): New function.
6968         (rec_field_new_str_nominal): New test.
6969         (rec_field_new_str_invalid): New test.
6971         * torture/rec-field/rec-field-new.c: New file.
6972         (test_rec_field_new): New function.
6973         (rec_field_new_nominal): New test.
6975 2010-11-12  Jose E. Marchesi  <jemarch@gnu.org>
6977         More rec-fex unit tests.
6978         * torture/rec-fex/rec-fex-elem-max.c: New file.
6979         (test_rec_fex_elem_max): New function.
6980         (rec_fex_elem_max_nosubs): New test.
6981         (rec_fex_elem_max_min): New test.
6982         (rec_fex_elem_max_minmax): New test.
6984         * torture/rec-fex/rec-fex-elem-min.c: New file.
6985         (test_rec_fex_elem_min): New function.
6986         (rec_fex_elem_min_nosubs): New test.
6987         (rec_fex_elem_min_min): New test.
6988         (rec_fex_elem_min_minmax): New test.
6990         * torture/rec-fex/rec-fex-elem-field-name-str.c: New file.
6991         (test_rec_fex_elem_field_name_str): New function.
6992         (rec_fex_elem_field_name_str_nominal): New test.
6994 2010-11-10  Jose E. Marchesi  <jemarch@gnu.org>
6996         More rec-fex unit tests.
6997         * torture/rec-fex/rec-fex-elem-field-name.c: New file.
6998         (test_rec_fex_elem_field_name): New function.
6999         (rec_fex_elem_field_name_nominal): New test.
7001         * torture/rec-fex/rec-fex-get.c: New file.
7002         (test_rec_fex_get): New function.
7003         (rec_fex_get_nominal): New test.
7004         (rec_fex_get_invalid): New test.
7006 2010-11-09  Jose E. Marchesi  <jemarch@gnu.org>
7008         rec-fex unit tests and some fixes.
7009         * torture/rec-fex/rec-fex-size.c: New file.
7010         (test_rec_fex_size): New function.
7011         (rec_fex_size_nominal): New test.
7013         * torture/rec-fex/rec-fex-sort.c: New file.
7014         (test_rec_fex_sort): New function.
7015         (rec_fex_sort_nominal): New test.
7017         * torture/rec-fex/rec-fex-check.c: New file.
7018         (test_rec_fex_check): New funtion.
7019         (rec_fex_check_simple_nominal): New test.
7020         (rec_fex_check_simple_invalid): New test.
7021         (rec_fex_check_csv_nominal): New test.
7022         (rec_fex_check_csv_invalid): New test.
7023         (rec_fex_check_sub_nominal): New test.
7024         (rec_fex_check_sub_invalid): New test.
7026         * torture/rec-fex/rec-fex-destroy.c: New file.
7027         (test_rec_fex_destroy): New function.
7028         (rec_fex_destroy_nominal): New test.
7030         * src/rec-fex.c (rec_fex_parse_elem): Support for maximum part in
7031         subscripts.
7033         * torture/rec-fex/rec-fex-new.c: New file.
7034         (test_rec_fex_new): New function.
7035         (rec_fex_new_single): New test.
7036         (rec_fex_new_simple): New test.
7037         (rec_fex_new_subscripts): New test.
7039         * torture/rec-fex/tsuite-rec-fex.c: New file.
7040         (tsuite_rec_fex): New function.
7042 2010-11-09  Jose E. Marchesi  <jemarch@gnu.org>
7044         Lists of field names supported in type definitions.  Closes task
7045         12.
7046         * TESTS: Regenerated.
7048         * torture/rec-type/tsuite-rec-type.c: Reference rec-type-descr-fex
7049         instead of rec-type-descr-field-name.
7050         * torture/Makefile.am (REC_TYPE_TSUITE): Likewise.
7052         * torture/rec-type/rec-type-descr-fex.c: File renamed from
7053         'rec-type-descr-field-name.c'.
7055         * src/rec-rset.c: Include rec-utils.h.
7057         * src/rec-types.c (REC_TYPE_DESCR_RE): Regexp modified to allow a
7058         comma-separated list of field names as part of the type
7059         descriptor.
7060         (rec_type_new): Skip the list of field names.
7061         (rec_type_descr_fex): Renamed from 'rec_type_descr_field_name'.
7063 2010-11-08 Jose E. Marchesi <jemarch@termi>
7065         Tasktool operations.
7066         * TODO: Task 19 created.
7068 2010-11-08  Jose E. Marchesi  <jemarch@gnu.org>
7070         * tasktool: Make 'test' to use -ne and -eq for integer
7071         comparisons.  Problem reported by Ralf Wildenhues.
7073 2010-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7075         * doc/recutils.texi (recset Invocation): Avoid double `='.
7077         * man/Makefile.am (man_MANS): Do not build man pages when
7078         associated programs are not present.
7080         * tasktool (tt_rec_check_utility): Fix redirection.
7082 2010-11-07 Jose E. Marchesi <jemarch@termi>
7084         Tasktool operations.
7085         * TODO: Task 16 created.
7087 2010-11-07  Jose E. Marchesi  <jemarch@gnu.org>
7089         Some improvements.
7090         * doc/recutils.texi (Record Descriptors): Documentation of the
7091         special fields fixed.
7093 2010-11-07 Jose E. Marchesi <jemarch@termi>
7095         Tasktool operations.
7096         * TODO: Task 15 created.
7098 2010-11-07  Jose E. Marchesi  <jemarch@gnu.org>
7100         * AUTHORS: Ralf Wildenhues added.
7102 2010-11-07 Jose E. Marchesi <jemarch@termi>
7104         Tasktool operations.
7105         * TODO: Task 14 created.
7106         Task 22 created.
7107         Task 10 edited.
7108         Task 21 edited.
7109         Task 21 created.
7110         Task 9 edited.
7111         Task 8 edited.
7112         Task 20 created.
7113         Task 18 created.
7114         Task 17 created.
7116 2010-11-07  Jose E. Marchesi  <jemarch@gnu.org>
7118         recins: support replace mode.
7119         * tasktool (tt_supported_vcs): Use the replace-mode of recins.
7121         * doc/recutils.texi (recins Invocation): Replace mode documented.
7123         * utils/recins.c (COMMON_ARGS): RECORD_SELECTION_ARGS added.
7124         (recutl_print_help): Print the record selection --help output.
7125         (recins_parse_args): Manage record selection arguments.
7127 2010-11-07  Jose E. Marchesi  <jemarch@gnu.org>
7129         recins: support -r|--record.
7130         * doc/recutils.texi (recins Invocation): Document -r|--record.
7132         * src/rec-parser.c (rec_parse_record_str): New function.
7134         * utils/recins.c (COMMON_ARGS): RECORD_ARG added.
7135         (recins_parse_args): Manage the -r|--record option.
7137 2010-11-07  Jose E. Marchesi  <jemarch@gnu.org>
7139         tasktool: support filtering by assigned-to in list command.
7140         * tasktool: Support the --assigned-to option in 'list'.
7141         (tt_supported_vcs): Use generic names for the fields in the
7142         selection expression.
7143         (tt_help_edit): New variable.
7144         (tt_process_cmd_show): New function.
7146 2010-11-06  Jose E. Marchesi  <jemarch@gnu.org>
7148         Syntax check fixes.
7149         * src/rec-int.c: Useless cpp parens removed.
7150         * src/rec.c: Likewise.
7152         * .x-sc_prohibit_always_true_header_tests: New file.
7154         * cfg.mk (gnulib_dir): Set gnulib_dir.
7156         * ChangeLog: Empty lines removed.
7157         * .x-sc_trailing_blank: Likewise.
7158         More exceptions added.
7160         * po/POTFILES.in: Updated.
7162         * .x-sc_prohibit_S_IS_definition: New file.
7164         * .x-sc_obsolete_symbols: New file.
7166 2010-11-06  Jose E. Marchesi  <jemarch@gnu.org>
7168         * configure.ac: Generate etc/Makefile.
7170         * etc/Makefile.am: New file.
7172 2010-11-06  Jose E. Marchesi  <jemarch@gnu.org>
7174         * etc/FSD.rec: New file.
7176         * doc/recutils.texi: Document the --no-remote command line
7177         argument for recins, recfix and recset.
7179         * utils/recins.c: Support the --no-remote command line argument.
7180         * utils/recfix.c: Likewise.
7181         * utils/recset.c: Likewise.
7183         * src/rec-int.c (rec_int_check_rset): New function argument
7184         'remote_descriptor_p'.
7185         (rec_int_check_rset): Call 'rec_int_merge_remote'.
7186         (rec_int_merge_remote): New function.
7187         Include regex.h.
7189 2010-11-06  Jose E. Marchesi  <jemarch@gnu.org>
7191         tasktool: support for ChangeLog annotations.
7192         * tasktool (tt_supported_vcs): New function.
7194 2010-11-06  Jose E. Marchesi  <jemarch@gnu.org>
7196         * configure.ac: Version changed from git to 1.0.
7198         * TODO: Some tasks added.
7200 2010-11-05  Jose E. Marchesi  <jemarch@gnu.org>
7202         * TODO: First serious version.
7204         * tasktool: Fixed many problems and 'delete' command implemented.
7206 2010-11-03  Jose E. Marchesi  <jemarch@gnu.org>
7208         recfix: little fixes.
7209         * utils/recfix.c (main): Use EXIT_SUCCESS and EXIT_FAILURE.
7210         (recfix_process_data): Fix wrong comparison.
7212 2010-11-02  Jose E. Marchesi  <jemarch@gnu.org>
7214         Generate manpages using help2man.
7215         * configure.ac: Generate man/Makefile.
7217         * man/Makefile.am: New file.
7219         * configure.ac: Search for help2man if not cross-compiling.
7221 2010-11-01  Jose E. Marchesi  <jemarch@gnu.org>
7223         Syntax check problems fixed.
7224         * src/rec-writer.c: Include config.h.
7225         * torture/runtests.c: Likewise.
7227         * tasktool: Use test ... && test ... instead of test ... -a
7228         ... (likewise for ||).
7230         * utils/csv2rec.c (parse_args): Use EXIT_* values.
7231         * utils/recutl.h: Likewise.
7232         * utils/recutl.c: Likewise.
7233         * utils/recset.c: Likewise.
7234         * utils/recsel.c: Likewise.
7235         * utils/recins.c: Likewise.
7236         * utils/recinf.c: Likewise.
7237         * utils/recfix.c: Likewise.
7238         * utils/recdel.c: Likewise.
7239         * utils/mdb2rec.c: Likewise.
7240         * src/rec-types.c: Likewise.
7241         * src/rec-sex.c: Likewise.
7243 2010-11-01  Jose E. Marchesi  <jemarch@gnu.org>
7245         Make distcheck to work.
7246         * doc/recutils.texi: Include version.texi.
7248         * doc/Makefile.am (TEXI_TEXINFOS): Added getdate.texi.
7250         * torture/rec-mset/rec-mset-count.c: Include
7251         rec-mset/elem-types.h.
7252         * torture/rec-mset/rec-mset-type-p.c: Likewise.
7253         * torture/rec-mset/rec-mset-register-type.c: Likewise.
7254         * torture/rec-mset/rec-mset-dup.c: Likewise.
7256         * torture/Makefile.am (AM_CPPFLAGS): -I$(top_srcdir)/torture
7257         added.
7259 2010-10-29  Jose E. Marchesi  <jemarch@gnu.org>
7261         Warnings removed in the codebase.
7262         * src/rec-sex.c: Include rec-utils.h.
7264         * src/rec-sex.l: Include rec-utils.h.
7266         * src/rec-types.c (rec_type_new): Missing cases REC_TYPE_DATE and
7267         REC_TYPE_EMAIL added.
7268         Include rec-utils.h for rec-atoi.
7269         (rec_type_parse_regexp): Unused variable 'b' removed.
7270         (rec_type_descr_field_name): Likewise.
7271         (rec_type_new): Likewise.
7272         (rec_type_parse_size): Unused variable 'ret' removed.
7273         (rec_type_parse_regexp_type): Unused variable 'escaping' removed.
7275         * src/rec-fex.c: Include rec-utils.h for rec-atoi.
7276         Unused static function rec_fex_parse_int removed.
7278 2010-10-29  Jose E. Marchesi  <jemarch@gnu.org>
7280         Coverage report generation.
7281         * build-aux/generate-coverage-report: New file, from libgnupdf.
7283         * configure.ac: Support the --enable-coverage switch.
7285         * src/Makefile.am (AM_CFLAGS): Add coverage gcc options if
7286         compiling the library with coverage support.
7288 2010-10-29  Jose E. Marchesi  <jemarch@gnu.org>
7290         rec-type-reg unit tests and bug fixes.
7291         * torture/rec-type-reg/rec-type-reg-get.c: New file.
7292         (test_rec_type_reg_get): New function.
7293         (rec_type_reg_get_nominal): New test.
7294         (rec_type_reg_get_nonexisting): New test.
7296         * torture/rec-type-reg/rec-type-reg-register.c: New file.
7297         (test_rec_type_reg_register): New function.
7298         (rec_type_reg_register_nominal): New test.
7300         * torture/rec-type-reg/rec-type-reg-destroy.c: New file.
7301         (test_rec_type_reg_destroy): New function.
7302         (rec_type_reg_destroy_nominal): New test.
7304         * torture/rec-type-reg/rec-type-reg-new.c: New file.
7305         (test_rec_type_reg_new): New function.
7306         (rec_type_reg_new_nominal): New test.
7308         * torture/rec-type-reg/tsuite-rec-type-reg.c: New file.
7309         (tsuite_rec_type_reg): New function.
7311 2010-10-29  Jose E. Marchesi  <jemarch@gnu.org>
7313         rec-type unit tests and bug fixes.
7314         * torture/rec-type/rec-type-check.c: New file.
7315         (test_rec_type_check): New function.
7316         (rec_type_check_int): New test.
7317         (rec_type_check_bool): New test.
7318         (rec_type_check_range): New test.
7319         (rec_type_check_real): New test.
7320         (rec_type_check_size): New test.
7321         (rec_type_check_line): New test.
7322         (rec_type_check_regexp): New test.
7323         (rec_type_check_date): New test.
7324         (rec_type_check_enum): New test.
7325         (rec_type_check_field): New test.
7326         (rec_type_check_email): New test.
7328         * torture/rec-type/rec-type-equal-p.c: New file.
7329         (test_rec_type_equal_p): New function.
7330         (rec_type_equal_p_nominal): New test.
7332         * torture/rec-type/rec-type-kind-str.c: New file.
7333         (test_rec_type_kind_str): New function.
7334         (rec_type_kind_str_nominal): New test.
7336         * torture/rec-type/rec-type-kind.c: New file.
7337         (test_rec_type_kind): New function.
7338         (rec_type_kind_nominal): New test.
7340         * torture/rec-type/rec-type-descr-field-name.c: New file.
7341         (test_rec_type_descr_field_name): New function.
7342         (rec_type_descr_field_name_nominal): New test.
7343         (rec_type_descr_field_name_invalid): New test.
7345         * torture/rec-type/rec-type-descr-p.c: New file.
7346         (test_rec_type_descr_p): New function.
7347         (rec_type_descr_p_nominal): New test.
7348         (rec_type_descr_p_invalid): New test.
7350         * torture/rec-type/rec-type-destroy.c: New file.
7351         (test_rec_type_destroy): New function.
7352         (rec_type_destroy_nominal): New test.
7354         * torture/rec-type/rec-type-new.c: New file.
7355         (test_rec_type_new): New function.
7356         (rec_type_new_nominal): New test.
7357         (rec_type_new_invalid): New test.
7359         * torture/rec-type/tsuite-rec-type.c: New file.
7360         (tsuite_rec_type): New function.
7362 2010-10-29  Jose E. Marchesi  <jemarch@gnu.org>
7364         rec-field-name unit tests and bug fixes.
7365         * TESTS: Regenerated.
7367         * torture/rec-field-name/rec-field-name-part-normalise.c: New
7368         file.
7369         (test_rec_field_name_part_normalise): New function.
7370         (rec_field_name_part_normalise_nominal): New test.
7372         * torture/rec-field-name/rec-field-name-str-p.c: New file.
7373         (test_rec_field_name_str_p): New function.
7374         (rec_field_name_str_p_nominal): New test.
7376         * torture/rec-field-name/rec-field-name-part-str-p.c: New file.
7377         (test_rec_field_name_part_str_p): New function.
7378         (rec_field_name_part_str_p_nominal): New test.
7380         * torture/rec-field-name/rec-field-name-get.c: New file.
7381         (test_rec_field_name_get): New function.
7382         (rec_field_name_get_nominal): New test.
7384         * torture/rec-field-name/rec-field-name-set.c: New file.
7385         (test_rec_field_name_set): New function.
7386         (rec_field_name_set_nominal): New test.
7388         * torture/rec-field-name/rec-field-name-size.c: New file.
7389         (test_rec_field_name_size): New function.
7390         (rec_field_name_size_empty): New test.
7391         (rec_field_name_size_nonempty): New test.
7393         * torture/rec-field-name/rec-field-name-ref-p.c: New file.
7394         (test_rec_field_name_ref_p): New function.
7395         (rec_field_name_ref_p_empty): New test.
7396         (rec_field_naem_ref_p_nonempty): New test.
7398         * torture/rec-field-name/rec-field-name-equal-p.c: New file.
7399         (test_rec_field_name_equal_p): New function.
7400         (rec_field_name_equal_p_empty): New test.
7401         (rec_field_name_equal_p_nonempty): New test.
7403         * torture/rec-field-name/rec-field-name-eql-p.c: New file.
7404         (test_rec_field_name_eql_p): New function.
7405         (rec_field_name_eql_p_empty): New test.
7406         (rec_field_naem_eql_p_nonempty): New test.
7408         * torture/rec-field-name/rec-field-name-dup.c: New file.
7409         (test_rec_field_name_dup): New function.
7410         (rec_field_name_dup_empty): New test.
7411         (rec_field_name_dup_nominal): New test.
7413         * torture/rec-field-name/rec-field-name-destroy.c: New file.
7414         (test_rec_field_name_destroy): New function.
7415         (rec_field_name_destroy_nominal): New test.
7417         * torture/rec-field-name/tsuite-rec-field-name.c: New file.
7419         * torture/rec-field-name/rec-field-name-new.c: New file.
7420         (test_rec_field_name_new): New function.
7421         (rec_field_name_new_nominal): New test.
7423 2010-10-29  Jose E. Marchesi  <jemarch@gnu.org>
7425         rec-comment unit tests and bug fixes.
7426         * TESTS: regenerated.
7428         * src/rec-comment.c (rec_comment_new): Check for a NULL argument.
7430         * torture/rec-comment/rec-comment/equal-p.c: New file.
7431         (test_rec_comment_equal_p): New function.
7432         (rec_comment_equal_p_nominal): New test.
7434         * torture/rec-comment/rec-comment-set-text.c: New file.
7435         (test_rec_comment_set_text): New function.
7436         (rec_comment_set_text_nominal): New test.
7438         * torture/rec-comment/rec-commment-text.c: New file.
7439         (test_rec_comment_text): New function.
7440         (rec_comment_text_nominal): New test.
7441         (rec_comment_text_empty): New test.
7443         * torture/rec-comment/rec-comment-dup.c: New file.
7444         (test_rec_comment_dup): New function.
7445         (rec_comment_dup_nominal): New test.
7447         * torture/rec-comment/rec-comment-new.c: New file.
7448         (test_rec_comment_new): New function.
7449         (rec_comment_new_nominal): New test.
7450         (rec_comment_new_null): New test.
7452         * torture/rec-comment/rec-comment-destroy.c: New file.
7453         (test_rec_comment_destroy): New function.
7454         (rec_comment_destroy_nominal): New test.
7456         * torture/runtests.c (main): rec-comment test suite added.
7458         * torture/Makefile.am: rec-comment files added.
7460         * torture/rec-comment/tsuite-rec-comment.c: New file.
7461         (tsuite_rec_comment): New function.
7463 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7465         Regenerate TESTS.
7466         * TESTS: Regenerated.
7468 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7470         Unit tests for rec_mset_get.
7471         * torture/rec-mset/rec-mset-get.c: New file
7472         (test_rec_mset_get): New function.
7473         (rec_mset_get_empty): New test.
7474         (rec_mset_get_existing): New test.
7475         (rec_mset_get_any): New test.
7476         (rec_mset_get_invalid): New test.
7478 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7480         Unit tests for rec_mset_count.
7481         * torture/rec-mset/rec-mset-count.c: New file.
7482         (test_rec_mset_count): New function.
7483         (rec_mset_count_empty): New test.
7484         (rec_mset_count_existing): New test.
7485         (rec_mset_count_nonexisting): New test.
7487 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7489         Unit tests for rec_mset_register_type.
7490         * torture/rec-mset/rec-mset-register-type.c: New file.
7491         (test_rec_mset_register_type): New function.
7492         (rec_mset_register_type_nominal): New test.
7494 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7496         Unit tests for rec_mset_type_p.
7497         * torture/rec-mset/rec-mset-type-p.c: New file.
7498         (test_rec_mset_type_p): New function.
7499         (rec_mset_type_p_any): New test.
7500         (rec_mset_type_p_existing): New test.
7501         (rec_mset_type_p_nonexisting): New test.
7503         * torture/rec-mset/elem-types.h: New file.
7505 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7507         Unit tests for rec_mset_dup, and a bug fixed.
7508         * src/rec-mset.c (rec_mset_dup): Avoid duplicating the counter of
7509         nodes of the element types.
7511         * torture/Makefile.am (REC_MSET_TSUITE): rec-mset-dup.c added.
7513         * torture/rec-mset/rec-mset-dup.c: New file.
7514         (test_rec_mset_dup): New function.
7515         (rec_mset_dup_empty): New test.
7517 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7519         rec_mset test suite.
7520         * torture/runtests.c: rec_mset test suite added.
7522         * torture/Makefile.am: Include files from the rec_mset test suite.
7524         * torture/rec-mset/rec-mset-new.c: New file.
7525         (rec_mset_new_and_destroy): New unit test.
7527         * torture/rec-mset/tsuite-rec-mset.c: New file.
7528         (tsuite_rec_mset): New function.
7530 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7532         * tasktool (tt_db_template_header): New variable.
7533         (tt_db_template_issue): New variable.
7534         (tt_db_template): Use tt_db_template_header and tt_db_template_issue.
7535         (tt_db_wish): New variable.
7536         (tt_db_wish_id): New variable.
7537         (tt_db_wish_summary): New variable.
7538         (tt_db_wish_description): New variable.
7540 2010-10-28  Jose E. Marchesi  <jemarch@gnu.org>
7542         Documentation improvements.
7543         * utils/recset.c (recutl_print_help): Don't duplicate the
7544         --case-insensitive option in the output of --help.
7546         * utils/recinf.c (recutl_print_help): Print a newline before the
7547         examples in the output of --help.
7549         * doc/recutils.texi: Documentation for recdel, recins, recset and
7550         recfix added to the reference manual.
7552 2010-10-25  Jose E. Marchesi  <jemarch@gnu.org>
7554         User manual work.
7555         * doc/recutils.texi (Fields and Records): Wording improvements.
7556         (Escalar types): Completed.
7557         (String types): Completed.
7558         (Time related types): Completed.
7559         (recinf Invocation): Document -S|--print-sexps.
7561         * doc/recutils.texi (Top): Improve the menu layout.
7563 2010-10-24  Jose E. Marchesi  <jemarch@gnu.org>
7565         i18n with gettext.
7566         * m4/gettext.m4: Upgrade to gettext-0.18.1.
7567         * m4/iconv.m4: Upgrade to gettext-0.18.1.
7568         * m4/lib-ld.m4: Upgrade to gettext-0.18.1.
7569         * m4/lib-link.m4: Upgrade to gettext-0.18.1.
7570         * m4/progtest.m4: Upgrade to gettext-0.18.1.
7571         * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.18.1.
7573         * src/Makefile.am (librec_la_SOURCES): Add rec.c.
7575         * src/rec-fex.c: Internationalize strings with gettext.
7576         * src/rec-types.c: Likewise.
7577         * src/rec-parser.c: Likewise.
7578         * src/rec-int.c: Likewise.
7579         * src/rec-field-name.c: Likewise.
7580         * utils/recutl.c: Likewise.
7581         * utils/recset.c: Likewise.
7582         * utils/recsel.c: Likewise.
7583         * utils/recins.c: Likewise.
7584         * utils/recinf.c: Likewise.
7585         * utils/recdel.c: Likewise.
7586         * utils/mdb2rec.c: Likewise.
7587         * utils/csv2rec.c: Likewise.
7589         * Makefile.am (SUBDIRS): Add po.
7591 2010-09-23  Jose E. Marchesi  <jemarch@gnu.org>
7593         * configure.ac: Invoke AB_INIT.
7595 2010-09-19  Jose E. Marchesi  <jemarch@gnu.org>
7597         Simple fix in --help.
7598         * utils/recutl.h (COMMON_ARGS_DOC): Don't mention recsel in the
7599         description of the --version option.
7601 2010-09-14  Jose E. Marchesi  <jemarch@gnu.org>
7603         rec-mode: make C-a to do the right thing.
7604         * lisp/rec-mode.el (rec-mode-map): Bind C-a to
7605         rec-cmd-beginning-of-line.
7606         (rec-mode-edit-map): Likewise.
7607         (rec-cmd-beginning-of-line): New function.
7609 2010-09-09  Jose E. Marchesi  <jemarch@gnu.org>
7611         Support for localization on lisp output.
7612         * src/rec-record.c: New fiels 'char_location' and
7613         'char_location_str' in the 'rec_record_s' struct.
7615         * src/rec-parser.c (rec_parse_field): Set the char location of
7616         fields.
7617         (rec_parser_ungetc): Decrease parser->character.
7619         * src/rec-field.c: New functions 'rec_field_char_location',
7620         'rec_field_set_char_location' and 'rec_field_char_location_str'.
7622         * src/rec-parser.c: Use size_t instead of int for the 'line' field
7623         of the rec_parser_s structure.
7624         (rec_parser_getc): Update parser->character as well.
7625         (rec_parser_new): Initialize parser->character to 0.
7627 2010-09-09  Jose E. Marchesi  <jemarch@gnu.org>
7629         Support for lisp output.
7630         * utils/recinf.c: Support the -S option.
7632         * utils/recsel.c: Likewise.
7634         * src/rec-writer.c (rec_write_record): New 'mode' argument.
7635         (rec_write_field_name): Likewise.
7636         (rec_write_field): Likewise.
7637         (rec_write_field_str): Likewise.
7639         * src/rec.h: New function.
7640         (rec_writer_mode_t): New data type.
7642 2010-09-02  Jose E. Marchesi  <jemarch@gnu.org>
7644         Little doc improvements.
7645         * doc/recutils.texi: Little doc improvements.
7647 2010-08-24  Jose E. Marchesi  <jemarch@gnu.org>
7649         fixes in the parsing of types.
7650         * src/rec-int.c (rec_int_check_descriptor): Localize the error in
7651         the concrete field.
7653         * src/rec-types.c: Parsing routines rewritten.
7655 2010-08-23  Jose E. Marchesi  <jemarch@gnu.org>
7657         * src/rec-types.c (rec_type_skip_blanks): New function.
7658         (rec_type_descr_field_name): Use rec_type_skip_blanks.
7659         (rec_type_new): Likewise.
7660         (rec_type_parse_int): New function.
7662 2010-08-23  Jose E. Marchesi  <jemarch@gnu.org>
7664         rec-sex: support for real values in some operators.
7665         * src/rec-sex.c (rec_sex_op_real_p): New function.
7666         (ATOF_VAL): New macro.
7668 2010-08-23  Jose E. Marchesi  <jemarch@gnu.org>
7670         utilities: use xmalloc and xstrdup.
7671         * utils/csv2rec.c: Use xmalloc instead of malloc.
7672         Use xstrdup instead of strdup.
7673         Include xalloc.h.
7675         * utils/recutl.h: Likewise.
7677         * utils/recutl.c: Likewise.
7679         * utils/recset.c: Likewise.
7681         * utils/recins.c: Likewise.
7683         * utils/mdb2rec.c: Likewise.
7685 2010-08-23  Jose E. Marchesi  <jemarch@gnu.org>
7687         mdb2rec: documentation and management of money fields.
7688         * utils/mdb2rec.c (process_table): Declare MONEY fields as real
7689         values.
7691         * doc/recutils.texi (mdb2rec Examples): Written.
7693 2010-08-23  Jose E. Marchesi  <jemarch@gnu.org>
7695         rec-types: support for the 'field' type.
7696         * src/rec-types.c (REC_TYPE_FIELD_NAME): Defined.
7697         (REC_TYPE_FIELD_VALUE_RE): Defined in terms of REC_FNAME_RE.
7698         (REC_TYPE_NAME_RE): REC_TYPE_FIELD_NAME added.
7699         (REC_TYPE_FIELD_DESCR_RE): Defined.
7700         (REC_TYPE_DESCR_RE): REC_TYPE_FIELD_DESCR_RE added.
7701         (rec_type_kind_str): Added case for REC_TYPE_FIELD.
7702         (rec_type_check): Likewise.
7703         (rec_type_parse_type_kind): Likewise.
7704         (rec_type_check_field): New function.
7706         * src/rec.h (REC_FNAME_RE): Do not include anchors in regexp.
7708 2010-08-23  Jose E. Marchesi  <jemarch@gnu.com>
7710         mdb2rec: specification of the table in the command line and the
7711         list-tables option.
7712         * doc/recutils.texi (mdb2rec Invocation): Document the
7713         --list-tables command line option.
7715         * utils/mdb2rec.c (process_mdb): Print the names of the tables,
7716         one per line, if mdb2rec_list_tables was specified.
7718         * doc/recutils.texi (mdb2rec Invocation): Document the usage of
7719         TABLE in the command line.
7721         * utils/mdb2rec.c: New global variable 'mdb2rec_mdb_table'.
7722         (parse_args): Set mdb2rec_mdb_table.
7723         (process_mdb): Process the requested table only if
7724         mdb2rec_mdb_table is initialized.
7726 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7728         mdb2rec: emit field types for VARCHAR columns.
7729         * src/rec-types.c (rec_type_new): Finish the number[] string with
7730         a null value.
7732         * utils/mdb2rec.c (process_table): Process case when col_size > 0.
7734 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7736         rec-int: warn on colling types only if the types are different.
7737         * src/rec-int.c (rec_int_check_field_type): Emit warning on
7738         colliding types only if the types are not equal.
7740         * src/rec-types.c (rec_type_equal_p): New function.
7742 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7744         mdb2rec: use compound field names to reflect relationships between
7745         columns in the mdb tables.
7746         * utils/mdb2rec.c (get_field_name): New function.
7747         (process_table): Use 'get_field_name'.
7749 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7751         manual: texinfo fixes.
7752         * doc/recutils.texi: mdb2rec is a chapter.
7753         Fix mdb2rec menu.
7755 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7757         build: advertise third-party dependencies.
7758         * README-dev: Add a note on the dependencies on third party
7759         products.
7761 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7763         Validation of record type names and minor fixes.
7764         * utils/mdb2rec.c (process_table): Use
7765         'rec_field_name_part_normalise'.
7767         * src/rec-field-name.c (rec_field_name_part_normalise): New
7768         function.
7770         * utils/mdb2rec.c (process_mdb): Configure libmdb to dump dates in
7771         ISO 8601 format.
7773         * src/rec-int.c (rec_int_check_descriptor): Check for the validity
7774         of the record set type.
7776         * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Check for the
7777         validity of the record types passed using -t.
7779         * src/rec.h: New function 'rec_field_name_str_p'.
7780         New function 'rec_field_name_part_str_p'.
7781         (REC_FNAME_PART_RE): Defined.
7782         (REC_FNAME_RE): Defined.
7784         * src/rec-field-name.c (rec_field_name_str_p): New function.
7785         (rec_field_name_part_str_p): New function.
7787         * doc/recutils.texi (Record Descriptors): Clarify that the record
7788         types have the same format restrictions that field names.
7790 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7792         build: check for glib as a dependency to build mdb2rec.
7793         * configure.ac: Check for glib.
7795         * utils/mdb2rec.c: Include glib.h.
7797 2010-08-22  Jose E. Marchesi  <jemarch@gnu.org>
7799         mdb2rec: normalize field names and new option to keep empty fields
7800         in the rec output.
7801         * doc/recutils.texi (mdb2rec Invocation): Document '-e'.
7803         * utils/mdb2rec.c (parse_args): Manage '-e'.
7804         (process_table): Normalize field names.
7806 2010-08-21  Jose E. Marchesi  <jemarch@gnu.org>
7808         utils: new util mdb2rec.
7809         * src/rec-writer.c (rec_write_rset): Manage special case: empty
7810         record sets with a record descriptor.
7812         * src/rec.h: New function 'rec_field_new_str'.
7814         * src/rec-field.c (rec_field_new_str): Idem.
7816 2010-08-20  Jose E. Marchesi  <jemarch@gnu.org>
7818         * configure.ac: Search for libmdbtools and define MDBLIBS.
7820         * utils/Makefile.am: Build mdb2rec.
7822         * utils/mdb2rec.c: New file.
7824 2010-08-20  Jose E. Marchesi  <jemarch@gnu.org>
7826         csv2rec: several minor fixes.
7827         * utils/csv2rec.c (main): Make sure a rec database was created
7828         before to attempt to write it.
7830         * configure.ac: Emit a warning if libcsv is not found, noticing
7831         the user that csv2rec won't build.
7833 2010-08-20  Jose E. Marchesi  <jemarch@gnu.org>
7835         Fixing of memory errors.
7836         * src/rec-sex.c (rec_sex_eval_node): Free the memory used by the
7837         compiled regexps.
7839         * utils/recfix.c (main): Free the memory used by the rec database.
7841         * utils/recsel.c (main): Likewise.
7843         * utils/recsel.c (recsel_process_data): Free the memory used by
7844         the rec writer.
7846         * src/rec-parser.c (rec_parser_buf_adjust): Realloc to adjust the
7847         memory used by the buffer.
7849         * src/rec-sex.l (rec_sex_lex_extract_name): Avoid an invalid write
7850         after the res[] buffer.
7852 2010-08-20  Jose E. Marchesi  <jemarch@gnu.org>
7854         utils: new util csv2rec.
7855         * doc/recutils.texi (csv2rec): New chapter.
7857         * configure.ac: Check for libcsv and define the LIBCSV automake
7858         conditional accondingly.
7860         * utils/Makefile.am (bin_PROGRAMS): csv2rec added.
7861         (csv2rec_SOURCES): New variable.
7862         (csv2rec_LDADD): New variable.
7864         * utils/csv2rec.c: New file.
7866 2010-08-20  Jose E. Marchesi  <jemarch@gnu.org>
7868         build: fix autogen.sh.
7869         * autogen.sh: Call libtoolize.
7870         Invoke automake with --add-missing.
7872 2010-08-09  Jose E. Marchesi  <jemarch@gnu.org>
7874         Little script to get cyclomatic metrics from pmccabe.
7875         * build-aux/pmccabe2rec: New file.
7877 2010-08-08  Jose E. Marchesi  <jemarch@gnu.org>
7879         Fix source in parse error messages in recinf.
7880         * utils/recinf.c (print_info_file): Specify the file name in parse
7881         errors instead of 'stdin'.
7883 2010-08-08  Jose E. Marchesi  <jemarch@gnu.org>
7885         Generate information about tests in rec format and store it in
7886         TESTS.
7887         * README-dev: Added a note on updating the TESTS file when a test
7888         is added to the test suite.
7890         * TESTS (Test): New file, generated ith 'get-test-data'.
7892         * build-aux/get-test-data: New file.
7894         * torture/rec-record/rec-record-size.c: rec_record_size_001
7895         renamed to rec_record_size_empty.
7896         rec_record_size_002 renamed to rec_record_size_nonempty.
7897         (test_rec_record_size): Call to rec_record_size_empty and
7898         rec_record_size_nonempty.
7900         * torture/rec-record/rec-record-remove-field.c:
7901         rec_record_remove_field_001 renamed to
7902         rec_record_remove_field_existing.
7903         (test_rec_record_remove_field): Call to
7904         rec_record_remove_field_existing.
7906         * torture/rec-record/rec-record-new.c: rec_record_new_001 renamed
7907         to rec_record_new_and_destroy.
7909         * torture/rec-record/rec-record-insert-field.c:
7910         rec_record_insert_field_001 renamed to
7911         rec_record_insert_field_empty.
7912         rec_record_insert_field_002 renamed to
7913         rec_record_insert_field_nonempty.
7914         rec_record_insert_field_003 renamed to
7915         rec_record_insert_field_duplicated.
7916         (test_rec_record_insert_field): Call
7917         rec_record_insert_field_empty, rec_record_insert_field_nonempty
7918         and rec_record_insert_field_duplicated.
7920         * torture/rec-record/rec-record-field-p.c: rec_record_field_p_001
7921         renamed to rec_record_field_existing.
7922         rec_record_field_p_002 renamed to rec_record_field_nonexisting.
7924         * torture/rec-field/rec-field-value.c: rec_field_value_001 renamed
7925         to rec_field_value_empty.
7926         rec_field_value_002 renamed to rec_field_value_nonempty.
7927         (test_rec_field_value): Call to rec_field_value_empty and
7928         rec_field_value_nonempty.
7930         * torture/rec-field/rec-field-set-value.c: rec_field_set_value_001
7931         renamed to rec_field_set_value_empty.
7932         rec_field_set_value_002 renamed to rec_field_set_value_nonempty.
7933         (test_rec_field_set_value): Call to rec_field_set_value_empty and
7934         rec_field_set_value_nonempty.
7936         * torture/rec-field/rec-field-set-name.c: rec_field_set_name_001
7937         renamed to rec_field_set_name_empty.
7938         rec_field_set_name_002 renamed to rec_field_set_name_nonempty.
7939         (test_rec_field_set_name): Call to rec_field_set_name_empty and
7940         rec_field_set_name_nonempty.
7942         * torture/rec-field/rec-field-name.c: rec_field_name_001 renamed
7943         to rec_field_name_empty.
7944         rec_field_name_002 renamed to rec_field_name_nonempty.
7945         (test_rec_field_name): Call to 'rec_field_name_empty' and
7946         'rec_field_name_nonempty'.
7947         Comments reformatted to contain rec data.
7949         * torture/rec-field/rec-field-dup.c: rec_field_dup_001 renamed to
7950         rec_field_dup_empty.
7951         rec_field_dup_002 renamed to rec_field_dup_nonempty.
7952         (test_rec_field_dup): Call to 'rec_field_dup_empty' and
7953         'rec_field_dup_nonempty'.
7954         Comments reformated to contain rec data.
7956 2010-08-07  Jose E. Marchesi  <jemarch@gnu.org>
7958         Import the gnulib gettext module.
7959         * 'gettext' gnulib module imported.
7961 2010-08-06  Jose E. Marchesi  <jemarch@gnu.org>
7963         Minor fixes in documentation.
7964         * src/rec-int.c (rec_int_check_field_type): Out to date comment
7965         removed.
7967         * doc/recutils.texi (Field Types): New chapter.
7968         (Escalar types): New section.
7969         (String types): New section.
7970         (Enumerated types): New section.
7971         (Time related types): New section.
7972         (Selection Expressions): New section.
7974 2010-08-05  Jose E. Marchesi  <jemarch@gnu.org>
7976         Assure proper exit values when redirecting output and some common
7977         facilities in recutl.c
7978         * utils/recset.c (recset_parse_args): Use 'recutl_fatal' and
7979         'recutl_error'.
7980         (main): Use 'recutl_init'.
7982         * utils/recins.c (recins_insert_record): Use 'recutl_error'.
7983         (main): Use 'recutl_init'.
7985         * utils/recinf.c (main): Use 'recutl_init'.
7987         * utils/recfix.c (main): Use 'recutl_init'.
7989         * utils/recdel.c (recdel_delete_records): Use 'recutl_fatal'.
7990         (recdel_delete_records): Likewise.
7991         (recdel_parse_args): Likewise.
7992         (main): Use 'recutl_init'.
7994         * utils/recsel.c (main): Use 'recutl_init'.
7996         * utils/recutl.c (recutl_error): New function.
7998         * utils/recsel.c (recsel_parse_args): Use 'recutl_fatal'.
7999         (recsel_parse_args): Likewise.
8000         (recsel_process_data): Use 'recutl_error'.
8002         * utils/recutl.c: Include 'closeout.h'.
8003         (recutl_init): New function.
8004         (recutl_init): Initialize the global variable 'program_name' with
8005         'util_name'.
8006         (recutl_init): Install the 'close_stdout' handler to be executed
8007         upon exit.
8008         (recutl_fini): New function.
8009         (recutl_fatal): New function.
8010         Include stdarg.
8012         * Module 'closeout' imported from gnulib.
8014 2010-08-05  Jose E. Marchesi  <jemarch@gnu.org>
8016         * README-dev: Imported and adapted from GNU hello.
8018         * NEWS: Likewise.
8020         * README: Rephrased to follow the GNU hello style.
8022         * configure.ac: Invoke AC_PROG_YACC.
8024         * autogen.sh: Imported and adapted from GNU hello.
8026 2010-08-02  Jose E. Marchesi  <jemarch@gnu.org>
8028         lib+utils: check the values returned by malloc.
8029         * src/rec-field.c (rec_field_set_location): Check for the return
8030         value of 'malloc'.
8032         * src/rec-parser.c (rec_parser_perror): Likewise.
8034         * src/rec-parser.c (rec_parse_field_name_str): Likewise.
8036         * src/rec-record.c (rec_record_set_location): Likewise.
8038         * utils/recins.c (recins_parse_args): Likewise.
8040         * utils/recutl.c (recutl_write_db_to_file): Likewise.
8042         * src/rec-fex.c (rec_fex_check): Emit error message only if there
8043         is enough memory to build the message.
8044         (rec_fex_parse_str_simple): Check for the return value of
8045         'malloc'.
8046         (rec_fex_parse_str_subscripts): Likewise.
8047         (rec_fex_parse_elem): Likewise.
8049 2010-08-01  Jose E. Marchesi  <jemarch@gnu.org>
8051         recutl: avoid printing spurious newline characters when -P or -R
8052         is used.
8053         * utils/recutl.c (recutl_eval_field_expression): New variable
8054         'written_field'.
8055         (recutl_eval_field_expression): Add a newline to a sequence of
8056         field values only if some field was actually written.
8058         rec-record: Tiny improvement in an algorithm.
8059         * src/rec-record.c (rec_record_get_field_by_name): Don't return
8060         from the middle of the function.  Use a variable and break
8061         instead.
8063         recsel: allow dashes in field names when checking the field
8064         expressions.
8065         * src/rec-fex.c (rec_fex_check): Allow dashes '-' in field names
8066         in field expressions.
8068         recsel: avoid a segmentation fault while printing record descriptors.
8069         * utils/recsel.c (recsel_process_data): Test for NULL before
8070         printing the record descriptor of a record set.  Reported by Kai
8071         via savannah.
8073 2010-07-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8075         Fix distcheck: linking tests in torture/.
8076         * torture/Makefile.am: Simplify.  Use relative path to librec.la
8077         so dependencies are tracked correctly and distcheck works.
8079 2010-07-31  Jose E. Marchesi  <jemarch@gnu.org>
8081         Information for the Free Software Directory added in FSD.
8082         * FSD (Description): New file.
8084         Make git to ignore some more generated files.
8085         * .gitignore: Ignore doc/recutils.aux, doc/recutils.cp, doc/recutils.cps,
8086         doc/recutils.fn, doc/recutils.fns, doc/recutils.ky,
8087         doc/recutils.log, doc/recutils.pg,
8088         doc/recutils.toc, doc/recutils.tp, doc/recutils.vr and
8089         doc/recutils.vrs.
8090         Ignore lib/alloca.h, lib/c++defs.h, lib/stdlib.h, lib/string.h,
8091         lib/sys, lib/time.h, lib/warn-on-use.h, lib/wchar.h.
8092         Ignore torture/test
8094 2010-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8096         Simplify makefile rules.
8097         * utils/Makefile.am: Simplify.
8098         * src/Makefile.am: Likewise.
8100         Typos and formatting nits.
8101         * configure.ac: Fix typo.
8102         * doc/recutils.texi: Fix typo, add some @noindents.
8104 2010-07-30  Jose E. Marchesi  <jemarch@gnu.org>
8106         * gendocs gnulib module imported.
8108 2010-07-25  Jose E. Marchesi  <jemarch@gnu.org>
8110         Manual: misc improvements.
8111         * doc/recutils.texi: Misc improvements.
8113 2010-07-25  Jose E. Marchesi  <jemarch@gnu.org>
8115         GHM 2010 slides.
8116         * doc/recutils.ept: New file.
8118 2010-07-23  Jose E. Marchesi  <jemarch@gnu.org>
8120         Parametrize the name of the fields in the issues.
8121         * tasktool: New variables containing the names of the issue
8122         fields: tt_db_field_id, tt_db_field_summary, tt_db_field_type,
8123         tt_db_field_status, tt_db_field_originator, tt_db_field_assignee,
8124         tt_db_field_assigned, tt_db_field_component, tt_db_field_created,
8125         tt_db_field_note, tt_db_field_description.
8126         (tt_db_template): Use the variables described above.
8127         (tt_version): Likewise.
8128         (tt_version): Likewise.
8129         (tt_version): Likewise.
8130         (tt_supported_vcs): Likewise.
8131         (tt_supported_vcs): Likewise.
8133 2010-07-23  Jose E. Marchesi  <jemarch@gnu.org>
8135         Avoid build dependency with bison.
8136         * lib/getdate.c: New file.
8138         * build-aux/.gitignore: Ignore ylwrap.
8140 2010-07-23  Jose E. Marchesi  <jemarch@gnu.org>
8142         Integrate getdate documentation in the manual.
8143         * doc/recutils.texi (Top): Entry for the "Date input formats"
8144         chapter added.
8145         Include 'getdate.texi'.
8146         FSF copyright added in the manual.
8148 2010-07-23  Jose E. Marchesi  <jemarch@gnu.org>
8150         Implementation of the 'date' field type.
8151         * tasktool (tt_db_template): Declare Date as a field of type
8152         'date'.
8154         * src/Makefile.am (librec_la_LIBADD): LIB_CLOCK_GETTIME added to
8155         find the definition of 'clock_gettime'.
8157         * src/rec-types.c (rec_type_check_date): Implemented using
8158         'get_date'.
8159         Include getdate.h.
8161 2010-07-23  Jose E. Marchesi  <jemarch@gnu.org>
8163         Gnulib work.
8164         * Gnulib updated.
8166         * Module 'getdate' imported.
8168 2010-07-18  Jose E. Marchesi  <jemarch@gnu.org>
8170         Localization of fields and better error reporting.
8171         * src/rec-int.c (rec_int_check_record_types): Improve error
8172         localization.
8174         * utils/recutl.c (recutl_parse_db_from_file): Report parse errors.
8176         * src/rec-int.c (rec_int_check_field_type): Use localization
8177         information in the warning.
8179         * src/rec-parser.c (rec_parse_field): Annotate the fields with
8180         their location in the source file.
8182         * src/rec-field.c (rec_field_destroy): Free memory occupied by the
8183         location properties upon field destruction.
8185         * src/rec.h: New functions 'rec_field_source',
8186         'rec_field_set_source', 'rec_field_location',
8187         'rec_field_set_location' and 'rec_field_location_str'.
8189         * src/rec-field.c: Implementation of the functions listed above.
8191 2010-07-18  Jose E. Marchesi  <jemarch@gnu.org>
8193         * src/rec-int.c: Copyright notification added.
8195 2010-07-15  Jose E. Marchesi  <jemarch@gnu.org>
8197         * src/rec-field-name.c (rec_field_name_ref_p): New function.
8199         * src/rec-int.c (rec_int_check_rset): Pass 'db' to
8200         'rec_rset_elem_record'.
8202         * utils/recins.c (recins_insert_record): Pass the database
8203         containing the rset containing the record to 'rec_int_check_rset'.
8205         * utils/recset.c (recset_process_actions): Likewise.
8207         * src/rec.h: 'rec_int_check_rset' gets a parameter (optional using
8208         NULL) 'db'.
8209         Likewise for 'rec_int_check_record'.
8210         Likewise for 'rec_int_check_field_type'.
8212         * src/rec-int.c (rec_int_check_rset): Likewise.
8214 2010-07-15  Jose E. Marchesi  <jemarch@gnu.org>
8216         New function re_int_check_db to check the integrity of a database.
8217         * utils/recfix.c (recfix_process_data): Use 'rec_int_check_db'.
8219         * src/rec-int.h: New function 'rec_int_check_db'.
8221         * src/rec-int.c (rec_int_check_db): New function.
8223 2010-07-15  Jose E. Marchesi  <jemarch@gnu.org>
8225         Relocate data integrity related code to rec-int.c.
8226         * src/rec-int.c (rec_int_check_field_type): Use
8227         'rec_rset_get_type_reg' to get the type registry of records sets
8228         instead of accessing the data structure.
8230         * src/rec.h: New function 'rec_rset_get_type_reg'.
8232         * src/rec-rset.c (rec_rset_get_type_reg): New function.
8234         * src/Makefile.am (librec_la_SOURCES): 'rec-int.c' added.
8236         * utils/recfix.c (recfix_process_data): Use 'rec_int_check_rset'
8237         instead of 'rec_rset_check'.
8239         * utils/recins.c (recins_insert_record): Likewise.
8241         * utils/recset.c (recset_process_actions): Likewise.
8243         * src/rec-int.c: New file.
8245         * src/rec.h: 'rec_rset_check' renamed to 'rec_int_check_rset'.
8246         'rec_rset_check_record' renamed to 'rec_int_check_record'.
8247         'rec_rset_check_field_type' renamed to 'rec_int_check_field_type'.
8249 2010-07-14  Jose E. Marchesi  <jemarch@gnu.com>
8251         Change -v|--verbose in recinf for -d|--descriptor.
8252         * utils/recinf.c (COMMON_ARGS): VERBOSE_ARG renamed to
8253         DESCRIPTOR_ARG.
8254         (print_info_file): Process the -d|--descriptor command line
8255         argument instead of -v|--verbose.
8257 2010-07-14  Jose E. Marchesi  <jemarch@gnu.org>
8259         Support for the --type option in recinf.
8260         * utils/recinf.c (COMMON_ARGS): New argument 'TYPE_ARG'.
8261         (GNU_longOptions): New argument '--type'.
8262         (recutl_help_msg): Doc for the new argument 'type'.
8263         (recinf_type): New global variable.
8264         (print_info_file): If a type was specified at command line, skip
8265         records not having that type.
8267 2010-07-14  Jose E. Marchesi  <jemarch@gnu.org>
8269         Keep the descriptor relative position when inserting records in an
8270         empty record set.
8271         * utils/recins.c (recins_insert_record): Take into account the
8272         descriptor relative position in the record set when inserting a
8273         record into an empty rset.
8275 2010-07-14  Jose E. Marchesi  <jemarch@gnu.org>
8277         Little fixes in tasktool.
8278         * tasktool (tt_db_show_task): Use a selection expression implying
8279         that Id is an integer, not a string.
8280         (tt_supported_vcs): Typo fixed.
8282         * tasktool (tt_db_task_p): Likewise.
8284 2010-07-14  Jose E. Marchesi  <jemarch@gnu.org>
8286         Fix a regression in the definition of the REC_TYPE_DESCR_RE
8287         regexp.
8288         * src/rec-types.c (REC_TYPE_DESCR_RE): Regexp fixed.
8290 2010-07-13  Jose E. Marchesi  <jemarch@gnu.org>
8292         Support for the type 'field' removed.
8293         * src/rec-types.c: Data types, constants and functions removed for
8294         the 'field' type.
8296 2010-07-13  Jose E. Marchesi  <jemarch@gnu.org>
8298         Bug preventing empty fields without a beginning space fixed.
8299         * src/rec-parser.c (rec_parse_field_name): If a newline is found
8300         terminating a field name then push it back to the input stream, so
8301         it will be part of the field value.
8303 2010-07-13  Jose E. Marchesi  <jemarch@gnu.org>
8305         Keep information about the position of the record descriptor in a
8306         record set.
8307         * src/rec-rset.c (rec_rset_set_descriptor_pos): New function.
8308         (rec_rset_descriptor_pos): New function.
8309         (rec_rset_new): Initialize new->descriptor_pos to 0.
8310         (struct rec_rset_s): New field descriptor_pos.
8312         * src/rec.h: Prototypes for 'rec_rset_descriptor_pos' and
8313         'rec_rset_set_descriptor_pos'.
8315         * src/rec-parser.c (rec_parse_rset): New local variable to store
8316         the number of comments added to the record set.  In the special
8317         case where some comments are preceding the first record descriptor
8318         in the file, store the relative position of the descriptor in the
8319         record set using rec_rset_descriptor_pos.
8321         * src/rec-writer.c (rec_write_rset): Write the descriptor in its
8322         relative position into the record set.
8324 2010-06-19  Jose E. Marchesi  <jemarch@gnu.org>
8326         * utils/recins.c: Help string improved.
8328 2010-04-30  Jose E. Marchesi  <jemarch@gnu.org>
8330         * lisp/rec-mode.el (rec-count): New implementation based on
8331         'recsel'.
8333 2010-04-28  Jose E. Marchesi  <jemarch@gnu.org>
8335         * .gitignore: Ignore /utils/recfix.
8337 2010-04-22  Jose E. Marchesi  <jemarch@gnu.org>
8339         * utils/recset.c (recset_parse_args): Stop the program with an
8340         error code if an invalid option is specified in the command line.
8341         (recset_process_actions): SET action implemented.
8343 2010-04-21  Jose E. Marchesi  <jemarch@gnu.org>
8345         * utils/recset.c: Help string completed with record selection
8346         options, fields selection options and actions.
8348         * doc/recutils.texi (Record Descriptors): Documentation for the
8349         record descriptor field '%order'.
8351 2010-04-08  Jose E. Marchesi  <jemarch@gnu.org>
8353         * src/rec-mset.c: Distribution terms added.
8355         * src/rec-mset.h: Likewise.
8357 2010-04-07  Jose E. Marchesi  <jemarch@gnu.org>
8359         * src/rec-mset.c (rec_mset_elem_next): Added the MSET parameter.
8360         Return the first element of the given type if ELEM is NULL.
8362 2010-04-01  Jose E. Marchesi  <jemarch@gnu.org>
8364         * .gitignore: Ignore backup files.
8366 2010-01-11  Jose E. Marchesi  <jemarch@gnu.org>
8368         * src/rec-parser.c (rec_parse_field_name_str): New function.
8370 2010-01-09  Jose E. Marchesi  <jemarch@gnu.org>
8372         * src/Makefile.am (librec_la_SOURCES): rec-sex.l added to the
8373         list.
8375         * src/rec-sex.y: New file.
8377         * src/rec-sex.l: New file.
8379 2009-12-28  Jose E. Marchesi  <jemarch@gnu.org>
8381         * utils/recinf.h (HELP_ARG): New file.
8383         * utils/recinf.c: New file.
8385         * utils/Makefile.am (recinf_LDFLAGS): New file.
8387 2009-12-23  Jose E. Marchesi  <jemarch@gnu.org>
8389         * lisp/rec-mode.el: New file.
8390         (rec-field-trim-value): New function.
8391         (rec-cmd-trim-field-value): New function.
8393 2009-11-30  Jose E. Marchesi  <jemarch@gnu.org>
8395         * lisp/rec-mode.el (rec-beginning-of-record-pos): Don't signal an
8396         error if the buffer is empty.
8398 2009-10-02  Jose E. Marchesi  <jemarch@gnu.org>
8400         * lisp/rec-mode.el: New file.
8402 2009-10-01  Jose E. Marchesi  <jemarch@gnu.org>
8404         * src/rec-record.c (rec_record_new): Allow duplicates.
8406 2009-09-03  Jose E. Marchesi  <jemarch@gnu.org>
8408         * src/grec.h: Comments clarified.
8410 2009-07-23  Jose E. Marchesi  <jemarch@gnu.org>
8412         * doc/fdl.texi: New file.
8414         * doc/gnurec.texi: New file.
8416 2009-07-13  Jose E. Marchesi  <jemarch@gnu.org>
8418         * torture/runtests.c (main): Use CK_ENV instead of CK_VERBOSE in
8419         srunner_run_all.
8421         * Begin of the change log.
8423 Copyright 2009-2015 Jose E. Marchesi
8425 Copying and distribution of this file, with or without modification, are
8426 permitted in any medium without royalty provided the copyright notice
8427 and this notice are preserved.