"Fossies" - the Fresh Open Source Software Archive 
Member "recutils-1.9/ChangeLog" (16 Apr 2022, 282320 Bytes) of package /linux/misc/recutils-1.9.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "ChangeLog":
1.8_vs_1.9.
1 2022-04-16 Jose E. Marchesi <jemarch@gnu.org>
2
3 * configure.ac: Bump version to 1.9.
4
5 2022-04-16 Jose E. Marchesi <jemarch@gnu.org>
6
7 CVE-2021-46019
8 CVE-2021-46022
9 CVE-2021-46022
10 * src/rec-parser.c (rec_parse_comment): Avoid 0xff being
11 interpreted as (int) -1.
12
13 2022-04-16 Jose E. Marchesi <jemarch@gnu.org>
14
15 * configure.ac: Remove algol68 bindings support.
16 * Makefile.am: Remove algol68 from subdirs.
17 * algol68: Delete.
18
19 2022-04-16 Jose E. Marchesi <jemarch@gnu.org>
20
21 * src/rec.h (enum rec_std_field_e): New entry REC_FIELD_SINGULAR.
22 * src/rec-field-name.c (fnames): Add "singular".
23 * src/rec-rset.c (rec_rset_rename_field): Handle
24 REC_FIELD_SINGULAR.
25 * src/rec-int.c (rec_int_check_record_singular): Define.
26 * torture/utils/recfix.sh: New tests.
27 * doc/recutils.texi: Document singular fields.
28
29 2022-01-20 Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
30
31 * utils/recfmt.c (recfmt_apply_template): Add open brace as excluded
32 character in regexp.
33 * torture/utils/recfmt.sh (recfmt-curly): New test.
34
35 2020-11-18 Jose E. Marchesi <jemarch@gnu.org>
36
37 * src/rec-parser.c (rec_parse_db): Fix error reporting.
38
39 2020-11-11 Jose E. Marchesi <jemarch@gnu.org>
40
41 * etc/rec-mode.el: Delete.
42 * etc/ob-rec.el: Likewise.
43 * etc/Makefile.am (dist_lisp_DATA): Remove.
44 * doc/rec-mode.texi: Delete.
45 * doc/Makefile.am (info_TEXINFOS): Remove rec-mode.texi.
46 * m4/pkg.m4: New file.
47
48 2020-11-09 Antoine Kalmbach <ane@iki.fi>
49
50 * utils/recutl.c (recutl_read_file): Update to latest signature
51 from gnulib
52
53 2020-11-07 Antoine Kalmbach <ane@iki.fi>
54
55 * etc/rec-mode.el (rec-summary-fields): split by comma and space
56 (rec-cmd-show-summary): split minibuffer input
57
58 2020-11-06 John Soo <jsoo1@asu.edu>
59
60 * doc/recutils.texi: Fix long option name for -j/--join.
61
62 2020-10-18 Jose E. Marchesi <jemarch@gnu.org>
63
64 * src/rec.c: Simplify code.
65 * src/rec.h: Likewise.
66 * src/rec-buf.c: Likewise.
67 * src/rec-comment.c: Likewise.
68 * src/rec-crypt.c: Likewise.
69 * src/rec-crypt-dummy.c: Likewise.
70 * src/rec-db.c: Likewise.
71 * src/rec-fex.c: Likewise.
72 * src/rec-field.c: Likewise.
73 * src/rec-field-name.c: Likewise.
74 * src/rec-int.c: Likewise.
75 * src/rec-parser.c: Likewise.
76 * src/rec-record.c: Likewise.
77 * src/rec-rset.c: Likewise.
78 * src/rec-sex.c: Likewise.
79 * src/rec-sex-ast.c: Likewise.
80 * src/rec-sex-ast.h: Likewise.
81 * src/rec-sex-lex.l: Likewise.
82 * src/rec-sex-parser.c: Likewise.
83 * src/rec-sex-parser.h: Likewise.
84 * src/rec-sex-tab.y: Likewise.
85 * src/rec-types.c: Likewise.
86 * src/rec-utils.c: Likewise.
87 * src/rec-utils.h: Likewise.
88 * src/rec-writer.c: Likewise.
89 * utils/csv2rec.c: Likewise.
90 * utils/mdb2rec.c: Likewise.
91 * utils/rec2csv.c: Likewise.
92 * utils/recdel.c: Likewise.
93 * utils/recfix.c: Likewise.
94 * utils/recfmt.c: Likewise.
95 * utils/recinf.c: Likewise.
96 * utils/recins.c: Likewise.
97 * utils/recsel.c: Likewise.
98 * utils/recset.c: Likewise.
99 * utils/recutl.c: Likewise.
100 * utils/recutl.h: Likewise.
101
102 2020-10-16 Jose E. Marchesi <jemarch@gnu.org>
103
104 * src/rec-mset.c: Simplify code.
105 * src/rec.h: Likewise.
106
107 2020-06-02 Jose E. Marchesi <jemarch@gnu.org>
108
109 * utils/recfix.c (recfix_do_check): Print an error message when a
110 file cannot be read.
111 (recfix_do_sort): Likewise.
112 (recfix_do_crypt): Likewise.
113 (recfix_do_auto): Likewise.
114
115 2020-04-28 Jose E. Marchesi <jemarch@gnu.org>
116
117 * doc/recutils.texi: Templates have slots, not spots.
118
119 2020-03-29 Jose E. Marchesi <jemarch@gnu.org>
120
121 * doc/recutils.texi (Simple Selections): Fix typo.
122
123 2020-02-04 Jose E. Marchesi <jemarch@gnu.org>
124
125 * src/rec-rset.c (rec_rset_type_field_fex): Allow blanks before
126 the FEX in a %type field.
127 * torture/utils/recfix.sh (blanks-before-fex-in-type): New test
128 file.
129 (recfix-blanks-before-fex-in-type): New test.
130 * NEWS: Updated.
131
132 2020-01-29 Jose E. Marchesi <jemarch@gnu.org>
133
134 * doc/recutils.texi (Invoking recins): Do not claim that recins
135 creates non-existent files.
136 * NEWS: Update.
137
138 2020-01-29 Dominic Walden <dominic@dwalden.co.uk>
139
140 * doc/recutils.texi (Using ob-rec.el): New chapter.
141
142 2020-01-29 Jose E. Marchesi <jemarch@gnu.org>
143
144 * utils/csv2rec.c (field_cb): Detect and error when a row contains
145 too many columns.
146
147 2020-01-28 Jose E. Marchesi <jemarch@gnu.org>
148
149 * utils/recutl.c (recutl_print_version): Update copyright.
150 * src/rec-crypt-dummy.c: Likewise.
151
152 2020-01-28 Jose E. Marchesi <jemarch@gnu.org>
153
154 * configure.ac: Update version to 1.8.90.
155 * NEWS: Updated for 1.8.90.
156
157 2020-01-28 Jose E. Marchesi <jose.marchesi@oracle.com>
158
159 * bootstrap.conf (gnulib_modules): Import the modules copy-file
160 and remove.
161 * utils/recutl.c (recutl_write_db_to_file): Copy and remove
162 instead of rename temporary files.
163
164 2020-01-27 Jose E. Marchesi <jemarch@gnu.org>
165
166 * bootstrap.conf (gnulib_modules): Import module update-copyright.
167 * gnulib: Update submodule reference to latest master.
168
169 2019-06-23 Jose E. Marchesi <jemarch@gnu.org>
170
171 * utils/csv2rec.c (recutl_print_help): Spelling fix: ommited ->
172 omitted.
173 * man/csv2rec.1: Regenerated.
174 Reported by Sven Wick.
175
176 2019-02-04 Brandon Invergo <brandon@invergo.net>
177
178 * utils/rec2csv.c (DELIM_ARG): New long option.
179 (rec2csv_parse_args): Use DELIM_ARG and put RECORD_TYPE_ARG in the
180 right place.
181
182 2019-01-07 Jose E. Marchesi <jemarch@gnu.org>
183
184 * doc/recutils.texi (Top): Spurious menu header "Remote
185 Descriptors" removed.
186
187 2019-01-03 Jose E. Marchesi <jose.marchesi@oracle.com>
188
189 * configure.ac: Bump version to 1.8.
190 * NEWS: Likewise.
191
192 2018-05-31 Jose E. Marchesi <jemarch@gnu.org>
193
194 * doc/recutils.texi (Bash Builtins): Note that some systems
195 require the full path to the bash builtin shared object.
196
197 2018-03-19 Jose E. Marchesi <jemarch@gnu.org>
198
199 * configure.ac: Bump version to 1.7.91.
200 * NEWS: Likewise.
201
202 2018-03-19 Jose E. Marchesi <jemarch@gnu.org>
203
204 * bootstrap.conf (gnulib_modules): Use the signal-h module to
205 guarantee a GNU-like signal.h.
206
207 2018-03-18 Jose E. Marchesi <jose.marchesi@oracle.com>
208
209 * utils/recutl.c (PATH_MAX): handle systems where it is not
210 defined such as GNU/Hurd.
211
212 2018-03-18 Jose E. Marchesi <jose.marchesi@oracle.com>
213
214 * src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Use %g instead
215 of %zd to print the result of aggregate functions.
216 * torture/utils/recsel.sh: Adjust expected result.
217
218 2018-03-17 Jose E. Marchesi <jemarch@gnu.org>
219
220 * bash/readrec.c (readrec_builtin): Immediately return EX_USAGE if
221 no_options returns != 0. Fixes readrec --help.
222
223 2018-03-17 Jose E. Marchesi <jemarch@gnu.org>
224
225 * utils/recutl.c (recutl_print_version): Update copyright years.
226 * bash/readrec.c: Include config.h.
227 * bash/Makefile.am (COMMON_CPPFLAGS): Include the builddir lib.
228 * src/rec-sex-tab.y: Use new form of %name-prefix.
229
230 2018-03-17 gettextize <bug-gnu-gettext@gnu.org>
231
232 * m4/iconv.m4: Upgrade to gettext-0.19.8.1.
233 * m4/lib-ld.m4: Upgrade to gettext-0.19.8.1.
234 * m4/lib-link.m4: Upgrade to gettext-0.19.8.1.
235 * m4/lib-prefix.m4: Upgrade to gettext-0.19.8.1.
236 * m4/progtest.m4: Upgrade to gettext-0.19.8.1.
237 * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.8.
238
239 2018-03-17 Jose E. Marchesi <jemarch@gnu.org>
240
241 * src/Makefile.am (AM_CPPFLAGS): Include the builddir lib.
242 * configure.ac: Update version to 1.8.
243 * doc/recutils.texi (Bash Builtins): Add missing -f in enable
244 example.
245 * bash/Makefile.am (COMMON_CPPFLAGS): Add BASH_HEADERS/include to
246 the headers search path.
247
248 2018-02-24 Jose E. Marchesi <jemarch@gnu.org>
249
250 * configure.ac: Use the subdir-object automake option in
251 AM_INIT_AUTOMAKE.
252
253 2018-02-15 Jose E. Marchesi <jose.marchesi@oracle.com>
254
255 * utils/recutl.c (recutl_write_db_to_file): Do not use the current
256 directory to hold temporary files.
257
258 2017-01-31 Jose E. Marchesi <jose.marchesi@oracle.com>
259
260 * README-dev: Correct typo.
261
262 2017-01-26 Jose E. Marchesi <jose.marchesi@oracle.com>
263
264 * etc/rec-mode.el: Require tabulated-list.
265
266 2016-12-19 Jose E. Marchesi <jemarch@gnu.org>
267
268 * NEWS: Prepare release 1.8.
269
270 2016-10-18 Jose E. Marchesi <jose.marchesi@oracle.com>
271
272 * etc/rec-mode.el (rec-mode): Fix typo and run the actual
273 rec-mode-hook.
274
275 2016-10-05 Jose E. Marchesi <jemarch@gnu.org>
276
277 * etc/rec-mode.el (rec-remove-continuation-line-marker-overlays):
278 Fix setq typo.
279
280 2016-09-13 Jose E. Marchesi <jemarch@gnu.org>
281
282 * doc/recutils.texi: "Latinajo" fixed. Reported by Giovanni
283 Ridolfi.
284
285 2016-06-21 Jose E. Marchesi <jemarch@gnu.org>
286
287 * etc/ob-rec.el (org-babel-execute:rec): orb-babel switched to
288 lexical-binding. Define a result-params locally.
289
290 2015-11-02 Jose E. Marchesi <jemarch@gnu.org>
291
292 * etc/rec-mode.el (rec-field-name-face): New face.
293 (rec-keyword-face): Likewise.
294 (rec-continuation-line-face): Likewise.
295 (rec-font-lock-keywords): Use the rec-* faces.
296
297 2015-05-05 Jose E. Marchesi <jemarch@gnu.org>
298
299 src,torture: numeric results from aggregated functions are signed.
300 * src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Numeric results
301 from aggregated functions are signed.
302 * torture/utils/recsel.sh (negative_fields): New test input file.
303 (recsel-aggregate-sum-negative): New test.
304
305 2015-04-28 Jose E. Marchesi <jemarch@gnu.org>
306
307 * etc/rec-mode.el (rec-cmd-compile): Quote the file name argument
308 before to pass it to recfix in a shell.
309
310 2015-04-27 Jose E. Marchesi <jemarch@gnu.org>
311
312 * README: Copyright years updated.
313 * utils/recutl.h: Likewise.
314 * utils/recutl.c: Likewise.
315 * utils/recset.c: Likewise.
316 * utils/recsel.c: Likewise.
317 * utils/recins.c: Likewise.
318 * utils/recinf.c: Likewise.
319 * utils/recfmt.c: Likewise.
320 * utils/recfix.c: Likewise.
321 * utils/recdel.c: Likewise.
322 * utils/rec2csv.c: Likewise.
323 * utils/mdb2rec.c: Likewise.
324 * utils/Makefile.am: Likewise.
325 * utils/csv2rec.c: Likewise.
326 * torture/utils/testutils.sh: Likewise.
327 * torture/utils/recset.sh: Likewise.
328 * torture/utils/recsel.sh: Likewise.
329 * torture/utils/recins.sh: Likewise.
330 * torture/utils/recinf.sh: Likewise.
331 * torture/utils/recfmt.sh: Likewise.
332 * torture/utils/recfix.sh: Likewise.
333 * torture/utils/recdel.sh: Likewise.
334 * torture/utils/rec2csv.sh: Likewise.
335 * torture/utils/p-recsel.sh: Likewise.
336 * torture/utils/Makefile.am: Likewise.
337 * torture/utils/csv2rec.sh: Likewise.
338 * torture/utils/config.sh.in: Likewise.
339 * torture/runtests.c: Likewise.
340 * torture/rec-writer/tsuite-rec-writer.c: Likewise.
341 * torture/rec-writer/rec-write-rset.c: Likewise.
342 * torture/rec-writer/rec-writer-new.c: Likewise.
343 * torture/rec-writer/rec-write-record.c: Likewise.
344 * torture/rec-writer/rec-writer-destroy.c: Likewise.
345 * torture/rec-writer/rec-write-field-str.c: Likewise.
346 * torture/rec-writer/rec-write-field-name-str.c: Likewise.
347 * torture/rec-writer/rec-write-field-name.c: Likewise.
348 * torture/rec-writer/rec-write-field.c: Likewise.
349 * torture/rec-writer/rec-write-db.c: Likewise.
350 * torture/rec-writer/rec-write-comment-str.c: Likewise.
351 * torture/rec-writer/rec-write-comment.c: Likewise.
352 * torture/rec-type-reg/tsuite-rec-type-reg.c: Likewise.
353 * torture/rec-type-reg/rec-type-reg-new.c: Likewise.
354 * torture/rec-type-reg/rec-type-reg-get.c: Likewise.
355 * torture/rec-type-reg/rec-type-reg-destroy.c: Likewise.
356 * torture/rec-type/tsuite-rec-type.c: Likewise.
357 * torture/rec-type/rec-type-set-name.c: Likewise.
358 * torture/rec-type/rec-type-new.c: Likewise.
359 * torture/rec-type/rec-type-name.c: Likewise.
360 * torture/rec-type/rec-type-kind-str.c: Likewise.
361 * torture/rec-type/rec-type-kind.c: Likewise.
362 * torture/rec-type/rec-type-equal-p.c: Likewise.
363 * torture/rec-type/rec-type-destroy.c: Likewise.
364 * torture/rec-type/rec-type-descr-p.c: Likewise.
365 * torture/rec-type/rec-type-check.c: Likewise.
366 * torture/rec-sex/tsuite-rec-sex.c: Likewise.
367 * torture/rec-sex/rec-sex-new.c: Likewise.
368 * torture/rec-sex/rec-sex-eval.c: Likewise.
369 * torture/rec-sex/rec-sex-destroy.c: Likewise.
370 * torture/rec-sex/rec-sex-compile.c: Likewise.
371 * torture/rec-record/tsuite-rec-record.c: Likewise.
372 * torture/rec-record/rec-record-size.c: Likewise.
373 * torture/rec-record/rec-record-remove-field.c: Likewise.
374 * torture/rec-record/rec-record-new.c: Likewise.
375 * torture/rec-record/rec-record-insert-field.c: Likewise.
376 * torture/rec-record/rec-record-field-p.c: Likewise.
377 * torture/rec-parser/tsuite-rec-parser.c: Likewise.
378 * torture/rec-parser/rec-parse-rset.c: Likewise.
379 * torture/rec-parser/rec-parser-seek-mem.c: Likewise.
380 * torture/rec-parser/rec-parser-reset.c: Likewise.
381 * torture/rec-parser/rec-parser-perror.c: Likewise.
382 * torture/rec-parser/rec-parser-new-str.c: Likewise.
383 * torture/rec-parser/rec-parser-new-mem.c: Likewise.
384 * torture/rec-parser/rec-parser-new.c: Likewise.
385 * torture/rec-parser/rec-parser-error.c: Likewise.
386 * torture/rec-parser/rec-parser-eof.c: Likewise.
387 * torture/rec-parser/rec-parse-record-str.c: Likewise.
388 * torture/rec-parser/rec-parse-record.c: Likewise.
389 * torture/rec-parser/rec-parser-destroy.c: Likewise.
390 * torture/rec-parser/rec-parse-field-name-str.c: Likewise.
391 * torture/rec-parser/rec-parse-field-name.c: Likewise.
392 * torture/rec-parser/rec-parse-field.c: Likewise.
393 * torture/rec-parser/rec-parse-db.c: Likewise.
394 * torture/rec-mset/tsuite-rec-mset.c: Likewise.
395 * torture/rec-mset/rec-mset-type-p.c: Likewise.
396 * torture/rec-mset/rec-mset-register-type.c: Likewise.
397 * torture/rec-mset/rec-mset-new.c: Likewise.
398 * torture/rec-mset/rec-mset-get-at.c: Likewise.
399 * torture/rec-mset/rec-mset-dup.c: Likewise.
400 * torture/rec-mset/rec-mset-count.c: Likewise.
401 * torture/rec-mset/elem-types.h: Likewise.
402 * torture/rec-field-name/tsuite-rec-field-name.c: Likewise.
403 * torture/rec-field-name/rec-field-name-p.c: Likewise.
404 * torture/rec-field-name/rec-field-name-normalise.c: Likewise.
405 * torture/rec-field-name/rec-field-name-equal-p.c: Likewise.
406 * torture/rec-field/tsuite-rec-field.c: Likewise.
407 * torture/rec-field/rec-field-value.c: Likewise.
408 * torture/rec-field/rec-field-to-comment.c: Likewise.
409 * torture/rec-field/rec-field-source.c: Likewise.
410 * torture/rec-field/rec-field-set-value.c: Likewise.
411 * torture/rec-field/rec-field-set-source.c: Likewise.
412 * torture/rec-field/rec-field-set-name.c: Likewise.
413 * torture/rec-field/rec-field-set-location.c: Likewise.
414 * torture/rec-field/rec-field-set-char-location.c: Likewise.
415 * torture/rec-field/rec-field-new.c: Likewise.
416 * torture/rec-field/rec-field-name.c: Likewise.
417 * torture/rec-field/rec-field-location-str.c: Likewise.
418 * torture/rec-field/rec-field-location.c: Likewise.
419 * torture/rec-field/rec-field-equal-p.c: Likewise.
420 * torture/rec-field/rec-field-dup.c: Likewise.
421 * torture/rec-field/rec-field-destroy.c: Likewise.
422 * torture/rec-field/rec-field-char-location-str.c: Likewise.
423 * torture/rec-field/rec-field-char-location.c: Likewise.
424 * torture/rec-fex/tsuite-rec-fex.c: Likewise.
425 * torture/rec-fex/rec-fex-str.c: Likewise.
426 * torture/rec-fex/rec-fex-sort.c: Likewise.
427 * torture/rec-fex/rec-fex-size.c: Likewise.
428 * torture/rec-fex/rec-fex-new.c: Likewise.
429 * torture/rec-fex/rec-fex-get.c: Likewise.
430 * torture/rec-fex/rec-fex-elem-rewrite-to.c: Likewise.
431 * torture/rec-fex/rec-fex-elem-min.c: Likewise.
432 * torture/rec-fex/rec-fex-elem-max.c: Likewise.
433 * torture/rec-fex/rec-fex-elem-field-name.c: Likewise.
434 * torture/rec-fex/rec-fex-destroy.c: Likewise.
435 * torture/rec-fex/rec-fex-check.c: Likewise.
436 * torture/rec-comment/tsuite-rec-comment.c: Likewise.
437 * torture/rec-comment/rec-comment-text.c: Likewise.
438 * torture/rec-comment/rec-comment-set-text.c: Likewise.
439 * torture/rec-comment/rec-comment-new.c: Likewise.
440 * torture/rec-comment/rec-comment-equal-p.c: Likewise.
441 * torture/rec-comment/rec-comment-dup.c: Likewise.
442 * torture/rec-comment/rec-comment-destroy.c: Likewise.
443 * torture/Makefile.am: Likewise.
444 * src/rec-writer.c: Likewise.
445 * src/rec-utils.h: Likewise.
446 * src/rec-utils.c: Likewise.
447 * src/rec-types.c: Likewise.
448 * src/rec-sex-tab.y: Likewise.
449 * src/rec-sex-parser.h: Likewise.
450 * src/rec-sex-parser.c: Likewise.
451 * src/rec-sex-lex.l: Likewise.
452 * src/rec-sex.c: Likewise.
453 * src/rec-sex-ast.h: Likewise.
454 * src/rec-sex-ast.c: Likewise.
455 * src/rec-rset.c: Likewise.
456 * src/rec-record.c: Likewise.
457 * src/rec-int.c: Likewise.
458 * src/rec.h: Likewise.
459 * src/rec-field-name.c: Likewise.
460 * src/rec-field.c: Likewise.
461 * src/rec-fex.c: Likewise.
462 * src/rec-db.c: Likewise.
463 * src/rec-crypt-dummy.c: Likewise.
464 * src/rec-crypt.c: Likewise.
465 * src/rec-comment.c: Likewise.
466 * src/rec.c: Likewise.
467 * src/rec-aggregate.c: Likewise.
468 * src/rec-buf.c: Likewise.
469 * src/Makefile.am: Likewise.
470 * libcsv/libcsv.c: Likewise.
471 * libcsv/Makefile.am: Likewise.
472 * etc/rec-mode.el: Likewise.
473 * etc/ob-rec.el: Likewise.
474 * etc/Makefile.am: Likewise.
475 * doc/recutils.texi: Likewise.
476 * doc/rec-mode.texi: Likewise.
477 * bash/testrec.c: Likewise.
478 * bash/readrec.c: Likewise.
479 * bash/Makefile.am: Likewise.
480 * algol68/rec.a68: Likewise.
481 * algol68/Makefile.am: Likewise.
482 * README-dev: Likewise.
483 * NEWS: Likewise.
484 * Makefile.am: Likewise.
485 * configure.ac: Likewise.
486 * ChangeLog: Likewise.
487
488 2015-04-27 Jose E. Marchesi <jose.marchesi@oracle.com>
489
490 * src/rec-mset.c (rec_mset_dup): Check for the right variable
491 in order to duplicate names.
492
493 2015-04-27 Jose E. Marchesi <jemarch@gnu.org>
494
495 * src/rec-parser.c: Some minor stylish changes.
496
497 2015-04-09 Jose E. Marchesi <jemarch@gnu.org>
498
499 rec-mode: support search-insensitive searches.
500 * doc/rec-mode.texi (Searches): Document prefix arguments in both
501 rec-cmd-selext-fast and rec-cmd-select-sex.
502
503 * etc/rec-mode.el (rec-cmd-select-fast): Support case-insensitive
504 searches.
505 (rec-cmd-select-sex): Likewise.
506
507 2014-10-10 Michał Masłowski <mtjm@mtjm.eu>
508
509 Fix detection of check on systems where it needs extra CFLAGS or
510 libraries.
511 * configure.ac: Use PKG_CHECK_MODULES to detect check.
512 * torture/Makefile.am (runtests_CFLAGS, runtests_LDADD): Pass
513 CFLAGS and LIBS that pkg-config specifies for check.
514
515 2014-04-20 Jose E. Marchesi <jemarch@gnu.org>
516
517 src,torture: fix evaluation of sexes containing #NAME expressions.
518 * torture/utils/recsel.sh (recurrent-fields-2): New input file.
519 (recsel-sex-sharp-multiple-2): New test.
520
521 * src/rec-sex.c (rec_sex_eval): Do not permute fields appearing as
522 arguments to the # operator in the selection expression.
523
524 * src/rec-sex-ast.c (rec_sex_ast_hash_name_p_1): New function.
525 (rec_sex_ast_name_p): Likewise.
526
527 2014-03-27 Jose E. Marchesi <jemarch@gnu.org>
528
529 * utils/csv2rec.c (field_cb): Fix printf template slots to avoid
530 warnings when compiled with -Wformat.
531 Patch by Daiki Ueno.
532
533 2014-03-26 Jose E. Marchesi <jemarch@gnu.org>
534
535 * .gitignore: Ignore some more files.
536
537 2014-03-26 Jose E. Marchesi <jemarch@gnu.org>
538
539 torture: fix make -j check.
540 * torture/utils/recins.sh: Fix names of input files so they
541 contain a reference to he test suite.
542
543 * torture/utils/testutils.sh (test_declare_input_file): prepend
544 the test suite name to the input files in order to prevent
545 collisions with other tests.
546 (test_tool): Likewise.
547
548 2014-03-24 Jose E. Marchesi <jemarch@gnu.org>
549
550 Preparation for 1.7.
551 * configure.ac: Version bumped to 1.7.
552 * FSD (Version): Updated to 1.7.
553
554 2014-03-22 Jose E. Marchesi <jose.marchesi@oracle.com>
555
556 * configure.ac: fix non-portable test construct.
557
558 2014-03-21 Jose E. Marchesi <jose.marchesi@oracle.com>
559
560 rec-mode: fix a call to string-match-p with invalid arguments.
561 * etc/rec-mode.el (rec-check-type): fix a call to string-match-p.
562
563 2014-03-21 Jose E. Marchesi <jose.marchesi@oracle.com>
564
565 rec-mode: several fixes while removing byte-compilation warnings.
566 * etc/rec-mode.el (require): Require cl only at compile time.
567 (rec-record-assoc): Use mapc instead of mapcar.
568 (rec-field-type): Likewise.
569 (rec-record-names): Likewise.
570 (rec-cmd-edit-field): Likewise.
571 (rec-update-buffer-descriptors): Likewise.
572 (rec-goto-type): Likewise.
573 (rec-cmd-statistic): Likewise.
574 (rec-mode): Defvar all buffer-local variables.
575 (rec-cmd-edit-field): Likewise.
576 (rec-cmd-show-info): Make it work when the buffer is not
577 associated with a file on disk.
578 (rec-cmd-compile): Use insert-buffer-substring instead of
579 insert-buffer.
580 (rec-cmd-show-info): Likewise.
581 (rec-update-buffer-descriptors-and-check): Use with-current-buffer
582 instead of save-excursion+set-buffer.
583 (rec-idle-scheduler-mode): Use called-interactively-p instead of
584 interactive-p.
585 (rec-parse-type): Use string-to-number instead of string-to-int.
586 (rec-check-type): Likewise.
587 Rec-idle related functions removed.
588
589 2014-03-20 Jose E. Marchesi <jemarch@gnu.org>
590
591 * utils/recutl.c (recutl_print_version): Update copyright year.
592
593 2014-03-19 Jose E. Marchesi <jemarch@gnu.org>
594
595 * NEWS: Added entry for 1.6.90 listing changes since 1.6.
596 * configure.ac: Version bumped to 1.6.90.
597
598 2014-03-19 Jose E. Marchesi <jemarch@gnu.org>
599
600 manual: clarify how auto fields are generated.
601 * doc/recutils.texi (Counters): mention 'recins' instead of the
602 'conforming application'.
603 (Auto-Generated Fields): Clarify that auto fields are physically
604 inserted in the recfile by recins.
605
606 2014-03-19 Jose E. Marchesi <jemarch@gnu.org>
607
608 src: simplify the implementation of mandatory/unique/prohibit
609 integrity checking.
610 * src/rec-int.c (rec_int_check_record_mandatory): Rewrote to use
611 rec_int_collect_field_list.
612 (rec_int_check_record_unique): Likewise.
613 (rec_int_check_record_prohibit): Likewise.
614
615 2014-03-18 Jose E. Marchesi <jemarch@gnu.org>
616
617 src,torture,doc: support for the %allowed special field.
618 * doc/recutils.texi (Record Sets Properties): Link to the new
619 section Allowed Fields.
620 (Allowed Fields): New section.
621
622 * torture/utils/recfix.sh (allowed-ok-1): New input file.
623 (allowed-ok-2): Likewise.
624 (allowed-ok-3): Likewise.
625 (allowed-ok-4): Likewise.
626 (allowed-ok-5): Likewise.
627 (allowed-xfail-1): Likewise.
628 (allowed-xfail-2): Likewise.
629 (allowed-xfail-3): Likewise.
630 (recfix-allowed-ok-1): New test.
631 (recfix-allowed-ok-2): Likewise.
632 (recfix-allowed-ok-3): Likewise.
633 (recfix-allowed-ok-4): Likewise.
634 (recfix-allowed-ok-5): Likewise.
635 (recfix-allowed-xfail-1): Likewise.
636 (recfix-allowed-xfail-2): Likewise.
637 (recfix-allowed-xfail-3): Likewise.
638
639 * src/rec-int.c (rec_int_check_record_allowed): New function.
640 (rec_int_collect_field_list): Likewise.
641 (rec_int_check_descriptor): Support %allowed.
642 (rec_int_check_record): Call rec_int_check_record_allowed.
643
644 * src/rec-field-name.c (fnames): added entry for %allowed.
645
646 2014-03-18 Jose E. Marchesi <jemarch@gnu.org>
647
648 src,doc: allow merging anonymous records coming from several files
649 in a single record set.
650 * doc/recutils.texi (Simple Selections): Document that anonymous
651 records from several files will be merged.
652
653 * src/rec.h: Prototype and doc for rec_mset_elem_dup_data.
654 * src/rec-mset.c (rec_mset_elem_dup_data): New function.
655 (rec_mset_iterator_next): Update data only if it is not NULL.
656
657 * utils/recutl.c (recutl_parse_db_from_file): do not complain
658 about duplicated default record sets.
659 (recutl_parse_db_from_file): append anonymous records to the
660 anonymous rset of the database if it exists.
661
662 2014-03-17 Jose E. Marchesi <jemarch@gnu.org>
663
664 * doc/recutils.texi (Simple Selections): Improve the readability
665 of side-to-side example sections.
666
667 2014-03-06 Jose E. Marchesi <jose.marchesi@oracle.com>
668
669 rec-mode: fix selection commands when there are more than one
670 record sets on the recfile.
671 * etc/rec-mode.el (rec-cmd-select-fast): Use the current record
672 set.
673 (rec-cmd-select-sex): Likewise.
674
675 2014-03-02 Jose E. Marchesi <jemarch@gnu.org>
676
677 src: do not abort with an error when decrypting partially
678 encrypted records.
679 * src/rec-crypt.c (rec_decrypt_record): Stop decrypting fields in
680 case of an error.
681 (rec_encrypt_field): Return true in case a field is not encrypted.
682
683 2014-02-25 Jose E. Marchesi <jemarch@gnu.org>
684
685 * doc/recutils.texi: all @w and @kbd macros used to denote command
686 line options removed.
687
688 2014-02-24 Jose E. Marchesi <jemarch@gnu.org>
689
690 src: an ignored tab can also separate field names from field
691 values.
692 * src/rec-parser.c (rec_parse_field_name): tabs also finish field
693 names.
694
695 * torture/utils/recsel.sh (ignored-first-blanks): New input file.
696 (recsel-ignored-first-blanks): New test.
697
698 2014-02-24 Jose E. Marchesi <jemarch@gnu.org>
699
700 * doc/recutils.texi: Many English changes in the manual. Patch by
701 Karl Berry.
702 (Selecting by Type): use LastRelease instead of URL in the
703 gnu.rec example.
704
705 2014-02-24 Jose E. Marchesi <jemarch@gnu.org>
706
707 * src/Makefile.am (librec_la_LDFLAGS): Bump current version to 1.
708
709 2014-02-19 Jose E. Marchesi <jemarch@gnu.org>
710
711 bash: fix librec linking issue.
712 * bash/Makefile.am (readrec_la_LIBADD): Link with the built librec.
713 (testrec_la_LIBADD): Likewise.
714
715 2014-02-19 Jose E. Marchesi <jemarch@gnu.org>
716
717 src,utils,manual,torture: new writer option to omit comments when
718 outputting rsets and comments. recsel now uses this option to
719 avoid emitting record fields.
720
721 * torture/rec-writer/rec-write-record.c
722 (rec_write_record_skip_comments): New test.
723
724 * src/rec-writer.c (rec_write_record): Do not write out comments
725 in records if the writer was configured to skip them.
726 (rec_write_rset): Likewise.
727
728 * utils/recsel.c (recsel_process_data): Configure the writer to
729 skip comments.
730
731 * torture/utils/recsel.sh (record-with-comments): New input file.
732 (recsel-record-with-comments): New test.
733
734 * torture/rec-writer/rec-write-comment.c (rec_write_comment_sexp):
735 Adapted to new writer api.
736 (rec_write_comment_nominal): Likewise.
737 * torture/rec-writer/rec-write-record.c
738 (rec_write_record_nominal): Likewise.
739 (rec_write_record_sexp): Likewise.
740 (rec_write_record_values): Likewise.
741 (rec_write_record_values_row): Likewise.
742 * torture/rec-writer/rec-write-field-name.c
743 (rec_write_field_name_nominal): Likewise.
744 (rec_write_field_name_sexp): Likewise.
745 * torture/rec-writer/rec-write-field.c (rec_write_field_nominal):
746 Likewise.
747 (rec_write_field_values): Likewise.
748 (rec_write_field_values_row): Likewise.
749 (rec_write_field_sexp): Likewise.
750 * torture/rec-writer/rec-write-rset.c (rec_write_rset_nominal):
751 Likewise.
752
753 * utils/recinf.c (print_info_file): Use the new interface for
754 setting a writer's mode.
755 * bash/readrec.c (readrec_builtin): Likewise.
756 * utils/recsel.c (recsel_process_data): Likewise.
757
758 * src/rec-writer.c (rec_writer_set_skip_comments): New function.
759 (rec_writer_set_mode): Likewise.
760 (rec_writer_new_common): Set default values for the
761 skip_comments_p and mode writer options.
762 (rec_write_comment): Use the writer mode attribute instead of an
763 extra argument to determine how to output the entity.
764 (rec_write_field): Likewise.
765 (rec_write_field_name): Likewise.
766 (rec_write_record): Likewise.
767 (rec_write_rset): Likewise.
768 (rec_write_field_str): Likewise.
769 (rec_write_field_name_str): Likewise.
770 (rec_write_comment_str): Likewise.
771
772 * src/rec.h: Copyright year updated.
773 Prototypes for rec_writer_set_skip_comments and
774 rec_writer_set_mode added.
775
776 * src/rec-writer.c (struct rec_writer_s): New fields
777 skip_comments_p and mode.
778
779 2014-02-18 Jose E. Marchesi <jemarch@gnu.org>
780
781 manual: clarify decryption using several passwords.
782 * doc/recutils.texi (Confidential Fields): Added a note clarifying
783 that it is not possible to specify several passwords in a single
784 invocation of recsel.
785
786 2014-02-17 Jose E. Marchesi <jemarch@gnu.org>
787
788 manual: follow the standard way in naming the utility invokation
789 nodes.
790 * doc/recutils.texi (Invoking recinf): Renamed from node recinf.
791 (Invoking recsel): Likewise.
792 (Invoking recins): Likewise.
793 (Invoking recdel): Likewise.
794 (Invoking recset): Likewise.
795 (Invoking recfix): Likewise.
796 (Invoking recfmt): Likewise.
797 (Invoking csv2rec): Likewise.
798 (Invoking rec2csv): Likewise.
799 (Invoking mdb2rec): Likewise.
800 "Fast" access links in the "Individual utilities" dircategory
801 fixed to point to the nodes renamed above.
802 (Documenting Records): Xref fixed.
803 (Sorted Output): Likewise.
804 (Deleting Records): Likewise.
805 (Editing Fields): Likewise.
806 (CSV Files): Likewise.
807
808 2014-02-17 Jose E. Marchesi <jemarch@gnu.org>
809
810 * doc/recutils.texi (Scalar Field Types): Improve misleading
811 example.
812 * doc/recutils.texi (SEX Operands): Improve wording.
813
814 2014-02-17 Jose E. Marchesi <jemarch@gnu.org>
815
816 * src/rec-types.c (rec_type_parse_enum): Code typo fixed.
817 Reported by David Binderman.
818
819 2014-02-05 Jose E. Marchesi <jemarch@gnu.org>
820
821 utils: avoid segfaults in several utilities when reading invalid
822 rec data.
823 * utils/rec2csv.c (main): Avoid a segmentation fault when a file
824 containing invalid data is fetched to rec2csv.
825 * utils/recfmt.c (main): Likewise for recfmt.
826
827 2014-01-02 Jose E. Marchesi <jemarch@gnu.org>
828
829 doc: document the -d|--delim command line argument for rec2csv.
830 * doc/recutils.texi (rec2csv): Document -d|--delim.
831
832 2014-01-02 Jose E. Marchesi <jemarch@gnu.org>
833
834 utils: add support for arbitrary delimiter characters in rec2csv.
835 Patch provided by Sebastian Fischmeister.
836 * utils/rec2csv.c: New global variable rec2csv_delim.
837 (recutl_print_help): Documentation of -d.
838 (rec2csv_parse_args): Process the new -d|--delim command line
839 argument.
840 (rec2csv_generate_csv): Likewise.
841
842 2014-01-02 Jose E. Marchesi <jemarch@gnu.org>
843
844 Do not maintain local copies of .po files which are available in
845 the translation project.
846 * po/fr.po: file removed.
847 * po/sr.po: Likewise.
848 * po/uk.po: Likewise.
849 * po/vi.po: Likewise.
850
851 2012-12-04 Julio C. M. Ramirez <rikijpn@member.fsf.org>
852
853 * etc/rec-mode.el: adding numeric prefix to next/previous
854 records commands for recmode on emacs.
855 * doc/rec-mode.texi: adding mention for feature above.
856
857 2013-11-04 Jose E. Marchesi <jemarch@gnu.org>
858
859 * .gitignore: Updated with the files generated when building the
860 rec-mode manual.
861
862 2013-11-03 Jose E. Marchesi <jemarch@gnu.org>
863
864 Preparation for 1.6.
865 * configure.ac: Version number bumped to 1.6.
866 * NEWS: Updated for 1.6.
867
868 2013-11-01 Jose E. Marchesi <jemarch@gnu.org>
869
870 src,doc,torture: support single-char fields in selection
871 expressions.
872 * torture/utils/recsel.sh (single-char-field-names): New input
873 file.
874 (recsel-sex-single-char-field-names): New test.
875
876 * doc/recutils.texi (Fields): Update regexp denoting field names
877 to allow fields composed by just one character.
878
879 * src/rec-sex-lex.l: Allow fields composed by just one character
880 in selection expressions.
881
882 2013-10-29 Jose E. Marchesi <jose.marchesi@oracle.com>
883
884 * NEWS: Updated for 1.5.90.
885
886 * bash/readrec.c: Do not check for HAVE_UNISTD_H. It is always
887 true with the corresponding gnulib module.
888 * bash/testrec.c: Likewise.
889
890 * configure.ac: Version number bumped to 1.5.90.
891
892 2013-10-29 Jose E. Marchesi <jose.marchesi@oracle.com>
893
894 * doc/recutils.texi (Auto-Generated Fields): Finished.
895 (Counters): Written.
896 (Unique Identifiers): Likewise.
897 (Time-Stamps): Likewise.
898
899 2013-10-17 Jose E. Marchesi <jose.marchesi@oracle.com>
900
901 manual: document grouping and aggregate functions.
902 * doc/recutils.texi (Grouping Records): New section.
903 (Aggregate Functions): Likewise.
904
905 2013-09-24 Jose E. Marchesi <jose.marchesi@oracle.com>
906
907 recfmt: do not append a newline to the expansion of templates.
908 Reported by Aikido Guy.
909 * torture/utils/recfmt.sh: Adjust tests to not expect a newline
910 inserted between applications of a template.
911
912 * utils/recfmt.c (recfmt_process_db): Do not append a newline to
913 the expansion of a template.
914
915 2013-08-29 Jose E. Marchesi <jemarch@gnu.org>
916
917 * etc/rec-mode.el (rec-fast-selection): Avoid an extra useless
918 window when using rec-fast-selection.
919
920 2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
921
922 utils: avoid the replication of out-of-memory string literals.
923 * utils/csv2rec.c (field_cb): Use recutl_out_of_memory.
924 (record_cb): Likewise.
925 (record_cb): Likewise.
926 * utils/recsel.c (recsel_process_data): Likewise.
927 * utils/recins.c (recins_add_new_record): Likewise.
928 (recins_add_new_record): Likewise.
929 * utils/recfix.c (recfix_do_sort): Likewise.
930 (recfix_do_auto): Likewise.
931 * utils/recdel.c (recdel_delete_records): Likewise.
932 * utils/rec2csv.c (rec2csv_generate_csv): Likewise.
933 (rec2csv_generate_csv): Likewise.
934 (rec2csv_process_data): Likewise.
935 * utils/mdb2rec.c (process_table): Likewise.
936 (process_mdb): Likewise.
937
938 * utils/recutl.c (recutl_out_of_memory): New function.
939
940 2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
941
942 manual: documentation for the readrec bash built-in.
943 * doc/recutils.texi (Bash Builtins): Written.
944 (readrec): Written.
945
946 2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
947
948 src: remove hard limit on the number of types registered in a
949 types registry.
950 * src/rec-types.c (REC_TYPE_REG_ALLOC_TYPES): New constant.
951 (rec_type_reg_destroy): Free the dynamically allocated list of
952 types.
953 (rec_type_reg_new): Initialize new->types to NULL.
954 (rec_type_reg_add): Adjusted to new semantics.
955 (rec_type_reg_add_synonym): Likewise.
956
957 2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
958
959 src: remove hard limit on the number of literals in enum types.
960 * src/rec-types.c (REC_ENUM_NAMES): Removed.
961 (REC_ENUM_ALLOC_NAMES): Created.
962 (rec_type_new): Initialize the size of the type to 0.
963 (rec_type_parse_enum): Allocate memory for the enumeration names
964 in chunks.
965 (rec_type_equal_p): Adjusted to new semantics.
966 (rec_type_check_enum): Likewise.
967
968 2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
969
970 csv2rec: remove hard limit on the number of fields in the input
971 csv file.
972 * utils/csv2rec.c (MAX_FIELDS): Removed.
973 (process_csv): Initialize ctx.field_names to NULL.
974 (field_cb): Re-allocate memory for fields when needed, in blocks
975 with size ALLOC_FIELDS.
976
977 2013-08-25 Jose E. Marchesi <jemarch@gnu.org>
978
979 * bash/readrec.c (readrec_builtin): Define variables after fields
980 in the read records.
981
982 2013-08-24 Jose E. Marchesi <jemarch@gnu.org>
983
984 * bash/Makefile.am (testrec_la_LDFLAGS): Define.
985 (testrec_la_LIBADD): Likewise.
986 (testrec_la_SOURCES): Likewise.
987
988 * bash/testrec.c: New file.
989 (testrec_builtin): New function.
990
991 2013-08-24 Jose E. Marchesi <jemarch@gnu.org>
992
993 manual: empty stub sections for the bash bulitins.
994 * doc/recutils.texi (Bash Builtins): New stub chapter.
995 (readrec): Likewise.
996 (testrec): Likewise.
997
998 2013-08-24 Jose E. Marchesi <jemarch@gnu.org>
999
1000 bash: readrec builtin.
1001 * Makefile.am (SUBDIRS): Recurse to the bash/ subdirectory.
1002
1003 * configure.ac: Handle --enable-bash-builtins and detection of
1004 bash headers.
1005 Handle --with-bash-headers.
1006
1007 * bash/Makefile.am: New file.
1008
1009 * bash/readrec.c: New file.
1010 (readrec_builtin): New function.
1011
1012 2013-08-21 Jose E. Marchesi <jemarch@gnu.org>
1013
1014 * doc/recutils.texi (Replacing Records With recins): New section.
1015
1016 2013-08-16 Jose E. Marchesi <jemarch@gnu.org>
1017
1018 src: optimize the sex evaluator.
1019 * src/rec-sex.c (rec_sex_eval): Optimize the evaluator, avoiding
1020 discarding the same field twice.
1021
1022 2013-08-16 Jose E. Marchesi <jemarch@gnu.org>
1023
1024 src: support for field marks in records.
1025 * src/rec-record.c (rec_record_reset_marks): New function.
1026 (rec_record_mark_field): Likewise.
1027 (rec_record_field_mark): Likewise.
1028
1029 * src/rec-field.c (struct rec_field_s): New attribute 'mark' for
1030 fields.
1031 (rec_field_dup): Field mark.
1032 (rec_field_set_mark): New function.
1033 (rec_field_mark): Likewise.
1034
1035 * src/rec.h: Prototypes for the new field marks related functions.
1036
1037 2013-08-15 Giuseppe Scrivano <gscrivan@redhat.com>
1038
1039 * src/rec-aggregate.c (rec_aggregate_std_count): Fix formatting string.
1040 (rec_aggregate_std_avg): Likewise.
1041 (REC_AGGREGATE_ACCUM_FUNC): Likewise.
1042 * src/rec-fex.c (rec_fex_parse_str_simple): Wrap assignment in if
1043 statement in parentheses.
1044 * src/rec-sex-lex.l (top): Specify options header-file, noinput and
1045 nounput.
1046 (rec_sex_lex_extract_subname): Remove unused variable `res'.
1047 * src/rec-sex-tab.y: Include "rec-sex-lex.h".
1048 * src/rec-sex-ast.c (rec_sex_ast_print_node): Use name[0] to access the
1049 name.
1050 * src/rec-sex-parser.c: Include "rec-sex-lex.h" and "rec-sex-tab.h".
1051 * src/rec-sex-lex.l: Generate the header file "rec-sex-lex.h".
1052 * src/rec-int.c (rec_int_check_field_type): Removed unused variable
1053 `field_name'.
1054 * src/rec-db.c (rec_db_query): Removed unused variable `selected'.
1055 (rec_db_query): Removed unused variable `n_rset'.
1056 Remove declaration for the static function `rec_db_set_act_setadd'.
1057 * src/rec-rset.c (rec_rset_record_compare_fn): Removed unused variables
1058 `field1' and `field2'.
1059 (rec_rset_update_field_props): Removed unused variable `type_name'.
1060 * src/rec-mset.c (rec_mset_elem_init): Remove unused function.
1061
1062 2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
1063
1064 src: optimize the evaluation of sex expressions, avoiding
1065 permutations on fields not appearing in the expression.
1066 * src/rec-sex-ast.c (rec_sex_ast_name_p_1): New function.
1067 (rec_sex_ast_name_p): Likewise.
1068
1069 * src/rec-sex.c (rec_sex_eval): Do not permute on fields not
1070 featured on the selection expression.
1071
1072 2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
1073
1074 src,torture,doc: support the usage of MIN and MAX keywords in
1075 range types.
1076 * doc/recutils.texi (Scalar Field Types): Document the MIN and MAX
1077 keywords in range specifications.
1078
1079 * torture/utils/recfix.sh (range_min_ok): New test.
1080 (range_min_invalid): Likewise.
1081 (range_max_ok): Likewise.
1082 (range_max_invalid): Likewise.
1083 (range_minmax_ok): Likewise.
1084 (range_minmax_invalid): Likewise.
1085
1086 * src/rec-types.c (rec_type_parse_range): Support MIN and MAX
1087 keywords in range definitions.
1088 (rec_type_parse_range_point): New function.
1089 Include limits.h.
1090
1091 * src/rec-utils.c (rec_parse_int): update 'ret' only if hte
1092 parsing was successful.
1093 (rec_parse_regexp): Likewise.
1094
1095 * src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Allow MIN and MAX
1096 literals as well as numeric literals.
1097 (REC_TYPE_RANGE_MINMAX_RE): New constant.
1098 (REC_TYPE_DESCR_RE): Duplicate check for REC_TYPE_RANGE_DESCR_RE
1099 removed.
1100
1101 2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
1102
1103 * doc/recutils.texi (Inserting Records): basic operation of recins
1104 documented.
1105
1106 2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
1107
1108 * utils/recins.c (recutl_print_help): typo fixed in help string:
1109 -R must be -r.
1110
1111 2013-08-08 Jose E. Marchesi <jemarch@gnu.org>
1112
1113 maint: syntax-check fixes.
1114 * etc/rec-mode.el (rec-summary-rec-buffer): Trailing blanks
1115 removed from line.
1116 * AUTHORS (John Darrington): Likewise.
1117
1118 * .gitignore: Newline added at EOF to keep syntax-check happy.
1119
1120 * etc/rec-mode.el (rec-mode): Typo in comment fixed.
1121
1122 2013-07-29 Michał Masłowski <mtjm@mtjm.eu>
1123
1124 src: fix memory leak.
1125 * src/rec-rset.c (struct rec_rset_fprops_s): Remove const from
1126 fname, since it can be dynamically allocated.
1127 (rec_rset_destroy): Free fname.
1128 (rec_rset_update_field_props): Destroy the temporary fex.
1129
1130 2013-06-23 Jose E. Marchesi <jemarch@gnu.org>
1131
1132 src,doc,torture: fix the insertion of anonymous records in dbs.
1133 * doc/recutils.texi (Inserting Anonymous Records): New section.
1134
1135 * torture/utils/recins.sh (marks): New input file.
1136
1137 * src/rec-db.c (rec_db_get_rset): The position cant be zero
1138 since size_t is unsigned so don't check for it.
1139 (rec_db_insert_rset): Likewise.
1140 (rec_db_remove_rset): Likewise.
1141 (rec_db_insert): Fix the index of the default rset.
1142
1143 2013-06-23 Jose E. Marchesi <jemarch@gnu.org>
1144
1145 src,doc,elisp: remove support for hyphens in field names.
1146 * torture/utils/recfix.sh (recfix-hyphens-in-field-names): new
1147 test.
1148
1149 * src/rec.h (REC_FNAME_RE): Don't allow hyphens in field names.
1150 * src/rec-parser.c (rec_parse_field_name): Likewise.
1151 * doc/recutils.texi (Fields): Likewise.
1152 (Declaring Types): Likewise.
1153 * etc/rec-mode.el (rec-field-name-re): Likewise.
1154 (rec-font-lock-keywords): Likewise.
1155 (rec-parse-type): Likewise.
1156 (rec-check-type): Likewise.
1157 (rec-field-type): Likewise.
1158
1159 2013-05-22 Jose E. Marchesi <jemarch@gnu.org>
1160
1161 utils: interactively ask for a password twice to avoid loosing
1162 data because of typing errors.
1163 * utils/recins.c (recins_add_new_record): Use recutl_getpass.
1164 * utils/recsel.c (recsel_process_data): Likewise.
1165 * utils/recfix.c (recfix_parse_args): Likewise.
1166
1167 * utils/recutl.c (recutl_getpass): New function.
1168
1169 2013-05-22 Jose E. Marchesi <jose.marchesi@oracle.com>
1170
1171 * etc/ob-rec.el (org-babel-execute:rec): Add support for GroupBy.
1172 (org-babel-execute:rec): Add support for joins.
1173
1174 2013-05-09 Jose E. Marchesi <jemarch@gnu.org>
1175
1176 * doc/recutils.texi (Sorted Output): Renamed from Sorting.
1177 (Sorting Records): New section.
1178 (Editing Records): Intro written.
1179
1180 2013-03-14 Jose E. Marchesi <jemarch@gnu.org>
1181
1182 doc: minor improvements in the manual.
1183 * doc/recutils.texi: Add John as an author.
1184 (Selecting by Type): Document the -d command line option to
1185 recsel.
1186
1187 2013-02-12 Jose E. Marchesi <jemarch@gnu.org>
1188
1189 manual: get recutils.texi compiling again.
1190 * doc/recutils.texi (Joining Records): Empty section created.
1191 (Foreign Keys): Likewise.
1192 (Top): Entry in menu fixed to avoid an invalid reference.
1193
1194 2013-02-11 Jose E. Marchesi <jemarch@gnu.org>
1195
1196 manual: Field Restrictions introduction written.
1197 * doc/recutils.texi (Field Restrictions): Introduction to the
1198 chapter written.
1199
1200 2013-02-10 Michał Masłowski <mtjm@mtjm.eu>
1201
1202 * configure.ac: Use AC_CONFIG_HEADERS, LT_INIT and AC_CONFIG_FILES
1203 instead of deprecated AM_CONFIG_HEADER, AC_PROG_LIBTOOL and
1204 argument of AC_OUTPUT.
1205
1206 2013-02-10 Jose E. Marchesi <jemarch@gnu.org>
1207
1208 * doc/rec-mode.texi: Copyright updated.
1209
1210 * doc/recutils.texi (Random Records): Clarify how the internal
1211 algorihtm works.
1212 Copyright updated.
1213
1214 2013-02-10 Jose E. Marchesi <jemarch@gnu.org>
1215
1216 * src/rec-db.c (rec_db_process_fex): Avoid a segmentation fault
1217 when the function is called with a NULL record.
1218
1219 2013-02-10 Jose E. Marchesi <jemarch@gnu.org>
1220
1221 manual: record sets and simple selection techniques documented.
1222 * doc/recutils.texi (Record Sets): New subsection.
1223 (Naming Record Types): Likewise.
1224 (The Special Fields): Likewise.
1225 (Selecting by Position): Written.
1226 (Random Records): Likewise.
1227
1228 2013-02-04 Jose E. Marchesi <jemarch@gnu.org>
1229
1230 * etc/rec-mode.el (rec-summary-populate): Use the first header as
1231 the sorting criteria.
1232 (rec-cmd-show-summary): Store the record position as the ID of the
1233 tabular row.
1234 (rec-summary-rec-buffer): New variable.
1235 (rec-cmd-show-summary): Set the buffer local variable
1236 rec-summary-rec-buffer the proper value.
1237
1238 2013-02-03 Jose E. Marchesi <jemarch@gnu.org>
1239
1240 * etc/rec-mode.el (rec-keyword-summary): New constant.
1241 (rec-summary-fields): New function.
1242 (rec-join-string): Likewise.
1243
1244 * src/rec-db.c (rec_db_process_fex): Don't loose the location
1245 information in records processed by fexes.
1246
1247 2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
1248
1249 * etc/rec-mode.el (rec-summary-mode): New function.
1250 (rec-summary-mode-map): New variable.
1251 (rec-mode-map): Map 'h' to rec-cmd-show-summary.
1252 (rec-mode-edit-map): Map 'C-ch' to rec-cmd-show-summary.
1253 (rec-cmd-show-summary): New function.
1254 (rec-summary-populate): Likewise.
1255 (rec-query): Use --print-sexps even if a fex was specified.
1256
1257 2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
1258
1259
1260 writer: quote special characters when printing lisp strings.
1261 * torture/utils/recsel.sh (unquoted-lisp-strings): New input file.
1262 (recsel-unquoted-lisp-strings): New test.
1263
1264 * src/rec-writer.c (rec_write_field): Escape double quotes and
1265 backslashes when writing the field values in lisp strings.
1266
1267 2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
1268
1269 * doc/recutils.texi (Checking Recfiles for Errors): format typo
1270 fixed.
1271
1272 2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
1273
1274 src: allow duplicated fields in grouped record sets.
1275 * src/rec-rset.c (rec_rset_merge_records): Don't remove duplicated
1276 fields when grouping record sets.
1277
1278 2013-01-30 Jose E. Marchesi <jemarch@gnu.org>
1279
1280 * README-dev: Mention bootstrap instead of autogen.sh.
1281
1282 * src/Makefile.am (librec_la_LIBADD): Rename libgnu.la to
1283 librecutils.la.
1284 * utils/Makefile.am (COMMONLIBS): Likewise.
1285
1286 * configure.ac: Invoke gl_EARLY after AC_PROG_CC.
1287
1288 2013-01-30 Jose E. Marchesi <jemarch@gnu.org>
1289
1290 static gnulib removed.
1291 * bootstrap: Imported.
1292 * bootstrap.conf: New file.
1293 Many files deleted.
1294
1295 2013-01-20 Jose E. Marchesi <jemarch@gnu.org>
1296
1297 manual: new sections on configuring rec-mode.
1298 * doc/rec-mode.texi (Records appearance): Section completed.
1299 (Finding the recutils): New section.
1300 (Top): Detailed menu updated.
1301
1302 2013-01-07 Jose E. Marchesi <jemarch@gnu.org>
1303
1304 rec-mode: be smart assigning letters to enumerated entries.
1305 * etc/rec-mode.el (rec-cmd-edit-field): Assign letters to
1306 enumerated entries in a "smart" way.
1307
1308 2013-01-07 Jose E. Marchesi <jemarch@gnu.org>
1309
1310 * etc/rec-mode.el: Copyright years updated.
1311
1312 2013-01-04 Jose E. Marchesi <jemarch@gnu.org>
1313
1314 * etc/rec-mode.el (rec-mode-version): New constant.
1315
1316 2012-12-26 Jose E. Marchesi <jemarch@gnu.org>
1317
1318 src,torture: simplify the creation of the descriptor of joined
1319 record sets.
1320 * torture/utils/recsel.sh (recsel-join-descriptor): New test.
1321
1322 * src/rec-db.c (rec_db_join): The descriptor of joined records
1323 only features a %rec: entry.
1324
1325 2012-12-26 Jose E. Marchesi <jemarch@gnu.org>
1326
1327 src: fix the parser in order to accept lines with blanks just
1328 after records.
1329 * torture/utils/recfix.sh (blank-line-after-record): New input
1330 file.
1331 (blank-line-after-record-invalid): Likewise.
1332 (recfix-blank-line-after-record): New test.
1333 (recfix-blank-line-after-record-invalid): Likewise.
1334
1335 * src/rec-parser.c (rec_parse_record): Ignore lines composed by
1336 only blank characters when they appear immediately after a record.
1337
1338 2012-12-26 Jose E. Marchesi <jemarch@gnu.org>
1339
1340 * etc/rec-mode.el (rec-finish-editing-field): dont hide
1341 continuation line markers if the command was invoked from an
1342 editing mode.
1343
1344 2012-12-12 Jose E. Marchesi <jemarch@gnu.org>
1345
1346 * etc/rec-mode.el (rec-finish-editing-field): Do the right thing
1347 when the selected window is the only window in the frame.
1348
1349 2012-12-06 Jose E. Marchesi <jemarch@gnu.org>
1350
1351 src,torture: support several foreign keys with the same name in a
1352 record.
1353 * torture/utils/recsel.sh (several-foreign-keys): New input file.
1354 (recsel-several-foreign-keys): New test.
1355
1356 * src/rec-db.c (rec_db_join): A record may contain more than one
1357 foreign field.
1358
1359 2012-11-21 Jose E. Marchesi <jemarch@gnu.org>
1360
1361 manual: little fix in the introduction.
1362 * doc/recutils.texi (Introduction): Don't enumerate the different
1363 utilities.
1364
1365 2012-11-21 Jose E. Marchesi <jemarch@gnu.org>
1366
1367 utils: make recsel to honour --print-row and --print-values.
1368 * torture/utils/recsel.sh (recsel-row-long): New test.
1369 (recsel-values-long): New test.
1370
1371 * utils/recsel.c (recsel_parse_args): Honour --print-row and
1372 --print-values.
1373
1374 2012-11-21 Julio C. M. Ramirez <rikijpn@member.fsf.org>
1375
1376 * doc/recutils.texi : Grammar corrections and rephrasing some
1377 parts for easier reading.
1378
1379 2012-11-21 John Darrington <john@darrington.wattle.id.au>
1380
1381 * doc/recutils.texi: Updated so that Texinfo 4.13.90 does not
1382 show errors.
1383
1384 2012-11-15 Jose E. Marchesi <jemarch@gnu.org>
1385
1386 rec-mode: visiting an empty file works again.
1387 * etc/rec-mode.el (rec-buffer-valid-p): New function.
1388 (rec-update-buffer-descriptors-and-check): Use rec-buffer-valid-p
1389 to determine if the buffer contains valid rec data, instead of
1390 rec-update-buffer-descriptors.
1391
1392 2012-11-12 Jose E. Marchesi <jemarch@gnu.org>
1393
1394 rec-mode: support for a mode hook.
1395 * etc/rec-mode.el (rec-mode-hook): New custom.
1396 (rec-mode): Run the hooks installed in rec-mode-hook.
1397
1398 2012-11-11 Jose E. Marchesi <jemarch@gnu.org>
1399
1400 doc: some work on the rec-mode manual.
1401 * doc/rec-mode.texi (Opening recfiles): New section.
1402 (Editing records and fields): Likewise.
1403 (Edition modes): Likewise.
1404 (Edition mode): Likewise.
1405 (Data integrity): Likewise.
1406 (Statistics): Likewise.
1407 (Editing fields): Likewise.
1408 (Searches): Likewise.
1409 (Motion): Likewise.
1410 (Navigation mode): Likewise.
1411 (Field navigation and folding): Likewise.
1412 (reccmd): New macro.
1413 (ie): Likewise.
1414 (Records appearance): New section.
1415
1416 2012-11-11 Jose E. Marchesi <jemarch@gnu.org>
1417
1418 utils: a NULL file name means stdout, which is always writable.
1419 * utils/recutl.c (recutl_file_is_writable): Return true if the
1420 file name is NULL.
1421
1422 2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
1423
1424 utils: honor file permissions when doing in-place operations.
1425 * utils/recset.c (main): Likewise.
1426
1427 * utils/recins.c (main): Likewise.
1428
1429 * utils/recfix.c (recfix_do_sort): Likewise.
1430
1431 * utils/recdel.c (main): Check for the writeability of the file
1432 before writing to it.
1433
1434 * utils/recutl.c (recutl_check_file_is_writable): new function.
1435
1436 2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
1437
1438 * gnulib module euidaccess imported.
1439
1440 2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
1441
1442 rec-mode: check for the validity of the contents of the buffers
1443 before going to navigation mode.
1444 * etc/rec-mode.el (rec-mode): Do not activate the rec-mode if the
1445 contents of the buffer are not valid rec data. Show an error
1446 message in the modeline instead.
1447 (rec-update-buffer-descriptors-and-check): New function.
1448 (rec-finish-editing): Warn and don't abandon edit mode if there
1449 are errors in the rec data in the buffer.
1450
1451 * utils/recinf.c (main): Recognize parse errors when stdin is used
1452 to read the rec data.
1453
1454 * torture/utils/recinf.sh (invalid): New input file.
1455 (recinf-invalid): New test.
1456
1457 * src/rec-parser.c (rec_parse_db): Keep track of the result of
1458 rec_parse_rset so an invalid database is properly reported.
1459
1460 * utils/recinf.c (print_info_file): Return false if there is a
1461 parse error in the input.
1462
1463 * etc/rec-mode.el (rec-update-buffer-descriptors): Return nil if
1464 the :
1465
1466 2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
1467
1468 rec-mode: avoid trying to delete the sole window in the current
1469 frame.
1470 (rec-finish-editing-field): avoid trying to delete the edit window
1471 if it is the only window in the frame. Switch to show the rec
1472 buffer instead.
1473
1474 2012-11-10 Jose E. Marchesi <jemarch@gnu.org>
1475
1476 rec-mode: rec-end-of-field-pos now works properly when a field
1477 ends with the end of file mark.
1478 * etc/rec-mode.el (rec-end-of-field-pos): Do not add one to the
1479 end-of-field position.
1480 (rec-delete-field): Delete the trailing \n after the field, if
1481 any.
1482
1483 2012-11-07 Jose E. Marchesi <jemarch@gnu.org>
1484
1485 src: emit a useful message when an invalid enum literal is found
1486 in a field.
1487 * src/rec-types.c (rec_type_check_enum): Add a meaningful error
1488 message when the string to check is empty or otherwise an invvalid
1489 enum literal.
1490
1491 2012-11-07 Jose E. Marchesi <jemarch@gnu.org>
1492
1493 man: do not require help2man unless the sources are changed.
1494 * .gitignore: generated manpages removed.
1495 * man/csv2rec.1: Added to the repo.
1496 * man/recset.1: Likewise.
1497 * man/recsel.1: Likewise.
1498 * man/recins.1: Likewise.
1499 * man/recinf.1: Likewise.
1500 * man/recfmt.1: Likewise.
1501 * man/recfix.1: Likewise.
1502 * man/recdel.1: Likewise.
1503 * man/rec2csv.1: Likewise.
1504 * man/mdb2rec.1: Likewise.
1505
1506 2012-10-08 Jose E. Marchesi <jemarch@gnu.org>
1507
1508 csv2rec: diagnostic messages improved.
1509 * utils/csv2rec.c (struct csv2rec_ctx): New field lineno.
1510 (process_csv): Initialize lineno.
1511 (field_cb): Improve the error message.
1512
1513 2012-10-07 John Darrington <john@darrington.wattle.id.au>
1514
1515 utils/recutl.c: (recutl_write_db_to_file) Fixed memory leak
1516
1517 2012-09-07 Jose E. Marchesi <jemarch@gnu.org>
1518
1519 rec-mode: fixed to allow comments in records.
1520 * etc/rec-mode.el (rec-hide-continuation-line-markers): Fixed to
1521 ignore comments in records.
1522 (rec-hide-record-fields): Likewise.
1523 (rec-record-elems): Renamed from rec-record-fields.
1524 (rec-insert-record): Use rec-record-elems.
1525 (rec-record-assoc): Likewise.
1526 (rec-record-names): Likewise.
1527 (rec-hide-continuation-line-markers): Likewise.
1528 (rec-hide-record-fields): Likewise.
1529 (rec-unfold-record-fields): Likewise.
1530 (rec-log-current-defun): Likewise.
1531
1532 2012-09-07 Jose E. Marchesi <jemarch@gnu.org>
1533
1534 rec-mode: don't move the pointer after switching to edit buffer or
1535 edit type mode.
1536 * etc/rec-mode.el (rec-edit-buffer): Don't move the pointer to the
1537 beginning of the buffer.
1538 (rec-edit-type): Likewise.
1539
1540 2012-09-06 John Darrington <john@darrington.wattle.id.au>
1541
1542 * doc/recutils.texi : Minor markup alterations
1543 * doc/recutils.texi : Added some index entries
1544
1545 2012-09-04 Jose E. Marchesi <jco@terma.com>
1546
1547 rec-mode: improve rec-log-current-defun so it works in all cases.
1548 * etc/rec-mode.el (rec-log-current-defun): Cover the case where
1549 there is a defined key but the field is not present in the record.
1550
1551 2012-09-03 Jose E. Marchesi <jemarch@gnu.org>
1552
1553 rec-mode: provide a sensible log-current-defun for the add-log
1554 function.
1555 * etc/rec-mode.el (rec-log-current-defun): New function.
1556 (rec-mode): Set the buffer local value of
1557 add-log-current-defun-function to rec-log-current-defun.
1558
1559 2012-09-03 Jose E. Marchesi <jemarch@gnu.org>
1560
1561 * AUTHORS: Daiki, Ralf, John and Michał added.
1562
1563 2012-08-31 John Darrington <john@darrington.wattle.id.au>
1564
1565 * doc/recutils.texi : Merge Fields and Records, and Comments into
1566 one chapter
1567
1568 * doc/recutils.texi : Added the start of a tutorial chapter
1569
1570 2012-08-27 Jose E. Marchesi <jemarch@gnu.org>
1571
1572 * doc/recutils.texi (Top): Concept Index added to the menu.
1573
1574 2012-08-27 Jose E. Marchesi <jco@terma.com>
1575
1576 * .x-sc_prohibit_strncpy: New file.
1577
1578 2012-08-27 John Darrington <john@darrington.wattle.id.au>
1579
1580 * doc/recutils.texi: Replaced one remaining instance of "i.e." with the
1581 respective macro. Also added @: to the macro definition to improve
1582 spacing.
1583
1584 * doc/recutils.texi: Added @. where appropriate.
1585 * doc/recutils.texi: Added an index.
1586
1587 2012-08-26 Jose E. Marchesi <jemarch@gnu.org>
1588
1589 doc: minor fixes in the manual.
1590 * doc/recutils.texi (Conversion Utilities): @acronym removed.
1591 (Record Descriptors): Relocate the menu to the end of the section
1592 and remove the now uneeded list of special fields.
1593 (Scalar types): The type identifier for integers is 'int' and not
1594 'integer'.
1595
1596 2012-08-26 John Darrington <john@darrington.wattle.id.au>
1597
1598 * doc/recutils.texi: Reorganised sectioning, in favour of fewer, but bigger chapters.
1599
1600 2012-08-23 Jose E. Marchesi <jemarch@gnu.org>
1601
1602 syntax-check fixes.
1603 * etc/rec-mode.el: Trailing blanks removed from file.
1604
1605 * doc/recutils.texi (recsel Grouping): Don't use @acronym{}.
1606 http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
1607 explains why.
1608
1609 * src/rec-db.c (rec_db_merge_records): Use memcpy instead of
1610 strncpy.
1611 (rec_db_process_fex): Likewise.
1612 * utils/recfmt.c (recfmt_apply_template): Likewise.
1613 * utils/mdb2rec.c (process_table): Likewise.
1614 * utils/csv2rec.c (field_cb): Likewise.
1615 * src/rec-utils.c (rec_extract_file): Likewise.
1616 (rec_extract_url): Likewise.
1617 (rec_extract_type): Likewise.
1618 (rec_parse_regexp): Likewise.
1619 (rec_concat_strings): Likewise.
1620 * src/rec-sex-lex.l: Likewise.
1621 * src/rec-sex.c (rec_sex_eval_node): Likewise.
1622 (rec_sex_eval_node): Likewise.
1623 * src/rec-parser.c (rec_parse_field_name_str): Likewise.
1624 * src/rec-int.c (rec_int_merge_remote): Likewise.
1625 * src/rec-field-name.c (rec_field_name_normalise): Likewise.
1626
1627 * .x-sc_prohibit_strncpy: New file.
1628
1629 2012-08-22 Jose E. Marchesi <jemarch@gnu.org>
1630
1631 * src/rec-types.c (rec_type_destroy): Be a no-operation in case
1632 the passed type is NULL.
1633
1634 2012-08-21 Michał Masłowski <mtjm@mtjm.eu>
1635
1636 src,torture: Fix memory leaks found by valgrind in unit tests.
1637 * src/rec-fex.c (rec_fex_destroy): Free rewrite_to of each
1638 element.
1639 (rec_fex_parse_str_simple): Free fex_str, rewrite_to of each
1640 element and use common code for destroying partial results on
1641 error.
1642 (rec_fex_parse_str_subscripts): Free fex_str and in case of error
1643 field_name and str of each element.
1644 (rec_fex_parse_elem): Free elem->str, elem->field_name and
1645 elem->rewrite_to on error.
1646 * src/rec-parser.c (rec_parser_perror): Don't allocate number_str,
1647 asprintf will do it.
1648 (rec_parse_record): Free the record on error.
1649 (rec_parse_comment): Free the comment string not only on error.
1650 * src/rec-rset.c (rec_rset_destroy): Free constraints.
1651 * src/rec-sex-ast.c (rec_sex_ast_node_destroy): Free the node.
1652 * src/rec-types.c (rec_type_new): Free the type on error.
1653 (rec_type_destroy): Free the data of enum and regexp types.
1654
1655 * torture/rec-fex/rec-fex-new.c (rec_fex_new_subscripts): Destroy
1656 the fex after use.
1657 * torture/rec-fex/rec-fex-str.c (rec_fex_str_nominal): Likewise.
1658 * torture/rec-field/rec-field-set-name.c
1659 (rec_field_set_name_empty): Destroy the field after use.
1660 (rec_field_set_name_nonempty): Likewise.
1661 * torture/rec-field/rec-field-set-value.c
1662 (rec_field_set_value_empty): Likewise.
1663 (rec_field_set_value_nonempty): Likewise.
1664 * torture/rec-field/rec-field-value.c (rec_field_value_empty):
1665 Likewise.
1666 (rec_field_value_nonempty): Likewise.
1667 * torture/rec-parser/rec-parse-record-str.c
1668 (rec_parse_record_str_nominal): Free fname after use.
1669 * torture/rec-parser/rec-parse-record.c
1670 (rec_parse_record_nominal): Likewise.
1671 * torture/rec-parser/rec-parse-rset.c (rec_parse_rset_nominal):
1672 Destroy the rset after use.
1673 * torture/rec-parser/rec-parser-new-mem.c
1674 (rec_parser_new_mem_nominal): Likewise.
1675 * torture/rec-parser/rec-parser-seek-mem.c
1676 (rec_parser_seek_mem_skip): Destroy the record after use.
1677 * torture/rec-writer/rec-write-comment-str.c
1678 (rec_write_comment_str_nominal): Free str after use.
1679 (rec_write_comment_str_sexp): Likewise.
1680 * torture/rec-writer/rec-write-field-name-str.c
1681 (rec_write_field_name_str_nominal): Likewise.
1682 (rec_write_field_name_str_sexp): Likewise.
1683 * torture/rec-writer/rec-write-field-str.c
1684 (rec_write_field_str_nominal): Likewise.
1685 (rec_write_field_str_sexp): Likewise.
1686
1687 2012-08-21 Michał Masłowski <mtjm@mtjm.eu>
1688
1689 src: Initialize unused fields to 0 in rec_fex_append.
1690 * src/rec-fex.c (rec_fex_append): Zero new_elem content.
1691
1692 2012-08-21 Michał Masłowski <mtjm@mtjm.eu>
1693
1694 src: Fix an invalid read in an unit test detected by valgrind.
1695 * src/rec-parser.c (rec_parse_field_name_str): Do the check for
1696 trailing ':' only for nonempty strings.
1697
1698 2012-08-16 John Darrington <john@darrington.wattle.id.au>
1699
1700 doc: Reals always use the dot as separator
1701 * doc/recutils.texi: Added a note to the effect that the LC_NUMERIC
1702 locale class does not affect how real types are interpreted.
1703
1704 2012-08-16 John Darrington <john@darrington.wattle.id.au>
1705
1706 doc: Grammar and typos
1707 * doc/recutils.texi: Corrected various minor grammatical and
1708 typographical errors.
1709
1710 2012-08-16 John Darrington <john@darrington.wattle.id.au>
1711
1712 doc: Comments vs. %doc
1713 * doc/recutils.texi: Elaborated on the distinction between comments
1714 and %doc fields. Added an example for %doc
1715
1716 2012-08-16 John Darrington <john@darrington.wattle.id.au>
1717
1718 doc: Grammar
1719 * doc/recutils.texi: "allows to" is not correct English. Added a
1720 subject or reformulated as appropriate.
1721
1722 2012-08-15 John Darrington <john@darrington.wattle.id.au>
1723
1724 doc: Correct typo
1725 * doc/recutils.texi: adquisition --> acquisition
1726
1727 2012-08-15 John Darrington <john@darrington.wattle.id.au>
1728
1729 doc: Add a macro for id est
1730 * doc/recutils.texi: In English text, I think its easier to recognise these latin
1731 abbreviations in italics. So I've added a macro for i.e.
1732
1733 2012-08-15 John Darrington <john@darrington.wattle.id.au>
1734
1735 doc: "data" is plural ("datum" is the singular)
1736 * doc/recutils.texi: I find conjugations like "this data" just sound wrong.
1737
1738 2012-08-14 Jose E. Marchesi <jemarch@gnu.org>
1739
1740 src: compare real numbers with LC_NUMERIC=C.
1741 * src/rec-utils.c: Include locale.h.
1742 (rec_atod): Make sure that the dot is the decimal separator
1743 regardless of the locale in the environment.
1744
1745 2012-08-09 Jose E. Marchesi <jemarch@gnu.org>
1746
1747 doc: typo fixed in manual.
1748 * doc/recutils.texi: Incorrect "escalar" replaced by "scalar".
1749
1750 2012-08-05 Jose E. Marchesi <jemarch@gnu.org>
1751
1752 src,doc: support for dot notation in simple fexes.
1753 * doc/recutils.texi (Field Expressions): Document dot notation in
1754 field expressions.
1755
1756 * src/rec-fex.c (rec_fex_parse_str_simple): Support for dot
1757 notation in field names in simple fexes.
1758
1759 2012-08-05 Jose E. Marchesi <jemarch@gnu.org>
1760
1761 src,torture: don't try to perform a join if the referred type does
1762 not exist in the database.
1763 * src/rec-db.c (rec_db_query): Don't perform a join if records of
1764 the referred type cannot be found in the database.
1765
1766 * torture/utils/recsel.sh (non-existant-foreign-key): New input
1767 file.
1768 (recsel-non-existant-foreign-key): New test.
1769
1770 2012-08-04 Michał Masłowski <mtjm@mtjm.eu>
1771
1772 src,torture: fix a recfix crash reported by John Darrington.
1773 * src/rec-rset.c (rec_rset_get_field_type): Don't call
1774 rec_type_reg_get with NULL as type name.
1775
1776 * torture/utils/recfix.sh (unused-type): New input file.
1777 (recfix-unused-type): New test.
1778
1779 2012-08-01 Jose E. Marchesi <jemarch@gnu.org>
1780
1781 rec-mode: copy/kill fields and records commands.
1782 * etc/rec-mode.el (rec-cmd-kill-field): New function.
1783 (rec-cmd-copy-field): Likewise.
1784 (rec-cmd-kill-record): Likewise.
1785 (rec-cmd-copy-record): Likewise.
1786 (rec-mode-edit-map): Map the copy/kill commands for fields and
1787 records.
1788 (rec-mode-map): Likewise.
1789
1790 2012-07-31 Jose E. Marchesi <jemarch@gnu.org>
1791
1792 src,doc,torture: support for the %constraint special field.
1793 * doc/recutils.texi (%size and %constraint): Document the
1794 usage of the %constraint special field.
1795
1796 * src/rec-rset.c (rec_rset_num_sex_constraints): New function.
1797 (rec_rset_sex_constraint): Likewise.
1798
1799 * src/rec-int.c (rec_int_check_record): Call to
1800 rec_int_check_record_sex_constraints.
1801 (rec_int_check_record_sex_constraints): New function.
1802
1803 * torture/utils/recfix.sh (constraint-sex-valid): New input file.
1804 (constraint-sex-invalid): Likewise.
1805 (constraint-sex-invalid-empty): Likewise.
1806 (constraint-sex-several-valid): Likewise.
1807 (constraint-sex-several-invalid): Likewise.
1808 (constraint-sex-with-violation): Likewise.
1809 (recfix-constraint-sex-valid): New test.
1810 (recfix-constraint-sex-invalid): Likewise.
1811 (recfix-constraint-sex-invalid-empty): Likewise.
1812 (recfix-constraint-sex-several-valid): Likewise.
1813 (recfix-constraint-sex-several-invalid): Likewise.
1814 (recfix-constraint-sex-with-violation): Likewise.
1815
1816 * src/rec-int.c (rec_int_check_descriptor): Check for the
1817 integrity of the %constraint fields.
1818
1819 * src/rec-rset.c (rec_rset_new): Initialize the internal
1820 constraints structures to empty.
1821 (rec_rset_destroy): Destroy the internal constraints structures.
1822 (rec_rset_dup): Dup constraints.
1823 (rec_rset_set_descriptor): Update sex constraints.
1824 (rec_rset_update_sex_constraints): New function.
1825
1826 * src/rec.h (enum rec_std_field_e): New member
1827 REC_FIELD_CONSTRAINT.
1828
1829 * src/rec-field-name.c (fnames): New special field name
1830 %constraint.
1831
1832 2012-07-31 Jose E. Marchesi <jemarch@gnu.org>
1833
1834 torture: test for the => operator in sexes.
1835 * torture/utils/recsel.sh (implications): New input file.
1836 (recsel-sex-implies-1): New test.
1837
1838 2012-07-28 Jose E. Marchesi <jemarch@gnu.org>
1839
1840 doc: documentation of the => operator.
1841 * doc/recutils.texi (SEX Operators): Document the => operator.
1842
1843 2012-07-27 Jose E. Marchesi <jemarch@gnu.org>
1844
1845 src: implementation of the => sex operator.
1846 * src/rec-sex.c (rec_sex_eval_node): Implementation of the
1847 "implies" operator.
1848
1849 * src/rec-sex-ast.h (enum rec_sex_ast_node_type_e): New value
1850 REC_SEX_OP_IMPLIES.
1851
1852 * src/rec-sex-tab.y: Rule for the implies operator.
1853
1854 * src/rec-sex-lex.l ("=>"): New token for the "implies" operator.
1855
1856 2012-07-23 Jose E. Marchesi <jemarch@gnu.org>
1857
1858 rec-mode: new command rec-cmd-statistics.
1859 * etc/rec-mode.el (rec-cmd-statistic): New function.
1860 (rec-mode-map): Map rec-cmd-statistic with %.
1861
1862 2012-07-23 Jose E. Marchesi <jemarch@gnu.org>
1863
1864 rec-mode: rec-cmd-count now suggests a default selection
1865 expression when invoked with a numeric prefix.
1866 * etc/rec-mode.el (rec-cmd-count): Use a default expression using
1867 the field under point when invoked with a prefix argument.
1868
1869 2012-07-20 Jose E. Marchesi <jemarch@gnu.org>
1870
1871 * .x-sc_prohibit_defined_have_decl_tests: New file.
1872
1873 2012-07-20 Jose E. Marchesi <jemarch@gnu.org>
1874
1875 * gnulib module flock imported.
1876
1877 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1878
1879 rec-mode: support for undo in navigation mode.
1880 * etc/rec-mode.el (rec-mode-map): Remap `undo' into rec-cmd-undo
1881 when in navigation mode.
1882 (rec-cmd-undo): New function.
1883
1884 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1885
1886 rec-mode: support for multiple field names in %type entries.
1887 * etc/rec-mode.el (rec-field-type): Support for multiple field
1888 names in %type entries.
1889
1890 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1891
1892 rec-mode: time-stamps are now triggered with `t' instead of `n'.
1893 * etc/rec-mode.el (rec-cmd-edit-field): Change the key to
1894 trigger a time-stamp from `n' to `t'.
1895
1896 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1897
1898 rec-mode: support for generating time-stamps in date fields.
1899 * etc/rec-mode.el (rec-cmd-edit-field): Support for getting a
1900 timestamp when editing date fields.
1901 (rec-time-stamp-format): New constant.
1902
1903 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1904
1905 rec-mode: fix edition of the default record set.
1906 * etc/rec-mode.el (rec-record-descriptor): Return `nil' for a
1907 non-existant record descriptor, not "".
1908
1909 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1910
1911 rec-mode: allow the user to cancel the edit date operation by
1912 quitting the calendar window.
1913 * etc/rec-mode.el (rec-cmd-edit-field): Remap "q" in the calendar
1914 to remove the modified local map in the *Calendar* buffer if the
1915 user quits the calendar.
1916
1917 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1918
1919 rec-mode: rec-cmd-edit-field supports a numeric argument.
1920 * etc/rec-mode.el (rec-cmd-edit-field): Use the more general input
1921 method for reading field values regardless their types if a
1922 numeric argument is passed to the function.
1923
1924 2012-07-17 Jose E. Marchesi <jemarch@gnu.org>
1925
1926 rec-mode: support for editing date fields using the calendar.
1927 * etc/rec-mode.el (rec-cmd-edit-field): Support for editing date
1928 fields using the calendar.
1929 (rec-popup-calendar): New customized variable.
1930
1931 2012-07-10 Jose E. Marchesi <jemarch@gnu.org>
1932
1933 algol68: several new wrappers for librec functions.
1934 * algol68/rec.a68 (MODE RSET): New mode.
1935 (rec rset new): New wrapper.
1936 (rec rset destroy): Likewise.
1937 (rec rset dup): Likewise.
1938 (MODE MSET): New mode.
1939 (MODE MSETELEM): Likewise.
1940 (mset any): New constant.
1941 (rec mset new): New wrapper.
1942 (rec mset destroy): Likewise.
1943 (rec mset dup): Likewise.
1944 (rec mset type p): Likewise.
1945 (rec mset get at): Likewise.
1946 (rec mset insert at): Likewise.
1947 (rec mset insert after): Likewise.
1948 (rec mset append): Likewise.
1949 (rec mset add sorted): Likewise.
1950 (rec mset remove at): Likewise.
1951 (rec mset remove elem): Likewise.
1952 (rec mset search): Likewise.
1953
1954 2012-07-10 Jose E. Marchesi <jemarch@termi>
1955
1956 Tasktool operations.
1957 * TODO: Task 14 resolved to 'DONE'.
1958
1959 2012-07-08 Jose E. Marchesi <jemarch@gnu.org>
1960
1961 * etc/rec-mode.el (rec-cmd-select-fast): New function.
1962 (rec-cmd-select-sex): Likewise.
1963 (rec-mode-edit-map): Bindings for selection functions added.
1964 (rec-mode-map): Likewise.
1965
1966 2012-06-22 Jose E. Marchesi <jco@terma.com>
1967
1968 manual: some work in the grouping section.
1969 * doc/recutils.texi (recsel Grouping): Some work in the section.
1970
1971 2012-06-11 Jose E. Marchesi <jemarch@gnu.org>
1972
1973 rec-mode: new functions returning properties of the current record
1974 set.
1975 * etc/rec-mode.el (rec-keyword-mandatory): New constant.
1976 (rec-keyword-key): Likewise.
1977 (rec-mandatory-fields): New function.
1978 (rec-key): Likewise.
1979
1980 2012-06-10 Jose E. Marchesi <jemarch@gnu.org>
1981
1982 rec-mode: bug affecting the hiding of continuation line markers
1983 fixed.
1984 * etc/rec-mode.el (rec-hide-continuation-line-markers): Use
1985 rec-insert-field-value in order to determine the length.
1986
1987 2012-06-08 Jose E. Marchesi <jemarch@gnu.org>
1988
1989 rec-mode: presentation of continuation lines in navigation modes,
1990 and other improvements.
1991 * etc/rec-mode.el (rec-query): renamed from rec-select, and
1992 completed.
1993 (cl): Package required, for keyword arguments support.
1994 (rec-show-record): Call rec-hide-continuation-line-markers.
1995 (rec-hide-continuation-line-markers): New function.
1996 (rec-continuation-line-markers-overlays): New variable.
1997 (rec-continuation-line-markers-width): New variable.
1998 (rec-remove-continuation-line-marker-overlays): New function.
1999 (rec-mode-syntax-table): Put " and ' in the word-constituent
2000 syntax class to avoid unwanted font-locking and pairing.
2001
2002 2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
2003
2004 manual: some more dummy sections for the rec-mode manual.
2005 * doc/rec-mode.texi (Summary): New section.
2006 (Installation): Likewise.
2007 (Feedback): Likewise.
2008
2009 2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
2010
2011 manual: skeleton for the rec-mode manual.
2012 * .gitignore: Ignore doc/version-rec-mode.texi
2013
2014 * doc/Makefile.am (info_TEXINFOS): Added rec-mode.texi.
2015
2016 * doc/rec-mode.texi: New file.
2017 (Introduction): New chapter.
2018 (GNU Free Documentation License): New chapter.
2019
2020 2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
2021
2022 rec-mode: support for selection expressions in rec-count.
2023 * etc/rec-mode.el (rec-count): Support for selection expressions
2024 in counts.
2025 (rec-cmd-count): Likewise.
2026
2027 2012-06-05 Jose E. Marchesi <jemarch@gnu.org>
2028
2029 rec-mode: folding of fields.
2030 * etc/rec-mode.el (rec-show-record): Call to
2031 rec-hide-record-fields.
2032 (rec-hide-record-fields): New function.
2033 (rec-toggle-field-visibility): Likewise.
2034 (rec-cmd-toggle-field-visibility): Likewise.
2035 (rec-mode-edit-map): Bind SPC with
2036 rec-cmd-toggle-field-visibility.
2037 (rec-mode-map): Likewise.
2038 (rec-mode): Add an invisibility spec for fields.
2039 (rec-show-fields-all): New function.
2040 (rec-field-folded-p): Likewise.
2041 (rec-fold-field): Likewise.
2042 (rec-cmd-beginning-of-line): Removed.
2043 (rec-max-lines-in-fields): Default to 15.
2044 (rec-unfold-record-fields): New function.
2045 (rec-unfold-all-fields): New function.
2046 (rec-edit-type): Unfold all fields before switching to edit mode.
2047 (rec-edit-buffer): Likewise.
2048 (rec-edit-record): Likewise.
2049
2050 2012-06-04 Jose E. Marchesi <jemarch@gnu.org>
2051
2052 * etc/rec-mode.el (rec-cmd-edit-field): Support editing boolean
2053 fields as special enum values.
2054
2055 2012-06-04 Jose E. Marchesi <jemarch@gnu.org>
2056
2057 rec-mode: complete support for editing fields storing enumerated
2058 values.
2059 * etc/rec-mode.el (rec-cmd-show-type): Use
2060 display-message-or-buffer in order to avoid overflowing the echo
2061 area.
2062 (rec-cmd-edit-field): Complete support for editing fields
2063 containing enum values.
2064
2065 2012-06-04 Jose E. Marchesi <jemarch@gnu.org>
2066
2067 rec-mode: avoid security problems in calls to message by using %s.
2068 * etc/rec-mode.el (rec-cmd-show-type): Use "%s" in message to
2069 avoid security problems.
2070 (rec-cmd-goto-next-rec): Likewise.
2071 (rec-cmd-goto-previous-rec): Likewise.
2072 (rec-cmd-count): Likewise.
2073 (rec-cmd-show-info): Likewise.
2074
2075 2012-06-03 Jose E. Marchesi <jemarch@gnu.org>
2076
2077 * etc/rec-mode.el (rec-parse-field-name-from-string): Deleted.
2078 (rec-mode-map): Use "d" to show descriptors, not t.
2079 (rec-mode-edit-map): Likewise with C-cd.
2080 (rec-mode-edit-map): New entry for rec-cmd-show-type.
2081 (rec-mode-map): Likewise.
2082 (rec-type-descriptor): New function.
2083 (rec-parse-type): Allow comments in parenthesis in enum
2084 descriptions.
2085 (rec-cmd-edit-field): Edit the field value in several ways,
2086 depending on its type.
2087 (rec-type-data): New function.
2088 (rec-type-kind): Likewise.
2089
2090 2012-06-03 Jose E. Marchesi <jemarch@gnu.org>
2091
2092 rec-mode: several functions to support field types.
2093 * etc/rec-mode.el (rec-types): New variable.
2094 (rec-type-kind-p): New function.
2095 (rec-parse-type): Likewise.
2096 (rec-parse-type-int): Likewise.
2097 (rec-check-type): Likewise.
2098
2099 2012-06-01 Jose E. Marchesi <jemarch@gnu.org>
2100
2101 rec-mode: misc small fixes.
2102 * etc/rec-mode.el (rec-mode): docstring updated to reflect the
2103 real URL.
2104 (rec-keyword-rec): Use rec-keyword-prefix.
2105 (rec-mode-edit-map): Remove obsolete or not-working entries.
2106 (rec-mode-map): Likewise.
2107 (rec-field-trim-value): Don't remove the initial newline when
2108 trimming when there is only one.
2109 (rec-update-buffer-descriptors-xxx): Removed.
2110 (rec-map): Removed.
2111 (rec-do): Removed.
2112 (rec-sel): Removed.
2113 (rec-field-eq): Removed.
2114 (rec-field-count): Removed.
2115 (rec-init-selections): Removed.
2116 (rec-finish-editing): Don't call rec-init-selections.
2117 (rec-finish-editing-field): Likewise.
2118 (rec-search-first): Removed.
2119 (rec-selection-list): Removed.
2120 (rec-cmd-sel): Removed.
2121 (rec-mode): Wide the buffer after killing local variables.
2122
2123 2012-06-01 Jose E. Marchesi <jemarch@gnu.org>
2124
2125 rec-mode: fixes in goto-type and show-type.
2126 * etc/rec-mode.el (rec-buffer-types): Return the values of the
2127 first %rec entry in each record, not a list.
2128 (rec-show-type): Show the first data record of the selected type,
2129 if it exists.
2130 (rec-show-type): Get an optional argument show-descriptor.
2131 (rec-cmd-show-descriptor): Call rec-show-type with show-descriptor
2132 t.
2133
2134 2012-06-01 Jose E. Marchesi <jemarch@gnu.org>
2135
2136 rec-mode: field names are no longer lists of parts.
2137 * etc/rec-mode.el (rec-parse-record): Docstring updated.
2138 (rec-field-name-re): Updated.
2139 (rec-insert-field-name): Updated to new field structure.
2140 (rec-buffer-types): Call rec-record-assoc with a string field
2141 name, not a list.
2142 (rec-record-descriptor-p): Likewise, and use rec-keyword-rec.
2143 (rec-goto-type): Likewise.
2144 (rec-regular-p): Likewise.
2145 (rec-record-type): Likewise.
2146 (rec-search-first): Likewise.
2147 (rec-init-selections): Likewise.
2148
2149 2012-05-31 Jose E. Marchesi <jemarch@gnu.org>
2150
2151 rec-mode: editing of individual fields now works.
2152 * etc/rec-mode.el (rec-insert-field): Fixed to work with the new
2153 field structured.
2154
2155 2012-05-31 Jose E. Marchesi <jemarch@gnu.org>
2156
2157 src: fix sorting code to properly handle interleaved comments.
2158 * src/rec-rset.c (rec_rset_record_compare_fn): Return 1 if elem2
2159 is a comment.
2160
2161 * torture/utils/recsel.sh (sort-with-comment): New input file.
2162 (sort-with-comment): New test.
2163
2164 2012-05-29 Jose E. Marchesi <jemarch@gnu.org>
2165
2166 Syntax fixes.
2167 * python/setup.py: Trailing blank removed.
2168
2169 * doc/recutils.texi (recins Encryption): Fix usage of @pxref.
2170
2171 2012-05-25 Michał Masłowski <mtjm@mtjm.eu>
2172
2173 src,torture: support changing parser position.
2174 * src/rec-parser.c (rec_parser_seek, rec_parser_tell): New
2175 functions.
2176 * src/rec.h: Prototypes for rec_parser_seek, rec_parser_tell.
2177
2178 * torture/Makefile.am (REC_PARSER_TSUITE): rec-parser-seek-mem.c
2179 added.
2180 * torture/rec-parser/rec-parser-seek-mem.c: New file.
2181 * torture/rec-parser/tsuite-rec-parser.c (tsuite_rec_parser):
2182 Added test_rec_parser_seek_mem.
2183
2184 2012-05-25 Michał Masłowski <mtjm@mtjm.eu>
2185
2186 src,torture: support parsing non-null terminated buffers.
2187 * src/rec-parser.c (struct rec_parser_s): New field in_size.
2188 * src/rec-parser.c (rec_parser_new): Initialize in_size to an
2189 invalid value.
2190 * src/rec-parser.c (rec_parser_getc): Use in_size instead of null
2191 check to find EOF in memory buffers.
2192 * src/rec-parser.c (rec_parser_new_mem): New function.
2193 * src/rec-parser.c (rec_parser_new_str): Use rec_parser_new_mem.
2194 * src/rec.h: Prototype for rec_parser_new_mem.
2195
2196 * torture/Makefile.am (REC_PARSER_TSUITE): rec-parser-new-mem.c
2197 added.
2198 * torture/rec-parser/rec-parser-new-mem.c: New file.
2199 * torture/rec-parser/tsuite-rec-parser.c (tsuite_rec_parser):
2200 Added test_rec_parser_new_mem.
2201
2202 2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
2203
2204 build,src: support versions of mdbtools using MDB_SDATETIME and
2205 MDB_DATETIME.
2206 * utils/mdb2rec.c (process_table): Use MDB_DATETIME instead of
2207 MDB_SDATETIME.
2208
2209 * utils/Makefile.am (mdb2rec_CPPFLAGS): Set MDB_DATETIME to the
2210 proper symbol.
2211
2212 * configure.ac (MDB_DATETIME): Check whether mdblib is using
2213 MDB_SDATETIME or MDB_DATETIME.
2214
2215 2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
2216
2217 torture,src: tests for aggregates and multiple-field grouping, and
2218 several fixes.
2219 * src/rec-aggregate.c (REC_AGGREGATE_ACCUM_FUNC): Get an INIT_VAL
2220 argument.
2221 Use DBL_MAX and DBL_MIN.
2222 (rec_aggregate_std_avg): avg must be a double for the average.
2223
2224 * torture/utils/recsel.sh (sales): New input file.
2225 (recsel-group-multiple-fields): New test.
2226 (recsel-aggregate-field-name): Likewise.
2227 (recsel-aggregate-case-insensitive): Likewise.
2228 (recsel-aggregate-rewrite-rule): Likewise.
2229 (recsel-aggregate-count-overall): Likewise.
2230 (recsel-aggregate-count-grouped): Likewise.
2231 (recsel-aggregate-sum-overall): Likewise.
2232 (recsel-aggregate-sum-grouped): Likewise.
2233 (recsel-aggregate-min-overall): Likewise.
2234 (recsel-aggregate-min-grouped): Likewise.
2235 (recsel-aggregate-max-overall): Likewise.
2236 (recsel-aggregate-max-grouped): Likewise.
2237
2238 2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
2239
2240 utils: fix the detection of invalid fexes in -G and -S.
2241 * utils/rec2csv.c (rec2csv_parse_args): Use rec_fex_check to
2242 validate the list of fields in the command line.
2243 * utils/recsel.c (recsel_parse_args): Likewise.
2244
2245 2012-05-25 Jose E. Marchesi <jemarch@gnu.org>
2246
2247 src,doc: support for grouping by several fields.
2248 * doc/recutils.texi (recsel Invocation): Document that -G accepts
2249 a comma separated list of fields.
2250
2251 * utils/recsel.c: recutl_group_by_fields is now a fex.
2252 (recsel_parse_args): Adjust error messages to that fact and parse
2253 the fex.
2254 (recutl_print_help): Likewise.
2255 (recsel_process_data): Use recsel_group_by_fields.
2256
2257 * src/rec-db.c (rec_db_set): group-by is now a fex.
2258
2259 * src/rec-rset.c (rec_rset_merge_records): Get a fex argument with
2260 the list of fields used for grouping.
2261 (rec_rset_group): Group by multiple fields.
2262
2263 2012-05-24 Jose E. Marchesi <jemarch@gnu.org>
2264
2265 src: new function rec_rset_compare_typed_records.
2266 * src/rec-rset.c (rec_rset_compare_typed_records): New function.
2267 (rec_rset_record_compare_fn): Use rec_rset_compare_typed_records.
2268
2269 2012-05-16 Jose E. Marchesi <jemarch@gnu.org>
2270
2271 doc,manual: document the sorting with several fields.
2272 * utils/recsel.c (recutl_print_help): Document that -S now gets a
2273 FIELDS argument.
2274 * utils/rec2csv.c (recutl_print_help): Likewise.
2275 * doc/recutils.texi (recsel Invocation): Likewise.
2276 (rec2csv Invocation): Likewise.
2277 (%sort): Document that several fields can be used as sorting
2278 criteria.
2279
2280 2012-05-16 Jose E. Marchesi <jemarch@gnu.org>
2281
2282 torture: tests for sorting with multiple fields.
2283 * torture/utils/recsel.sh (sort-multiple): New input file.
2284 (recsel-sort-multiple): New test.
2285 (recsel-sort-field-multiple): Likewise.
2286
2287 * torture/utils/recfix.sh (unsorted-multiple): New input file.
2288 (recfix-sort-multiple): New test.
2289
2290 2012-05-16 Jose E. Marchesi <jemarch@gnu.org>
2291
2292 src,utils: implementation for sorting with multiple fields.
2293 * src/rec-fex.c (rec_fex_parse_str_simple): Initialize
2294 function_name, function_data and rewrite_to to NULL.
2295
2296 * utils/rec2csv.c: rec2csv_sort_by_fields is now a fex.
2297 (rec2csv_process_data): Pass the fex to rec_rset_sort.
2298
2299 * utils/recsel.c: recutl_sort_by_fields is now a fex.
2300 (recsel_parse_args): Handle several field names in -S.
2301 (recsel_process_data): Pass the fex to rec_db_query.
2302
2303 * src/rec-db.c (rec_db_query): The sort_by parameter is now a fex.
2304
2305 * src/rec-rset.c (rec_rset_record_compare_fn): Use
2306 rec_type_values_cmp.
2307 (rec_rset_record_compare_fn): Rewritten to work on multiple
2308 fields.
2309
2310 * src/rec-types.c (rec_type_values_cmp): New function.
2311 (REC_TYPE_BOOL_TRUE_VALUES_RE): New constant.
2312 (REC_TYPE_BOOL_FALSE_VALUES_RE): Likewise.
2313 (REC_TYPE_BOOL_VALUE_RE): Use REC_TYPE_BOOL_TRUE_VALUES_RE and
2314 REC_TYPE_BOOL_FALSE_VALUES_RE.
2315
2316 * src/rec-int.c (rec_int_check_descriptor): The %sort special
2317 field now acccepts a simple_fex as its value.
2318
2319 * src/rec-rset.c (rec_rset_update_field_props): Use fexes as
2320 order_by fields.
2321
2322 * src/rec-rset.c (rec_rset_dup): Use rec_fex_dup to duplicate the
2323 fex containing the sort_by fields.
2324 (rec_rset_set_order_by_field): Get a fex.
2325 (rec_rset_order_by_field): Return a fex.
2326 (rec_rset_sort): Get a fex.
2327
2328 * src/rec-fex.c (rec_fex_dup): New function.
2329
2330 * src/rec-rset.c (rec_rset_s): order_by_fields is now a fex.
2331 (REC_RSET_MAX_ORDER): Unused constant removed.
2332 (rec_rset_new): order_by_field renamed to order_by_fields.
2333 (rec_rset_destroy): Destroy rset->order_by_fields with
2334 rec_fex_destroy.
2335
2336 2012-05-08 Jose E. Marchesi <jemarch@gnu.org>
2337
2338 * doc/recutils.texi (recsel Grouping): New section documenting the
2339 -G operation.
2340
2341 2012-05-05 Jose E. Marchesi <jemarch@gnu.org>
2342
2343 src: new aggregate Avg.
2344 * src/rec-aggregate.c (std_aggregates): New aggregate "avg".
2345 (rec_aggregate_std_avg): New function.
2346 (rec_aggregate_std_avg_record): Likewise.
2347
2348 2012-05-05 Jose E. Marchesi <jemarch@gnu.org>
2349
2350 src: improvements in the aggregates implementation to avoid code
2351 duplication.
2352 * src/rec-aggregate.c: New global variable std_aggregates
2353 containing descriptors for the standard aggregates.
2354 (rec_aggregate_reg_add_standard): Use std_aggregates.
2355 (rec_aggregate_std_p): Likewise.
2356 (REC_AGGREGATE_ACCUM_FUNC): New macro.
2357
2358 2012-05-03 Jose E. Marchesi <jemarch@gnu.org>
2359
2360 src: new aggregates min and max.
2361 * src/rec-aggregate.c (rec_aggregate_std_min): New function.
2362 (rec_aggregate_std_min_record): Likewise.
2363 (rec_aggregate_std_max): Likewise.
2364 (rec_aggregate_std_max_record): Likewise.
2365 (rec_aggregate_reg_add_standard): Register aggregates 'Min' and
2366 'Max'.
2367 (rec_aggregate_std_p): Likewise.
2368
2369 gnulib module minmax imported.
2370
2371 2012-05-03 Jose E. Marchesi <jemarch@gnu.org>
2372
2373 src,utils: recsel now complains if a non-existing aggregate
2374 function is called in a fex.
2375 * utils/recsel.c (recsel_parse_args): Check for the validity of
2376 the aggregate functions used in the field expressions.
2377
2378 * src/rec-aggregate.c (rec_aggregate_std_p): New function.
2379
2380 2012-05-03 Jose E. Marchesi <jemarch@gnu.org>
2381
2382 gnulib module floor imported.
2383
2384 2012-05-03 Jose E. Marchesi <jco@terma.com>
2385
2386 src: aggregate function names are case-insensitive.
2387 * src/rec-aggregate.c (rec_aggregate_reg_get): Be case-insensitive
2388 when retrieving functions from a registry.
2389
2390 2012-05-03 Jose E. Marchesi <jco@terma.com>
2391
2392 src: implementation of the SUM aggregate.
2393 * src/rec-aggregate.c (rec_aggregate_std_sum): New function.
2394 (rec_aggregate_std_sum_record): Likewise.
2395
2396 2012-05-03 Jose E. Marchesi <jco@terma.com>
2397
2398 src: sort after grouping so -S works with -G.
2399 * src/rec-db.c (rec_db_query): Sort after grouping, so -S works
2400 with -G.
2401
2402 2012-05-03 Jose E. Marchesi <jco@terma.com>
2403
2404 src: new semantics and interfaces for aggregates.
2405 * src/rec-db.c (rec_db_process_fex): Use _ to separate the
2406 function name and the field name when generating names for
2407 aggregated fields.
2408
2409 * src/rec-fex.c (rec_fex_all_calls_p): New function.
2410
2411 * src/rec-aggregate.c (rec_aggregate_std_count): Rewritten with
2412 new semantics.
2413
2414 2012-05-03 Jose E. Marchesi <jco@terma.com>
2415
2416 src: don't allow subscripts in the fields passed to function calls
2417 in fexes and aggregates.
2418 * src/rec.h: rec_aggregate_t modified to not get min and max
2419 arguments.
2420 (REC_FEX_CALL): Don't allow subscripts in the field names used in
2421 the function calls.
2422
2423 * src/rec-aggregate.c (rec_aggregate_std_count): Don't get 'min'
2424 and 'max' arguments.
2425
2426 2012-05-03 Jose E. Marchesi <jco@terma.com>
2427
2428 src: field functions renamed to aggregates.
2429 * src/rec-aggregate.c (rec_aggregate_std_count): Return a char*
2430 instead of a record.
2431
2432 * src/rec-db.c (struct rec_db_s): Field functions_reg renamed to
2433 aggregates.
2434
2435 * src/Makefile.am (librec_la_SOURCES): rec-func.c is now called
2436 rec-aggregate.c.
2437
2438 * src/rec-aggregate.c: Renamed from src/rec-func.c, and all
2439 rec_func_* symbols renamed to rec_aggregate_*.
2440
2441 * src/rec.h: rec_func_t modified to return a string instead of a
2442 record and renamed to rec_aggregate_t.
2443
2444 * src/rec-db.c (rec_db_query): Perform the group-by operation
2445 before the selection.
2446
2447 2012-04-27 Jose E. Marchesi <jemarch@gnu.org>
2448
2449 src,utils: implementation of field functions, and Count.
2450 * src/rec-record.c (rec_record_contains_field): New function.
2451
2452 * src/rec-rset.c (rec_rset_merge_records): The merge operation
2453 must not create duplicated fields on the resulting record.
2454
2455 * src/rec-db.c (rec_db_new): Add standard field functions to the
2456 database functions registry.
2457
2458 * src/rec-func.c (rec_func_reg_add_standard): New function.
2459 (rec_func_std_count): New function.
2460
2461 * src/Makefile.am (librec_la_SOURCES): Added rec-func.c
2462
2463 * src/rec-db.c (rec_db_s): New field 'functions_reg'.
2464 (rec_db_new): Initialize the functions register of the database.
2465 (rec_db_destroy): Dispose the memory used by the functions
2466 register when destroying the databse.
2467 (rec_db_functions): New function.
2468
2469 * utils/recutl.c (recutl_build_db): Return NULL if there is not
2470 enough memory to create the database.
2471
2472 * src/rec-func.c (rec_func_reg_s): New structure.
2473 (rec_type_reg_new): New function.
2474 (rec_func_reg_destroy): Likewise.
2475 (rec_func_reg_add): Likewise.
2476 (rec_func_reg_et): Likewise.
2477
2478 * src/rec-fex.c (rec_fex_elem_function_data): New function.
2479 (rec_fex_elem_s): New field function_data.
2480 (rec_fex_parse_elem): Initialize function_data to NULL.
2481
2482 * src/rec.h: Data types and functions declarations for the field
2483 functions and the function registries.
2484
2485 * src/rec-func.c: New file.
2486
2487 * src/rec-record.c (rec_record_append): New function.
2488
2489 * src/rec-db.c (rec_db_process_fex): Fetch and invoke the
2490 corresponding field functions if the fex contains function calls.
2491
2492 * src/rec-fex.c (rec_fex_elem_s): New member function_name.
2493 (rec_fex_parse_elem): Parse function calls.
2494 (rec_fex_elem_function_name): New function.
2495
2496 2012-04-22 Jose E. Marchesi <jemarch@gnu.org>
2497
2498 * src/rec.h (REC_FEX_FNAME): New constant.
2499 (REC_FEX_CALL): Likewise.
2500 (REC_FNAME_FEX_RE): Modified to allow call entries.
2501
2502 2012-04-22 Jose E. Marchesi <jemarch@gnu.org>
2503
2504 syntax-check fixes.
2505 * python/recmodule.c: Include config.h
2506
2507 2012-04-22 Jose E. Marchesi <jemarch@gnu.org>
2508
2509 src: support for >= and <= in selection expressions.
2510 * torture/utils/recsel.sh (rec-sex-integer-lessequalthan): New
2511 test.
2512 (rec-sex-integer-greaterequalthan): Likewise.
2513
2514 * src/rec-sex.c (rec_sex_eval_node): Semantics of REC_SEX_OP_GTE
2515 and REC_SEX_OP_LTE implemented.
2516
2517 * src/rec-sex-ast.h (rec_sex_ast_node_type_e): New entries
2518 REC_SEX_OP_LTE and REC_SEX_OP_GTE.
2519
2520 * src/rec-sex-tab.y: New tokens REC_SEX_TOK_LTE and
2521 REC_SEX_TOK_GTE.
2522 (exp): Rules for the >= and <= infix operators.
2523
2524 * src/rec-sex-lex.l ("<="): New rule.
2525 (">="): Likewise.
2526
2527 2012-04-18 Jose E. Marchesi <jemarch@gnu.org>
2528
2529 doc: new CSS file adapted from lilypond.
2530 * doc/css/recutils-manuals.css: New file, adapted from
2531 lilypond-manuals.css.
2532
2533 2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
2534
2535 manual: missing documentation added for some command line options,
2536 and inconsistencies removed.
2537 * utils/recfix.c (recutl_print_help): Don't document -t|--type,
2538 because it is not yet implemented.
2539
2540 * doc/recutils.texi (recinf Invocation): Document that -S is the
2541 short form for --print-sexps.
2542 (recsel Invocation): Document -i|--case-insensitive.
2543 (recdel Invocation): Likewise.
2544 (recins Invocation): Document the --force command line option.
2545 (recfix Invocation): Likewise.
2546 (recdel Invocation): -f is not an alias for --force.
2547
2548 2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
2549
2550 manual: documentation for field expressions fixed.
2551 * doc/recutils.texi (Field Expressions): Documentation fixed in
2552 order to reflect the fact that it is possible to repeat the same
2553 field in the same field expression.
2554
2555 2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
2556
2557 src: make the string comparison operators case-insensitive in
2558 selection expressions when requested.
2559 * torture/utils/recsel.sh (rec-sex-string-equal): New test.
2560 (rec-sex-string-non-equal): Likewise.
2561 (rec-sex-string-equal-insensitive): Likewise.
2562 (rec-sex-string-non-equal-insensitive): Likewise.
2563
2564 * src/rec-sex.c (rec_sex_eval_node): Make the = and != operators
2565 case insensitive with strings when applicable.
2566
2567 2012-04-17 Jose E. Marchesi <jemarch@gnu.org>
2568
2569 utils,doc: fix the --number command line option.
2570 * torture/utils/recsel.sh (recsel-index-long): New test.
2571
2572 * utils/recutl.h (RECORD_SELECTION_LONG_ARGS): The long version of
2573 -n is --number, not --num.
2574
2575 * doc/recutils.texi (recsel Invocation): Document --number as the
2576 long version of -n.
2577 (recins Invocation): Likewise.
2578 (recdel Invocation): Likewise.
2579 (recset Invocation): Likewise.
2580
2581 2012-04-16 Michał Masłowski <mtjm@mtjm.eu>
2582
2583 src,utils: fix several memory leaks.
2584 * src/rec-field.c (rec_field_destroy): Free the value, like the
2585 other structure members.
2586
2587 * src/rec-mset.c (rec_mset_destroy): Free type names and the mset
2588 when destroying it.
2589
2590 * src/rec-parser.c (rec_parse_field): Free field name and value
2591 after setting them, since only copies are used later.
2592
2593 * utils/recutl.c (recutl_parse_db_from_file): Destroy the parser
2594 after using it.
2595
2596 2012-04-17 Jose E. Marchesi <jco@terma.com>
2597
2598 src: weird duplication of the file contens in rec-crypt-dummy.c
2599 fixed.
2600 * src/rec-crypt-dummy.c: Weird duplication of file fixed. WTF...
2601
2602 2012-04-15 Jose E. Marchesi <jemarch@gnu.org>
2603
2604 * doc/recutils.texi (Common Options): Typo fixed.
2605
2606 2012-04-09 Jose E. Marchesi <jemarch@gnu.org>
2607
2608 rec-mode: don't use a fixed list of keywords when font-locking
2609 special fields and other minor fixes.
2610 * etc/rec-mode.el (rec-mode): Don't go into navigation mode if the
2611 file is empty.
2612 (rec-keyword-prefix): New constant.
2613 Copyright years list updated.
2614 (rec-font-lock-keywords): Recognize as special fields any field
2615 whose name starts with %.
2616
2617 2012-04-09 Daiki Ueno <ueno@unixuser.org>
2618
2619 rec-mode: fix error when rec-finish-editing on newly created file.
2620 * etc/rec-mode.el (rec-update-buffer-descriptors): Don't assume
2621 that the current buffer is already saved on the disk.
2622
2623 2012-04-04 Daiki Ueno <ueno@unixuser.org>
2624
2625 src: use a pinch of salt when encrypting confidential fields.
2626 * src/rec-crypt.c (rec_encrypt): Insert a random salt to improve
2627 security.
2628 (rec_decrypt): Extract the salt of the encrypted data.
2629
2630 2012-04-03 Daiki Ueno <ueno@unixuser.org>
2631
2632 src: several leaks fixed in rec-crypt.c.
2633 * src/rec-crypt.c (rec_encrypt): Avoid leaks by properly closing
2634 the gcrypt handlers in case of errors.
2635
2636 2012-03-27 Michał Masłowski <mtjm@mtjm.eu>
2637
2638 src: always provide encryption routines and their prototypes.
2639 * src/Makefile.am [!CRYPT]: Build rec-crypt-dummy.c instead of
2640 rec-crypt.c if encryption is disabled.
2641 * src/rec-crypt-dummy.c: New file.
2642 * src/rec.h: Unconditionalize encryption routine declarations.
2643
2644 2012-03-13 Jose E. Marchesi <jemarch@gnu.org>
2645
2646 * src/rec.h (GNU_REC_H): Sentinel of the header file renamed from
2647 REC_H in order to avoid potential conflicts.
2648
2649 2012-03-07 Jose E. Marchesi <jemarch@gnu.org>
2650
2651 torture: some system tests for the recsel join functionality.
2652 * torture/utils/recsel.sh (recsel-join-default-rset): New test.
2653 (recsel-join-no-foreign): Likewise.
2654
2655 2012-03-04 Giuseppe Scrivano <gscrivano@gnu.org>
2656
2657 src,lib: use the `read-file' module from gnulib.
2658 * lib/read-file.h: Imported from gnulib.
2659 * lib/read-file.c: Likewise.
2660 * utils/recutl.c (recutl_read_file): Call `fread_file' instead
2661 of reimplementing it.
2662
2663 2012-03-02 Giuseppe Scrivano <giuseppe@southpole.se>
2664
2665 src: make some variables static.
2666 * utils/recutl.c (recutl_sort_p): Make it static.
2667 (recutl_order_rset): Likewise.
2668 (recutl_order_by_field): Likewise.
2669 (recutl_interactive_p): Likewise.
2670 (recutl_indexes): Likewise.
2671 (recutl_indexes_size): Likewise.
2672
2673 2012-03-02 Jose E. Marchesi <jemarch@gnu.org>
2674
2675 * doc/recutils.texi (recsel Invocation): Document -j|--join.
2676
2677 2012-03-02 Jose E. Marchesi <jco@terma.com>
2678
2679 src: partial implementation of rset mixing in joins.
2680 * src/rec-db.c (rec_db_join): Add a record descriptor to the
2681 joined record set.
2682
2683 2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
2684
2685 src: make the # operator to work with field subnames.
2686 * src/rec-fex.c (rec_fex_parse_elem): Use rec_concat_strings.
2687
2688 * src/rec-utils.c (rec_concat_strings): New function.
2689
2690 * src/rec-sex.c (rec_sex_eval_node): Use the subname of the name
2691 node, if present, in the evaluation of OP_SHA operations.
2692
2693 * torture/utils/recsel.sh (package-maintainers): New input file.
2694 (recsel-sex-sharp-subname): New test.
2695
2696 2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
2697
2698 src: support for field subnames with dot notation in fexes.
2699 * src/rec-fex.c (rec_fex_parse_elem): Support subnames in fexes.
2700
2701 * src/rec.h (REC_FNAME_FEX_RE): New constant.
2702
2703 2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
2704
2705 src,torture: fix a bug that caused to have empty records in query
2706 results.
2707 * torture/utils/recsel.sh (recsel-nonexistent-print): New test.
2708
2709 * src/rec-db.c (rec_db_query): Do not add empty records to the
2710 result record set.
2711
2712 2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
2713
2714 src,utils: inner join implementation.
2715 * src/rec-db.c (rec_db_merge_records): New function.
2716
2717 * utils/recsel.c (recsel_join): New global.
2718 (recutl_print_help): Include help for -j.
2719 (recsel_parse_args): Process the new command line option
2720 -j|--join.
2721 (recsel_process_data): Invoke rec_db_query with the proper join
2722 option.
2723
2724 * src/rec-db.c (rec_db_query): Get a 'join' argument.
2725
2726 2012-03-01 Jose E. Marchesi <jemarch@gnu.org>
2727
2728 src,torture,doc: implementation of the 'rec' field type.
2729 * doc/recutils.texi (Other types): Documentation for the 'rec'
2730 field type.
2731
2732 * torture/utils/recfix.sh (type-rec-norset): New input file.
2733 (type-rec-nokey): Likewise.
2734 (type-rec-key-notype): Likewise.
2735 (type-rec-key-type): Likewise.
2736 (type-rec-key-type-invalid): Likewise.
2737 (recfix-type-rec-norset): New test.
2738 (recfix-type-rec-nokey): Likewise.
2739 (recfix-type-rec-key-notype): Likewise.
2740 (recfix-type-rec-type): Likewise.
2741 (recfix-type-rec-key-type-invalid): Likewise.
2742
2743 * src/rec-int.c (rec_int_check_field_type): Check using the type
2744 of the key of the referred record set (if any) if the field is of
2745 type 'rec'.
2746
2747 * src/rec-rset.c (rec_rset_fprops_s): New property key_p.
2748 (rec_rset_update_field_props): Reset key_p.
2749 (rec_rset_get_props): Initialize key_p.
2750 (rec_rset_update_field_props): Update the key_p property.
2751 (rec_rset_key): New function.
2752
2753 * src/rec-types.c (rec_type_rec): New function.
2754
2755 * torture/utils/recfix.sh (type-rec-valid): New input file.
2756 (type-rec-invalid-empty): Likewise.
2757 (type-rec-invalid-malformed): Likewise.
2758 (recfix-type-rec-valid): New test.
2759 (recfix-type-rec-invalid-empty): Likewise.
2760 (recfix-type-rec-invalid-malformed): Likewise.
2761
2762 * src/rec-types.c (REC_TYPE_REC_DESCR_RE): New constant.
2763 (REC_TYPE_DESCR_RE): Updated.
2764 (rec_type_parse_rec): New function.
2765 (rec_type_check_rec): Likewise.
2766
2767 * src/rec-int.c (rec_int_rec_type_p): Use REC_RECORD_TYPE_RE.
2768
2769 * src/rec.h (REC_RECORD_TYPE_RE): New constant.
2770
2771 * src/rec-types.c (REC_TYPE_REC_NAME): New constant.
2772 (REC_TYPE_CLASS_RE): Updated.
2773
2774 2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
2775
2776 src: support for dot notation in selection expressions.
2777 * src/rec-sex-ast.c (rec_sex_ast_node_s): Name structs now contain
2778 a name and a subname.
2779 (rec_sex_ast_node_set_name): Get a 'subname' argument.
2780 (rec_sex_ast_node_name): Return the name.
2781 (rec_sex_ast_node_destroy): Destroy both name and subname in a
2782 name node.
2783 (rec_sex_ast_node_subname): New function.
2784
2785 * src/rec-sex-lex.l: Rule for field names modified to accept two
2786 field names separated by a dot character.
2787 (rec_sex_lex_extract_subname): New function.
2788
2789 2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
2790
2791 src: remove obsolete and unused functionality from the rec writer.
2792 * src/rec-writer.c (rec_write_record_with_rset): Function removed.
2793 (rec_write_field_with_rset): Likewise.
2794 (rec_write_field): Don't get a 'name' argument.
2795 (rec_writer_s): Field 'password' removed.
2796 (rec_writer_new_common): Don't initialize password.
2797 (rec_write_field): Encryption support removed.
2798 (rec_writer_set_password): Function removed.
2799
2800 * torture/Makefile.am (REC_WRITER_TSUITE): Tests for
2801 rec_write_record_with_fex removed.
2802
2803 * src/rec-writer.c (rec_write_record_with_fex): Function removed.
2804 * utils/recutl.c (recutl_eval_field_expression): Likewise.
2805
2806 2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
2807
2808 torture: failing unit test adapted to new API.
2809 * torture/rec-writer/rec-write-rset.c: Add the 'mode' argument
2810 when calling rec_write_rset.
2811
2812 2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
2813
2814 src,utils: set high-level logic moved to librec and recset
2815 adapted.
2816 * utils/recset.c (recset_process_add): Function removed.
2817 (recset_process_set): Likewise.
2818 (recset_process_ren): Likewise.
2819 (recset_process_del): Likewise.
2820 (recset_process_actions): Use the new function in the library.
2821
2822 * src/rec-db.c (rec_db_set): New function.
2823 (rec_db_set_act_rename): Likewise.
2824 (rec_db_set_act_set): Likewise.
2825 (rec_db_set_act_add): Likewise.
2826 (rec_db_set_act_delete): Likewise.
2827
2828 2012-02-29 Jose E. Marchesi <jemarch@gnu.org>
2829
2830 src,utils: query, insert and delete high-level logic moved to
2831 librec and utilities adapted.
2832 * torture/utils/recdel.sh (recdel-index-list): New test.
2833 (recdel-case-insensitive): Likewise.
2834 (recdel-case-sensitive): Likewise.
2835
2836 * src/rec-db.c (rec_db_delete): New function.
2837
2838 * torture/utils/recins.sh (multiple-records-case): New input file.
2839 (recins-case-insensitive): New test.
2840 (recins-case-sensitive): New test.
2841
2842 * src/rec-rset.c (rec_rset_set_type): Get a const char* for the
2843 'type' argument.
2844
2845 * src/rec-db.c (rec_db_insert): New function.
2846
2847 * torture/utils/recsel.sh (recsel_descriptor): New test.
2848
2849 * src/rec-writer.c (rec_writer_s): New field "collapse_p".
2850 (rec_writer_new_common): Writers don't collapse output by default.
2851 (rec_writer_set_collapse): New function.
2852
2853 * utils/recutl.c (recutl_indexes): Global is now a pointer to
2854 size_t.
2855 (recutl_init): Initialize recutl_indexes.
2856 (recutl_index_p): Removed.
2857 (recutl_index_add_random): Likewise.
2858 (recutl_reset_indexes): Adapted to *size_t.
2859 (recutl_num_indexes): Likewise.
2860 (recutl_index): New function.
2861
2862 * src/rec-writer.c (rec_write_rset): Get a 'mode' argument.
2863
2864 * src/rec-db.c (rec_db_query): Uniq the records if requested by
2865 the user.
2866
2867 * utils/recsel.c (recsel_parse_args): Set recsel_write_mode when
2868 -P and -R are found.
2869 (recsel_print_values): Global removed.
2870 (recsel_print_row): Global removed.
2871
2872 2012-02-28 Jose E. Marchesi <jemarch@gnu.org>
2873
2874 src,utils,torture: new writer modes values and values_row, and
2875 some improvements in the writer algorithms.
2876 * utils/recutl.c (recutl_write_db_to_file): Write the db into the
2877 file only if there are record sets to write. Otherwise create an
2878 empty file.
2879
2880 * src/rec-writer.c (rec_write_string): New function.
2881
2882 * torture/rec-writer/rec-write-comment.c
2883 (rec_write_comment_nominal): Added test with three lines.
2884
2885 * torture/rec-writer/rec-write-record.c (rec_write_record_values):
2886 New unit test.
2887 (rec_write_record_values_row): Likewise.
2888
2889 * torture/rec-writer/rec-write-field.c (rec_write_field_values):
2890 New unit test.
2891 (rec_write_field_values_row): Likewise.
2892
2893 * src/rec-writer.c (rec_write_field_with_rset): Implement
2894 REC_WRITER_VALUES and REC_WRITER_VALUES_ROW semantics.
2895
2896 * src/rec.h (rec_writer_mode_e): New write modes REC_WRITER_VALUES
2897 and REC_WRITER_VALUES_ROW.
2898
2899 2012-02-28 Jose E. Marchesi <jemarch@gnu.org>
2900
2901 src: random indexes support added to rec_db_query.
2902 * src/rec-db.c (rec_db_query): Get an INDEX paramerter pointing to
2903 a list of index intervals.
2904 (rec_db_record_selected_p): Likewise.
2905 (rec_db_record_selected_p): Handle indexes.
2906 (rec_db_add_random_indexes): New function.
2907 (rec_db_indexes_p): New function.
2908
2909 2012-02-28 Jose E. Marchesi <jemarch@gnu.org>
2910
2911 src: first version of rec_db_query.
2912 * src/rec-db.c (rec_db_query): New function.
2913 (rec_db_process_fex): New function.
2914 (rec_db_record_selected_p): New function.
2915
2916 * src/rec.h: Prototype for rec_db_query.
2917
2918 2012-02-27 Jose E. Marchesi <jemarch@gnu.org>
2919
2920 src: small changes in rec-db.
2921 * src/rec-db.c (rec_db_s): Field 'size' is now of type size_t.
2922 (rec_db_destroy): Be a no-operation if NULL is passed.
2923 (rec_db_size): Return a size_t value.
2924 (rec_db_get_rset): The 'position' argument is now a size_t.
2925 (rec_db_insert_rset): Likewise.
2926 (rec_db_remove_rset): Likewise.
2927 (rec_db_type_p): Get a const char* argument.
2928
2929 2012-02-27 Jose E. Marchesi <jemarch@gnu.org>
2930
2931 torture: fix offline make perf.
2932 * torture/utils/Makefile.am (perf): Invoke $(srcdir)/p-recsel.sh
2933 and set srcdir.
2934
2935 2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
2936
2937 python: start of the python bindings for librec.
2938 * python/README: New file.
2939 * python/setup.py: Likewise.
2940 * python/recmodule.c: Likewise.
2941 (prec_version): New function.
2942 (initrec): Likewise.
2943 (prec_functions): New global.
2944
2945 2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
2946
2947 src,doc,torture: support for UUID field type and UUID auto fields.
2948 * torture/utils/config.sh.in (UUID_SUPPORT): Set to @have_uuid@.
2949
2950 * torture/utils/recfix.sh (uuid-fields-ok): New input file.
2951 (uuid-fields-invalid): Likewise.
2952 (recfix-uuid-ok): New test.
2953 (recfix-uuid-invalid): Likewise.
2954
2955 * doc/recutils.texi (Other types): UUID type documented.
2956 (%auto): Likewise.
2957
2958 * src/rec-int.c (rec_int_check_descriptor): Allow auto-incremented
2959 fields of type uuid if suuport for uuids is compiled in.
2960
2961 * src/rec-rset.c (rec_rset_add_auto_fields): Handle REC_TYPE_UUID.
2962 (rec_rset_add_auto_field_uuid): New function.
2963
2964 * src/rec.h (rec_type_kind_e): Added entry REC_TYPE_UUID.
2965
2966 * src/rec-types.c (REC_TYPE_UUID_NAME): New constant.
2967 (REC_TYPE_CLASS_RE): Add REC_TYPE_UUID_NAME.
2968 (rec_type_check_uuid): New function.
2969 (rec_type_new): Handle REC_TYPE_UUID.
2970 (rec_type_kind_str): Likewise.
2971 (rec_type_check): Likewise.
2972 (rec_type_parse_type_kind): Likewise.
2973
2974 * src/Makefile.am (librec_la_LIBADD): link with UUIDLIBS when
2975 appropriate.
2976
2977 * configure.ac: Check for libuuid and subst UUIDLIBS.
2978 Define the automake conditional UUID_TYPE.
2979
2980 * README-dev: List the dependency on libuuid.
2981
2982 2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
2983
2984 src,doc,torture: support for rewrite rules in field expressions.
2985 * torture/utils/recsel.sh (recsel-fex-rewrite-all): New test.
2986 (recsel-fex-rewrite-subscript-single): Likewise.
2987 (recsel-fex-rewrite-subscript-multi): Likewise.
2988 (recsel-fex-rewrite-several): Likewise.
2989
2990 * torture/rec-fex/rec-fex-elem-rewrite-to.c
2991 (rec_fex_elem_field_rewrite_to_default): New unit test.
2992 (rec_fex_elem_field_rewrite_to_nominal): Likewise.
2993
2994 * torture/Makefile.am (REC_FEX_TSUITE): Added
2995 rec-fex/rec-fex-elem-field-rewrite-to.c.
2996
2997 * torture/rec-fex/tsuite-rec-fex.c (tsuite_rec_fex): Added
2998 test_rec_fex_elem_rewrite_to.
2999
3000 * torture/rec-fex/rec-fex-elem-rewrite-to.c: New file.
3001 (test_rec_fex_elem_rewrite_to): New function.
3002
3003 * doc/recutils.texi (Field Expressions): Documentation for rewrite
3004 rules added.
3005
3006 * torture/rec-writer/rec-write-field.c (rec_write_field_rewrite):
3007 New unit test.
3008 (rec_write_field_sexp_rewrite): Likewise.
3009
3010 * src/rec-writer.c (rec_write_record_with_fex): Invoke
3011 rec_write_field passing the rewrite_to property of the fex elem.
3012 (rec_write_field): Get an extra argument 'name'.
3013 (rec_write_field_with_rset): Likewise.
3014 (rec_write_record_with_rset): Adapt to new
3015 rec_write_field_with_rset.
3016 (rec_write_field_str): Likewise.
3017
3018 * src/rec-fex.c (rec_fex_parse_elem): The 'str' field must contain
3019 a copy of the textual entry (including rewrite rules and
3020 subscripts) and not just the field name.
3021 (rec_fex_elem_rewrite_to): New function.
3022
3023 * src/rec.h (REC_FNAME_SUB_RE): Allow the inclusion of a rewrite
3024 rule at the end of the entry.
3025
3026 * src/rec-fex.c (rec_fex_elem_s): New field 'rewrite_to'.
3027 (rec_fex_parse_elem): Parse the rewrite rule if it is present in
3028 the fex entry.
3029
3030 2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
3031
3032 * TESTS: Regenerated.
3033
3034 2012-02-26 Jose E. Marchesi <jemarch@gnu.org>
3035
3036 torture: performance tests for recsel using a sex with regexp
3037 matching.
3038 * torture/utils/p-recsel.sh (recsel-200-records-sex-regexp): New
3039 test.
3040 (recsel-500-records-sex-regexp): Likewise.
3041 (recsel-1000-records-sex-regexp): Likewise.
3042 (recsel-10000-records-sex-regexp): Likewise.
3043 (recsel-20000-records-sex-regexp): Likewise.
3044
3045 2012-02-25 Jose E. Marchesi <jemarch@gnu.org>
3046
3047 torture: support for performance test, and some performance recsel
3048 tests.
3049 * torture/utils/testutils.sh: Get a second parameter 'perf'.
3050 (test_tool): Calculate and print timing statistics if $perf is not
3051 empty.
3052
3053 * torture/utils/p-recsel.sh: New file.
3054
3055 * torture/utils/Makefile.am (perf): New rule.
3056 * Makefile.am (perf): Likewise.
3057
3058 2012-02-25 Jose E. Marchesi <jemarch@gnu.org>
3059
3060 utils: fix short option for --random in help strings.
3061 * utils/recutl.c (recutl_print_help_record_selection): The short
3062 command line option for --random is -m not -R.
3063
3064 2012-02-25 Jose E. Marchesi <jemarch@gnu.org>
3065
3066 src,utils,torture: support for compound field names removed, and
3067 code cleanup.
3068 * torture/utils/recset.sh (recset-rename-all-key): Don't use a
3069 compound field name.
3070
3071 * doc/recutils.texi (Compound Field Names): Section removed,
3072 because it is now obsolete.
3073 (mdb2rec Examples): Removed examples involving compound field
3074 names.
3075
3076 * src/rec.h (REC_FNAME_RE): Remove the trailing colon.
3077
3078 * torture/utils/recsel.sh (compound-names): Input file removed,
3079 since there are not compound names anymore.
3080 (recsel-sex-field-names): Test removed.
3081 (recsel-sex-field-names-2): Likewise.
3082
3083 * src/rec-sex-lex.l (FIELD_NAME): Set to contain just one name
3084 part.
3085
3086 * src/rec-fex.c (rec_fex_parse_str_simple): Remove the trailing :
3087 from the field names if present.
3088 (rec_fex_parse_elem): Likewise.
3089
3090 * torture/rec-fex/rec-fex-elem-field-name-str.c: Removed.
3091
3092 * torture/rec-field-name/rec-field-name-p.c: Renamed.
3093
3094 * torture/rec-field-name/rec-field-name-normalise.c: Renamed from
3095 rec-field-name-part-normalise.c.
3096
3097 * torture/rec-field-name/rec-field-name-destroy.c: File removed.
3098 * torture/rec-field-name/rec-field-name-str-p.c: Likewise.
3099 * torture/rec-field-name/rec-field-name-size.c: Likewise.
3100 * torture/rec-field-name/rec-field-name-set.c: Likewise.
3101 * torture/rec-field-name/rec-field-name-ref-p.c: Likewise.
3102 * torture/rec-field-name/rec-field-name-new.c: Likewise.
3103 * torture/rec-field-name/rec-field-name-get.c: Likewise.
3104 * torture/rec-field-name/rec-field-name-eql-p.c: Likewise.
3105 * torture/rec-field-name/rec-field-name-dup.c: Likewise.
3106
3107 * torture/rec-field-name/tsuite-rec-field-name.c: Removed test
3108 cases for the no longer existing rec_field_name_* functions.
3109
3110 * utils/recins.c (recins_parse_args): Adapted to the new field
3111 names.
3112 * utils/mdb2rec.c (get_field_name): Likewise.
3113 (process_table): Likewise.
3114 * utils/rec2csv.c (rec2csv_parse_args): Likewise.
3115 (rec2csv_generate_csv): Likewise.
3116 * utils/csv2rec.c (field_cb): Likewise.
3117 * utils/recset.c (recset_process_add): Likewise.
3118 (recset_process_set): Likewise.
3119 (recset_process_ren): Likewise.
3120 (recset_process_del): Likewise.
3121
3122 * utils/recutl.c (recutl_order_by_field): Field name is now a NULL
3123 terminated string.
3124 * utils/recsel.c (recutl_sort_by_field): Likewise.
3125 (recsel_group_by_field): Likewise.
3126
3127 * src/rec-types.c (rec_type_check_int): Get a const char*
3128 argument.
3129 (rec_type_check_bool): Likewise.
3130 (rec_type_check_range): Likewise.
3131 (rec_type_check_real): Likewise.
3132 (rec_type_check_size): Likewise.
3133 (rec_type_check_line): Likewise.
3134 (rec_type_check_regexp): Likewise.
3135 (rec_type_check_date): Likewise.
3136 (rec_type_check_email): Likewise.
3137 (rec_type_check_enum): Likewise.
3138 (rec_type_check_field): Likewise.
3139
3140 * src/rec-crypt.c (rec_encrypt): Get const char* arguments.
3141 (rec_decrypt): Likewise.
3142 (rec_decrypt_field): Likewise.
3143 (rec_decrypt_record): Likewise.
3144 (rec_encrypt_field): Likewise.
3145
3146 * src/rec-sex-parser.c (rec_sex_parser_set_in): Get a const char *
3147 argument.
3148 (rec_sex_parser_run): Likewise.
3149
3150 * src/rec-sex.c (rec_sex_destroy): Be a no-operation if NULL is
3151 passed.
3152 (rec_sex_compile): Get a const char * argument.
3153 (rec_sex_eval_node): Adapted to new field names.
3154
3155 * src/rec-int.c (rec_int_rec_type_p): Get a const char * argument.
3156 (rec_int_rec_type_p): Use REC_FNAME_RE instead of
3157 REC_FNAME_PART_RE.
3158
3159 * src/rec-types.c (rec_type_check): Get a const char * argument.
3160
3161 * src/rec-int.c (rec_int_check_field_type): Simplified, since
3162 there are no compound field names anymore.
3163 (rec_int_check_record_mandatory): Adapted to the new field names.
3164 (rec_int_check_record_unique): Likewise.
3165 (rec_int_check_record_prohibit): Likewise.
3166 (rec_int_check_record_key): Likewise.
3167 (rec_int_check_descriptor): Likewise.
3168
3169 * src/rec-writer.c (rec_writer_destroy): Be a no-operation if NULL
3170 is passed.
3171 (rec_write_field_with_rset): Adapted to the new field names.
3172 (rec_write_field_name): Likewise.
3173 (rec_write_record_with_fex): Likewise.
3174
3175 * src/rec-parser.c (rec_parser_new): Get a const char* argument.
3176 (rec_parser_new_str): Likewise.
3177 (rec_parser_destroy): Be a no-operation if a NULL pointer is
3178 passed.
3179 (rec_parse_field_name): Store the field name in a char string.
3180 (rec_parse_field_name_part): Removed.
3181 (rec_parse_field): Adapted to the new field names.
3182 (rec_parse_field_name_str): Removed.
3183 (rec_parse_field_name_str): Return a char*.
3184 (rec_parse_record_str): Get a const char* argument.
3185
3186 * src/rec-fex.c (struct rec_fex_elem_s): Use a const char* for the
3187 referred field(s) name.
3188 (rec_fex_init): New function.
3189 (rec_fex_destroy): Be a no-operation if a NULL pointed is passed.
3190 (rec_fex_new): Use const chars* for the field names.
3191 (rec_fex_check): Get const char* parameters for the strings.
3192 (rec_fex_size): Return a size_t.
3193 (rec_fex_elem_field_name): Return a const char *.
3194 (rec_fex_elem_set_field_name): Get a const char * argument and
3195 return a boolean denoting out-of-memory.
3196 (rec_fex_elem_field_name_str): Removed.
3197 (rec_fex_member_p): Get a const char * argument for the field
3198 names.
3199 (rec_fex_append): Likewise.
3200 (rec_fex_parse_str_simple): Get const char* arguments for the
3201 strings.
3202 (rec_fex_parse_str_subscripts): Likewise.
3203 (rec_fex_parse_elem): Likewise.
3204
3205 * src/rec-rset.c (struct rec_rset_fprops_s): fname is now a const
3206 char *.
3207 (struct rec_rset_s): order_by_field is now a const char*.
3208 (rec_rset_order_by_field): Return a const char *.
3209 (rec_rset_destroy): Adapted to the new field names.
3210 (rec_rset_dup): Likewise.
3211 (rec_rset_set_type): Likewise.
3212 (rec_rset_rename_field): Likewise.
3213 (rec_rset_field_confidential_p): Likewise.
3214 (rec_rset_get_field_type): Likewise.
3215 (rec_rset_set_order_by_field): Likewise.
3216 (rec_rset_sort): Likewise.
3217 (rec_rset_group): Likewise.
3218 (rec_rset_record_compare_fn): Likewise.
3219 (rec_rset_update_field_props): Likewise.
3220 (rec_rset_get_props): Likewise.
3221 (rec_rset_add_auto_field_int): Likewise.
3222 (rec_rset_add_auto_field_date): Likewise.
3223
3224 * src/rec-field-name.c (rec_field_name_equal_p): New function.
3225
3226 * src/rec-record.c (rec_record_field_p): Get a const char* for the
3227 field name.
3228 (rec_record_get_num_fields_by_name): Likewise.
3229 (rec_record_get_field_by_name): Likewise.
3230 (rec_record_remove_field_by_name): Likewise.
3231 (rec_record_uniq): Adapted to the new field names.
3232
3233 * src/rec-field.c (rec_field_name_str): Removed.
3234 (rec_field_equal_p): Use strcmp to compare field names.
3235 (rec_field_destroy): Be a no-operation if passed a NULL pointer.
3236 (rec_field_init): New function.
3237 (rec_field_new): Adapted to the new field names, and handle out of
3238 memory eventualities.
3239 (rec_field_dup): Likewise.
3240 (rec_field_to_comment): Handle out-of-memory conditions properly.
3241
3242 * src/rec-field-name.c (rec_field_name_normalise): Renamed from
3243 rec_field_name_part_normalise.
3244 (rec_field_name_p): Renamed from rec_field_name_str_p.
3245 (rec_std_field_name_new): Removed.
3246 (rec_field_name_destroy): Likewise.
3247 (rec_field_name_size): Likewise.
3248 (rec_field_name_get): Likewise.
3249 (rec_field_name_set): Likewise.
3250 (rec_field_name_dup): Likewise.
3251 (rec_field_name_eql_p): Likewise.
3252 (rec_field_name_equal_p): Likewise.
3253 (rec_field_name_ref_p): Likewise.
3254 (rec_field_name_str_p): Likewise.
3255 (rec_field_name_part_str_p): Remove
3256 (rec_std_field_name): Return a const char*.
3257
3258 * src/rec.h (REC_FNAME_PART_RE): Removed.
3259 (rec_field_name_*): Function prototypes removed.
3260
3261 * src/rec-field.c (rec_field_s): Change the 'name' field to be a
3262 NULL terminated string.
3263 (rec_field_name): Return a const char*.
3264 (rec_field_set_name): Get the name as a const char * and return a
3265 boolean indicating out-of-memory.
3266 (rec_field_value): Return a const char*.
3267 (rec_field_source): Return a const char*.
3268 (rec_field_set_source): Get a const char * and return a boolean
3269 indicating out-of-memory.
3270 (rec_field_location_str): Return a const char*.
3271 (rec_field_char_location_str): Return a const char*.
3272
3273 2012-02-24 Jose E. Marchesi <jemarch@gnu.org>
3274
3275 src: documentation improvements in the public header.
3276 * src/rec.h: Improve the documentation of the functions related
3277 with the rec_field ADT.
3278
3279 2012-02-22 Jose E. Marchesi <jemarch@gnu.org>
3280
3281 src,utils: handle out-of-memory conditions.
3282 * src/rec-rset.c (rec_rset_add_auto_field_date): Return a boolean
3283 indicating whether there was enough memory to complete the
3284 operation.
3285 (rec_rset_add_auto_field_int): Likewise.
3286 (rec_rset_add_auto_fields): Return a copy of the record set or
3287 NULL in an out-of-memory condition.
3288 (rec_rset_sort): Return a copy of the record set, or NULL in an
3289 out-of-memory condition.
3290
3291 * utils/recsel.c (recsel_process_data): Emit an out of error
3292 message when appropriate.
3293 * utils/recins.c (recins_insert_record): Likewise.
3294 (recins_add_new_record): Likewise.
3295 * utils/recfix.c (recfix_do_auto): Likewise.
3296 (recfix_do_sort): Likewise.
3297 * utils/rec2csv.c (rec2csv_process_data): Likewise.
3298
3299 * src/rec-rset.c (rec_rset_init): New function.
3300 (rec_rset_new): Use rec_rset_init and rec_rset_destroy in
3301 out-of-memory conditions.
3302 (rec_rset_destroy): Be a no-operation if NULL is passed.
3303 (rec_rset_destroy): Also assume that other ADT destructors behave
3304 the same.
3305 (rec_rset_dup): Use rec_rset_init and rec_rset_destroy in
3306 out-of-memory conditions.
3307 (rec_rset_group): Return a copy of RSET or NULL if out of memory.
3308 (rec_rset_merge_records): Return a copy of TO_RECORD, or NULL if
3309 out of memory.
3310
3311 * src/rec-mset.c (rec_mset_destroy): Be a no-op if the passed
3312 pointer is NULL.
3313 (rec_mset_init): New function.
3314 (rec_mset_new): Call to rec_mset_init and rec_mset_destroy if
3315 in an end-of-memory condition.
3316 (rec_mset_dup): Likewise.
3317 (rec_mset_sort): API changed to return false if there is not
3318 enough memory to perform the operation, leaving the original mset
3319 untoched.
3320 (rec_mset_insert_at): Call rec_mset_elem_destroy when out of memory.
3321 (rec_mset_elem_init): New function.
3322 (rec_mset_insert_after): Call rec_mset_elem_destroy when out of
3323 memory.
3324 (rec_mset_add_sorted): Likewise.
3325 (rec_mset_elem_destroy): Be a no-operation if called with NULL.
3326
3327 * src/rec-record.c (rec_record_dup): Use rec_record_init and
3328 rec_record_destroy in out-of-memory conditions.
3329 (rec_record_init): New function.
3330 (rec_record_new): Use rec_record_init.
3331 (rec_record_destroy): Be a no-op if the passed pointer is NULL.
3332
3333 * src/rec-field-name.c (rec_field_name_set): Return false if
3334 strdup returns NULL.
3335
3336 * src/rec-crypt.c (rec_encrypt_field): Return false if strdup
3337 returns NULL.
3338
3339 * src/rec-field.c (rec_field_set_location): Avoid a segmentation
3340 fault if malloc returns NULL.
3341
3342 2012-02-20 Giuseppe Scrivano <giuseppe@southpole.se> (tiny change)
3343
3344 src,utils: fail gracefully on allocation errors.
3345 * src/rec-parser.c (rec_parse_field): Return an error if `new' was
3346 not allocated correctly.
3347 * utils/recsel.c (main): Fail gracefully if `db' was not allocated
3348 correctly.
3349
3350 2012-01-19 Jose E. Marchesi <jemarch@gnu.org>
3351
3352 utils: error reporting must always use recutl_fatal or
3353 recutl_error.
3354 * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Use recutl_fatal
3355 instead of fprintf.
3356 (RECORD_SELECTION_ARGS_CASES): Added a trailing \n to an error
3357 message missing it.
3358
3359 2012-01-17 Jose E. Marchesi <jemarch@gnu.org>
3360
3361 doc: use same optarg names in --help outputs and the manual.
3362 * doc/recutils.texi (recsel Invocation): Use same optarg names
3363 than in the synopsis used in --help.
3364 (recins Invocation): Likewise.
3365 (recdel Invocation): Likewise.
3366 (recset Invocation): Likewise.
3367 * utils/recutl.c (recutl_print_help_record_selection): Likewise.
3368
3369 2012-01-17 Jose E. Marchesi <jemarch@gnu.org>
3370
3371 doc: make the texinfo documentation easier to find.
3372 * man/Makefile.am (rec2csv.1): Use the 'recutils' manual instead
3373 of the name of the utilities.
3374 (csv2rec.1): Likewise.
3375 (mdb2rec.1): Likewise.
3376 (recdel.1): Likewise.
3377 (recfix.1): Likewise.
3378 (recinf.1): Likewise.
3379 (recins.1): Likewise.
3380 (recsel.1): Likewise.
3381 (recset.1): Likewise.
3382 (recfmt.1): Likewise.
3383
3384 * doc/recutils.texi: Entries for the individual utilities in the
3385 info index.
3386
3387 2012-01-16 Jose E. Marchesi <jemarch@gnu.org>
3388
3389 src,utils: fixes of typos in message strings.
3390 * src/rec-int.c (rec_int_check_rset): Use 'shall' instead of
3391 'should' in text messages.
3392 (rec_int_check_descriptor): Likewise.
3393
3394 * utils/recins.c (recutl_print_help): Typos in help strings fixed.
3395
3396 2012-01-15 Jose E. Marchesi <jemarch@gnu.org>
3397
3398 recsel: print an error if an invalid fex is passed to -p,-P or -R.
3399 * utils/recsel.c (recsel_parse_args): Print an error message if an
3400 invalid fex is passed to -p, -P or -R.
3401
3402 2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
3403
3404 manual: documentation of -G,--group-by.
3405 * doc/recutils.texi (recsel Invocation): Documentation of
3406 -G|--group-by.
3407
3408 2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
3409
3410 torture: tests for the group-by operation.
3411 * torture/utils/recsel.sh (group-records): New input file.
3412 (recsel-group-records): New test.
3413 (recsel-group-records-sort): Likewise.
3414 (recsel-group-records-non-existing-field): Likewise.
3415 (recsel-group-one-record): Likewise.
3416 (recsel-group-records-missing): Likewise.
3417
3418 2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
3419
3420 librec,torture: record sorting criteria adjusted to keep the
3421 relative positions of 'equal' records.
3422 * torture/utils/recfix.sh (Bool): Fix expected result to expect
3423 the sorting algorithm to keep the relative order of equal fields.
3424 (unsorted-int-with-equals): New input file.
3425 (unsorted-range-with-equals): Likewise.
3426 (unsorted-real-with-equals): Likewise.
3427 (unsorted-lex-with-equals): Likewise.
3428 (unsorted-date-with-equals): Likewise.
3429 (recfix-sort-ints-with-equals): New test.
3430 (recfix-sort-ranges-with-equals): Likewise.
3431 (recfix-sort-reals-with-equals): Likewise.
3432 (recfix-sort-lex-with-equals): Likewise.
3433 (recfix-sort-dates-with-equals): Likewise.
3434
3435 * src/rec-rset.c (rec_rset_record_compare_fn): Keep the relative
3436 order of 'equal' fields when sorting. This implies a penalty in
3437 performance, but makes the sorting algorithm to show a more
3438 predictable behaviour, especially when using for record grouping.
3439
3440 2012-01-14 Jose E. Marchesi <jemarch@gnu.org>
3441
3442 recsel,librec: implementation of the group-by operation.
3443 * src/rec-rset.c (rec_rset_group): New function.
3444 (rec_rset_merge_records): New function.
3445
3446 * utils/recsel.c (recsel_process_data): Invoke rec_rset_group_by
3447 if a group-by field was specified in the command line.
3448
3449 * src/rec.h: Prototype for rec_rset_group.
3450
3451 * utils/recsel.c (recsel_group_by_field): New global.
3452 (GNU_longOptions): New option --group-by.
3453 (recutl_print_help): Documentation for -G|--group-by.
3454 (recsel_parse_args): Manage -G|--group-by.
3455
3456 2012-01-13 Jose E. Marchesi <jemarch@gnu.org>
3457
3458 Preparation for 1.5.
3459 * utils/recutl.c: Include time.h.
3460
3461 * NEWS: Date updated in the 1.5 entry.
3462
3463 * configure.ac: Version number changed to 1.5.
3464
3465 2012-01-13 Jose E. Marchesi <jemarch@gnu.org>
3466
3467 torture,utils: make the tests run properly in CRLF systems, and
3468 missing header included in recutl.c.
3469 * utils/recutl.c: Include stdint.h, since int32_t is used in the
3470 file.
3471
3472 * torture/utils/testutils.sh: Post-process the output of the tools
3473 to remove CR characters. This avoid the tests to fail when
3474 running in MSDOS or Windows systems. Problem reported and patch
3475 sent by Bruno Haible.
3476
3477 2012-01-13 Jose E. Marchesi <jemarch@gnu.org>
3478
3479 * gnulib update.
3480
3481 2012-01-12 Jose E. Marchesi <jco@terma.com>
3482
3483 librec: enumeration mixing in rec-parser fixed.
3484 * src/rec-parser.c (rec_parser_init_common): Reset parser->error
3485 to REC_PARSER_NOERROR.
3486
3487 2012-01-12 Jose E. Marchesi <jemarch@gnu.org>
3488
3489 Preparation for 1.4.93.
3490 * configure.ac: Version number changed to 1.4.93.
3491
3492 2012-01-12 Jose E. Marchesi <jemarch@gnu.org>
3493
3494 Portability issues with random and variadic macros fixed.
3495 * utils/recutl.c (recutl_index_add_random): Use random_r and
3496 srandom_r instead of random and srandom.
3497 (recutl_index_add_random): Be careful to generate the requested
3498 number of randoms.
3499
3500 * lib/random_r.c: Imported from gnulib.
3501 * m4/random_r.m4: Likewise.
3502
3503 * configure.ac: Require C99 with the macro AC_PROG_CC_C99.
3504
3505 2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
3506
3507 Preparation for 1.4.92.
3508 * configure.ac: Version number changed to 1.4.92.
3509
3510 2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
3511
3512 torture: don't run encryption related tests if crypt support was
3513 not compiled into the library.
3514 * torture/utils/recsel.sh: Run encryption related tests only if
3515 crypt_support is "yes".
3516 It defaults to "yes".
3517
3518 * torture/utils/Makefile.am (TESTS_ENVIRONMENT): Pass
3519 crypt_support to the test scripts.
3520
3521 2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
3522
3523 utils: accept -s|--password only if compiled with encryption
3524 support.
3525 * utils/recutl.h: Define ENCRYPTION_SHORT_ARGS.
3526
3527 * utils/recins.c (recins_parse_args): Likewise.
3528
3529 * utils/recsel.c (recsel_parse_args): Process -s|--password only
3530 if compiled with encryption support.
3531
3532 2012-01-11 Jose E. Marchesi <jemarch@gnu.org>
3533
3534 * gnulib modules fprintf-posix, vasprintf-posix and printf-posix
3535 imported.
3536
3537 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3538
3539 * strcasestr gnulib module imported.
3540 * gnulib update.
3541
3542 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3543
3544 librec,utils: handle the return values of asprintf and fread.
3545 * utils/recutl.c (recutl_read_file): Handle fread errors.
3546
3547 * src/rec-int.c (ADD_ERROR): Don't ignore the value returned by
3548 asprintf.
3549 * utils/rec2csv.c (rec2csv_generate_csv): Likewise.
3550 * src/rec-types.c (rec_type_check_range): Likewise.
3551 (rec_type_check_size): Likewise.
3552 * src/rec-rset.c (rec_rset_add_auto_field_int): Likewise.
3553 * src/rec-parser.c (rec_parser_perror): Likewise.
3554 * src/rec-fex.c (rec_fex_str): Likewise.
3555
3556 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3557
3558 Preparation for 1.4.91.
3559 * configure.ac: Version number changed to 1.4.91.
3560
3561 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3562
3563 librec: compilation problem in remote descriptors support fixed.
3564 * src/rec-int.c (rec_int_merge_remote): Missing variable
3565 tmpfile_des added.
3566
3567 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3568
3569 Preparation for 1.4.90.
3570 * NEWS: Entry for 1.5.
3571
3572 * configure.ac: Version number changed to 1.4.90.
3573 * po/de.po: Updated.
3574 * po/fi.po: Likewise.
3575 * po/nl.po: Likewise.
3576 * po/recutils.pot: Likewise.
3577 * po/sv.po: Likewise.
3578
3579 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3580
3581 Warning fixes.
3582 * utils/recfmt.c (recfmt_process_db): Useless variable rset_size
3583 removed.
3584
3585 * src/rec-mset.c (rec_mset_dup): Useless variable new_elem
3586 removed.
3587 (rec_mset_sort): Likewise.
3588 (rec_mset_dump): Use %zd in printf to print size_t values.
3589 * utils/recinf.c (print_info_file): Likewise.
3590 * src/rec-int.c (rec_int_check_rset): Likewise.
3591 (rec_int_check_descriptor): Likewise.
3592
3593 * libcsv/libcsv.c: Copyright year update.
3594
3595 2012-01-10 Jose E. Marchesi <jco@terma.com>
3596
3597 * doc/recutils.texi: FSF copyright years updated in recutils.texi.
3598
3599 2012-01-10 Jose E. Marchesi <jemach@gnu.org>
3600
3601 Removal of warnings.
3602 * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Likewise.
3603
3604 * utils/recutl.c (recutl_index_list_parse): Likewise.
3605
3606 * src/rec-fex.c (rec_fex_check): Likewise.
3607
3608 * src/rec-int.c (rec_int_merge_remote): Likewise.
3609
3610 * src/rec-rset.c (rec_rset_rename_field): Likewise.
3611
3612 * src/rec-record.c (rec_record_subset_p): Unused variables removed.
3613 (rec_record_uniq): Likewise.
3614
3615 * src/rec-types.c (rec_type_check_re): Unused function removed.
3616
3617 * src/rec-field-name.c: Include rec-utils.h.
3618
3619 * src/rec-mset.c (rec_mset_iterator_next): Unused variable removed.
3620
3621 2012-01-10 Jose E. Marchesi <jemarch@gnu.org>
3622
3623 Unit tests fixes.
3624 * src/rec-writer.c (rec_write_field_with_rset): Don't write the
3625 blank character before field values if printin sexps.
3626
3627 * torture/rec-field/rec-field-to-comment.c
3628 (rec_field_to_comment_nominal): Adjusted to the new behaviour of
3629 the writer with fields having empty values.
3630
3631 2012-01-09 Jose E. Marchesi <jemarch@gnu.org>
3632
3633 librec: rec_mset_append gets an extra argument indicating the
3634 type of element for counting.
3635 * src/rec-mset.c (rec_mset_append): Get an argument elem_type.
3636 (rec_mset_dup): Use new rec_mset_append.
3637
3638 * src/rec.h: New argument elem_type to rec_mset_append.
3639
3640 * utils/recset.c (recset_process_add): Likewise.
3641 (recset_process_set): Likewise.
3642 * utils/recins.c (recins_insert_record): Likewise.
3643 (recins_parse_args): Likewise.
3644 * utils/mdb2rec.c (process_table): Likewise.
3645 (process_table): Likewise.
3646 * utils/csv2rec.c (field_cb): Likewise.
3647 (record_cb): Likewise.
3648 * src/rec-int.c (rec_int_merge_remote): Likewise.
3649 * src/rec-parser.c (rec_parse_record): Likewise.
3650 (rec_parse_record): Likewise.
3651 (rec_parse_record): Likewise.
3652 * src/rec-rset.c (rec_rset_set_type): Likewise.
3653
3654 2012-01-09 Jose E. Marchesi <jemarch@gnu.org>
3655
3656 torture: adapt unit tests to the new librec api.
3657 * torture/rec-parser/rec-parse-record.c: Adapted to the new librec
3658 API.
3659 * torture/rec-writer/rec-write-db.c: Likewise.
3660 * torture/rec-writer/rec-write-record-with-fex.c: Likewise.
3661 * torture/rec-writer/rec-write-rset.c: Likewise.
3662 * torture/rec-writer/rec-write-record.c: Likewise.
3663 * torture/rec-parser/rec-parse-record-str.c: Likewise.
3664
3665 2012-01-09 Jose E. Marchesi <jemarch@gnu.org>
3666
3667 algol68: dist problem fixed.
3668 * algol68/Makefile.am (nodist_librec_a68_a_SOURCES): Don't
3669 distribute the generated C files from the algol68 sources.
3670
3671 2012-01-09 Jose E. Marchesi <jco@terma.com>
3672
3673 torture: get some unit tests up to date.
3674 * torture/Makefile.am (REC_MSET_TSUITE): rec-mset-get.c renamed to
3675 rec-mset-get-at.c.
3676
3677 * torture/rec-mset/rec-mset-get.c (rec_mset_get_empty): Likewise.
3678
3679 * torture/rec-mset/rec-mset-count.c: Include rec.h instead of
3680 rec-mset.h.
3681 (rec_mset_count_existing): Adapted to the new mset semantics.
3682
3683 * torture/rec-mset/rec-mset-type-p.c: Likewise.
3684 * torture/rec-mset/rec-mset-register-type.c: Likewise.
3685 * torture/rec-mset/rec-mset-new.c: Likewise.
3686 * torture/rec-mset/rec-mset-get.c: Likewise.
3687 * torture/rec-mset/rec-mset-dup.c: Likewise.
3688 (rec_mset_dup_nonempty): Adapted to the new mset semantics.
3689
3690 2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
3691
3692 utils: support for the selection of random records in recsel,
3693 recins, recdel and recset.
3694 * torture/utils/recset.sh (recset-random-all): New test.
3695 (recset-random-one): Likewise.
3696
3697 * torture/utils/recdel.sh (recdel-random-all): New test.
3698 (recdel-random-all-force): Likewise.
3699
3700 * torture/utils/recins.sh (one-record): New input file.
3701 (recins-random-all): New test.
3702 (recins-random-one): Likewise.
3703
3704 * torture/utils/recsel.sh (recsel-random-all): New test.
3705 (recsel-random-one): Likewise.
3706 (recsel-num-and-random): Likewise.
3707 (recsel-sex-and-random): Likewise.
3708 (recsel-quick-and-random): Likewise.
3709
3710 * doc/recutils.texi (recsel Invocation): --random|-m documented.
3711 (recins Invocation): Likewise.
3712 (recdel Invocation): Likewise.
3713 (recset Invocation): Likewise.
3714
3715 * utils/recset.c (recutl_random): New global.
3716 (recset_process_actions): Manage random records.
3717
3718 * utils/recdel.c (recutl_random): New global.
3719 (recdel_delete_records): Manage random records.
3720 (recutl_print_help): Document --random|-r.
3721
3722 * utils/recins.c (recutl_random): New global.
3723 (recins_add_new_record): Manage random records.
3724
3725 * doc/recutils.texi (recins Invocation): Likewise.
3726
3727 * utils/recsel.c (recsel_process_data): Manage random indexes.
3728
3729 * utils/recutl.c (recutl_reset_indexes): New function.
3730
3731 * utils/recsel.c (recutl_print_help): Synopsis updated with -r.
3732
3733 * utils/recutl.h (RECORD_SELECTION_ARGS): RANDOM_ARG added.
3734 (RECORD_SELECTION_LONG_ARGS): Entry for random.
3735 (RECORD_SELECTION_SHORT_ARGS): Likewise.
3736
3737 * utils/recsel.c (recutl_random): New global.
3738
3739 * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Manage
3740 --random|-r.
3741
3742 * utils/recutl.c (recutl_index_add_random): New function.
3743 (recutl_print_help_record_selection): Documentation for
3744 --random|-r.
3745 (recutl_random): New global variable.
3746
3747 * utils/recutl.h (recutl_index_add_random): New function
3748 prototype.
3749
3750 2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
3751
3752 recutl: remove an arbitrary limit in the number of indexes.
3753 * utils/recutl.c (recutl_index_s): New structure.
3754 (recutl_index_list_parse): Allocate the indexes list dynamically.
3755
3756 2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
3757
3758 Copyright years update.
3759 * utils/recutl.c (recutl_print_version): Copyright updated.
3760 * doc/recutils.texi: Likewise.
3761
3762 2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
3763
3764 manual: documentation for the new indexes system.
3765 * utils/recsel.c (recutl_print_help): Documentation updated.
3766 * utils/recutl.c (recutl_print_help_record_selection): Likewise.
3767
3768 * doc/recutils.texi (recsel Invocation): Update description of -n.
3769 (recins Invocation): Likewise.
3770 (recdel Invocation): Likewise.
3771 (recset Invocation): Likewise.
3772
3773 2012-01-08 Jose E. Marchesi <jemarch@gnu.org>
3774
3775 torture: tests for the new indexes system.
3776 * utils/recins.c (recins_add_new_record): Dup the record to
3777 insert, since it could be used to replace more than one record.
3778
3779 * torture/utils/recins.sh (recins-replace-range): New test.
3780 (recins-replace-several-indexes): Likewise.
3781
3782 * torture/utils/recset.sh (recset-set-field-in-range): New test.
3783 (recset-set-field-in-several-indexes): Likewise.
3784
3785 * torture/utils/recsel.sh (recsel-index-toobig): New test.
3786 (recsel-index-range-1): Likewise.
3787 (recsel-index-range-2): Likewise.
3788 (recsel-index-range-3): Likewise.
3789 (recsel-index-several): Likewise.
3790 (recsel-index-invalid-1): Likewise.
3791 (recsel-index-invalid-2): Likewise.
3792 (recsel-index-invalid-3): Likewise.
3793 (recsel-index-invalid-4): Likewise.
3794
3795 2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
3796
3797 utils: support for lists of indexes including ranges.
3798 * utils/recset.c (recutl_num): Global variable removed.
3799 (recset_process_actions): Use the new indexes system.
3800 (recset_process_ren): Likewise.
3801
3802 * utils/recins.c (recutl_num): Global variable removed.
3803 (recins_add_new_record): Use the new indexes system.
3804
3805 * utils/recdel.c (recutl_num): Global variable removed.
3806 (recdel_delete_records): Use new indexes system.
3807 (recdel_parse_args): Likewise.
3808 (main): Likewise.
3809
3810 * utils/recsel.c (recsel_process_data): Use new indexes system.
3811
3812 * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Use
3813 recutl_index_list_parse to handle -n.
3814
3815 * utils/recutl.c (recutl_num_indexes): New function.
3816 (recutl_index_p): New function.
3817
3818 * utils/recsel.c (recutl_num): Global variable deleted.
3819
3820 * utils/recutl.c (INDEX_LIST_ENTRY_RE): New constant.
3821 (INDEX_LIST_RE): Likewise.
3822 (recutl_index_list_parse): New function.
3823
3824 * utils/recutl.h (recutl_index_list_s): New structure.
3825
3826 2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
3827
3828 recins: implement the auto fields using the rec_rset facilities.
3829 * utils/recins.c (recins_add_auto_field_int): Function deleted.
3830 (recins_add_auto_field_date): Likewise.
3831 (recins_add_auto_fields): Likewise.
3832 (recins_insert_record): Use rec_rset_add_auto_fields instead of
3833 recins_add_auto_fields.
3834 (recins_insert_record): Likewise.
3835
3836 2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
3837
3838 recfix: New operation --auto.
3839 * torture/utils/recfix.sh (missing-auto-fields): New input file.
3840 (recfix-missing-auto-fields): New test.
3841
3842 * doc/recutils.texi (recfix Invocation): Documentation for the
3843 --auto operation.
3844 (recfix Examples): Example with --auto added.
3845
3846 * utils/recfix.c (recfix_op): RECFIX_OP_AUTO.
3847 (GNU_longOptions): Entry for --auto.
3848 (recutl_print_help): Documentation for --auto.
3849 (recfix_parse_args): Handle the --auto operation.
3850 (main): Likewise.
3851
3852 * src/rec-rset.c (rec_rset_add_auto_fields): New function.
3853 (rec_rset_add_auto_field_int): Likewise.
3854 (rec_rset_add_auto_field_date): Likewise.
3855 Include errno.h and locale.h.
3856
3857 * utils/recfix.c (recfix_do_auto): New function.
3858
3859 2012-01-07 Jose E. Marchesi <jemarch@gnu.org>
3860
3861 recsel: Support for --uniq|-U.
3862 * torture/utils/recsel.sh (duplicated-fields): New input file.
3863 (recsel-uniq): New test.
3864 (recsel-uniq-long): New test.
3865
3866 * doc/recutils.texi (recsel Invocation): Documentation for
3867 --uniq|-U.
3868
3869 * utils/recsel.c (GNU_longOptions): New command line argument
3870 --uniq|-U.
3871 (recutl_print_help): Documentation for --uniq|-U.
3872 (recsel_parse_args): Handle --uniq|-U.
3873 (recsel_uniq): New global.
3874 (recsel_process_data): Remove duplicated fields in the processed
3875 records if requested by the user with --uniq|-U.
3876
3877 2012-01-04 Jose E. Marchesi <jemarch@gnu.org>
3878
3879 librec: Initial implementation of the rec_record_uniq function.
3880 * src/rec-record.c (rec_record_uniq): New function.
3881
3882 * src/rec.h: Prototype for rec_record_uniq.
3883
3884 2012-01-02 Jose E. Marchesi <jemarch@gnu.org>
3885
3886 mset: disposal callback is now actually used. Memory leak fixed.
3887 * src/rec-mset.c (rec_mset_elem_destroy): Dispose the data stored
3888 in elements upon removal.
3889
3890 2012-01-02 Jose E. Marchesi <jemarch@gnu.org>
3891
3892 librec: improved sort support.
3893 * src/rec-record.c (rec_record_dup): Don't pass a 'sorted'
3894 argument to rec_mset_dup.
3895 * src/rec-rset.c (rec_rset_dup): Likewise.
3896 (rec_rset_sort): Use rec_mset_sort.
3897
3898 * src/rec-mset.c (rec_mset_sort): New function.
3899 (rec_mset_dup): Don't sort.
3900
3901 * src/rec.h: New prototype for rec_mset_sort, and rec_mset_dup
3902 modified to not get the 'sorted' argument.
3903
3904 2011-12-28 Jose E. Marchesi <jemarch@gnu.org>
3905
3906 writer: don't write a blank after the field name if the field
3907 value is empty.
3908 * torture/utils/recsel.sh (empty-field-values): New input file.
3909 (recsel-empty-field-values): New test.
3910
3911 * src/rec-writer.c (rec_write_field_with_rset): Print a blank
3912 after the field name only if the field value is not the empty
3913 string.
3914
3915 2011-12-28 Jose E. Marchesi <jemarch@gnu.org>
3916
3917 torture: system tests for csv2rec.
3918 * torture/utils/csv2rec.sh: New file.
3919 (simple-table): New input file.
3920 (csv2rec-simple-table): New test.
3921 (simple-table-quotes): New input file.
3922 (csv2rec-simple-table-quotes): New test.
3923 (empty-columns): New input file.
3924 (csv2rec-empty-columns): New test.
3925 (csv2rec-empty-columns-omit): Likewise.
3926 (multi-line): New input file.
3927 (csv2rec-multi-line): New test.
3928
3929 * torture/utils/Makefile.am (TESTS): csv2rec.sh added.
3930
3931 2011-12-28 Jose E. Marchesi <jemarch@gnu.org>
3932
3933 * src/rec.h: Documentation for the rec_int_check_* functions.
3934
3935 2011-12-26 Jose E. Marchesi <jemarch@gnu.org>
3936
3937 librec,utils: new sorting mechanism on top of the new mset
3938 implementation.
3939 * torture/utils/rec2csv.sh (sort): New input file.
3940 (rec2csv-sort): New test.
3941 (rec2csv-sort-field): Likewise.
3942
3943 * src/rec-rset.c (rec_rset_record_compare_fn): Incorrect results
3944 were being calculated if a non-existing field was given to -S.
3945
3946 * torture/utils/recsel.sh (sort): New input file.
3947 (recsel-sort): New test.
3948 (recsel-sort-field): Likewise.
3949 (recsel-sort-field-nonexist): Likewise.
3950
3951 * utils/recfix.c (recfix_do_sort): Rewritten to use rec_rset_sort.
3952 * utils/rec2csv.c (rec2csv_process_data): Likewise.
3953 * utils/recsel.c (recsel_process_data): Likewise.
3954
3955 * src/rec-rset.c (struct rec_rset_s): Field ordered removed.
3956 (rec_rset_set_ordered): Function removed.
3957 (rec_rset_ordered): Function removed.
3958
3959 * utils/rec2csv.c (rec2csv_parse_args): Likewise.
3960
3961 * utils/recfmt.c (main): Likewise.
3962
3963 * utils/recfix.c (recfix_do_sort): Likewise.
3964
3965 * utils/recsel.c (recsel_parse_args): Don't use a sorting parser.
3966
3967 * utils/recutl.c (recutl_sorting_parser): Function removed.
3968
3969 * src/rec-parser.c (struct rec_parser_s): Fiels related with
3970 sorting removed.
3971 (rec_parse_rset): Don't sort.
3972 (rec_parser_set_ordered): Function removed.
3973 (rec_parser_ordered): Likewise.
3974 (rec_parser_sort_rset): Likewise.
3975
3976 * src/rec-record.c (rec_record_dup): Pass sorted=false to
3977 rec_mset_dup.
3978
3979 * src/rec-mset.c (rec_mset_dup): Take a new parameter 'sort'.
3980
3981 2011-12-25 Jose E. Marchesi <jemarch@gnu.org>
3982
3983 mset,recins: fix some problems on the removal of elements.
3984 * src/rec-mset.c (rec_mset_remove_elem): Update statistics.
3985 (rec_mset_remove_at): Don't update statistics, because
3986 rec_mset_remove_elem already does that internally.
3987
3988 * utils/recins.c (recins_add_new_record): Fix the replace of
3989 selected record using the provided record.
3990
3991 2011-12-25 Jose E. Marchesi <jemarch@gnu.org>
3992
3993 utils: missing rec_record_set_container added.
3994 * utils/mdb2rec.c (process_table): Set the rset container in the
3995 record to insert.
3996 * utils/recins.c (recins_insert_record): Likewise.
3997
3998 2011-12-25 Jose E. Marchesi <jemarch@gnu.org>
3999
4000 librec,utils: new mset iterators and API used in the codebase.
4001 * utils/mdb2rec.c (process_table): Use rec_mset_append.
4002
4003 * utils/rec2csv.c (rec2csv_generate_csv): Use iterators.
4004 (rec2csv_determine_fields): Likewise.
4005
4006 * utils/csv2rec.c (field_cb): Use rec_mset_append.
4007 (record_cb): Likewise.
4008
4009 * utils/recfix.c (recfix_do_crypt): Use iterators.
4010 * utils/recfmt.c (recfmt_process_db): Likewise.
4011
4012 * utils/recset.c (recset_process_actions): Use iterators.
4013 (recset_process_add): Use rec_mset_append.
4014 (recset_process_set): Likewise.
4015
4016 * src/rec-mset.c (rec_mset_elem_destroy): Don't invoke the
4017 disposal callback, since that is executed as part of
4018 gl_list_remove_node.
4019 (rec_mset_elem_set_type): New function.
4020 (rec_mset_iterator_next): Update the list_node field of the mset
4021 elements retrieved by iterating the list.
4022
4023 * utils/recins.c (recins_add_auto_field_int): Use iterators and
4024 new mset API.
4025 (recins_add_auto_field_date): Likewise.
4026 (recins_insert_record): Likewise.
4027 (recins_parse_args): Likewise.
4028 (recins_add_new_record): Likewise.
4029
4030 * src/rec-parser.c (rec_parse_rset): Set the container for new
4031 records.
4032
4033 * src/rec-record.c (rec_record_s): New field 'container' to hold a
4034 pointer managed by the user of the record.
4035 (rec_record_new): Initialize the container pointer.
4036 (rec_record_dup): Copy the container pointer.
4037 (rec_record_container): New function.
4038 (rec_record_set_container): New function.
4039
4040 * utils/recsel.c (recsel_process_data): Use iterators.
4041
4042 * src/rec-parser.c (rec_parse_rset): Use mset functions.
4043 (rec_parse_record): Likewise.
4044
4045 * src/rec-sex.c (rec_sex_eval): Use iterators.
4046
4047 * src/rec-int.c (rec_int_check_rset): Use iterators.
4048 (rec_int_check_record_types): Likewise.
4049 (rec_int_check_record_secrets): Likewise.
4050 (rec_int_check_record_key): Likewise.
4051 (rec_int_check_descriptor): Likewise.
4052 (rec_int_merge_remote): Likewise.
4053
4054 * src/rec-writer.c (rec_write_record_with_rset): Use iterators.
4055 (rec_write_rset): Likewise.
4056
4057 * src/rec-rset.c (rec_rset_num_elems): Return a size_t type.
4058 (rec_rset_num_records): Likewise.
4059 (rec_rset_num_comments): Likewise.
4060 (rec_rset_mset): New function.
4061 (rec_rset_update_field_props): Use iterators.
4062 (rec_rset_update_types): Likewise.
4063
4064 * src/rec-record.c (rec_record_get_num_fields_by_name): Use
4065 iterators.
4066 (rec_record_get_field_by_name): Likewise.
4067
4068 * src/rec-mset.c (rec_mset_search): Use iterators.
4069
4070 * src/rec-record.c (rec_record_get_field_index): Use iterators.
4071 (rec_record_get_field_index_by_name): Likewise.
4072 (rec_record_contains_value): Likewise.
4073 (rec_record_get_field): Function removed.
4074 (rec_record_get_comment): Likewise.
4075 (rec_record_remove_at): Likewise.
4076
4077 * src/rec-mset.c (rec_mset_iter_gl2mset): New function.
4078 (rec_mset_iter_mset2gl): Likewise.
4079 (rec_mset_iterator_next): Use gl2mset and mset2gl instead of
4080 memcpy.
4081
4082 * src/rec-rset.c (rec_rset_rename_field): Use iterators.
4083
4084 * src/rec-record.c (rec_record_new): Note about MSET_FIELD and
4085 MSET_COMMENT added.
4086 (rec_record_subset_p): Rewritten to use mset iterators.
4087 (rec_record_mset): New function.
4088 (rec_record_get_elem): Function removed.
4089
4090 * src/rec.h (MSET_FIELD): New constant.
4091 (MSET_COMMENT): Likewise.
4092
4093 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4094
4095 * src/rec.h: Comments API properly documented.
4096
4097 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4098
4099 mset: implementation of iterators ala gl_lib.
4100 * src/rec-mset.c (rec_mset_iterator): New function.
4101 (rec_mset_iterator_next): Likewise.
4102 (rec_mset_iterator_free): Likewise.
4103
4104 * src/rec.h: Prototypes for new functions related to iterators:
4105 rec_mset_iterator, rec_mset_iterator_next and
4106 rec_mset_iterator_free.
4107
4108 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4109
4110 mset: use an explicit type for element types.
4111 * src/rec-mset.c (struct rec_mset_elem_s): Use rec_mset_type_t.
4112 (struct rec_mset_s): count is now of type size_t.
4113 (rec_mset_get_at): Use new types.
4114 (rec_mset_remove_at): Likewise.
4115 (rec_mset_insert_at): Likewise.
4116 (rec_mset_type_p): Likewise.
4117 (rec_mset_register_type): Likewise.
4118 (rec_mset_count): Likewise.
4119 (rec_mset_get_at): Likewise.
4120 (rec_mset_first): Likewise.
4121 (rec_mset_next): Likewise.
4122
4123 * src/rec.h: Change mset functions using positions to use size_t
4124 variables instead of ints.
4125 (rec_mset_type_t): New data type.
4126
4127 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4128
4129 src: move the stuff of rec-mset.h to rec.h and document the API.
4130 * src/rec-record.c: Stop including rec-mset.h.
4131 * src/rec-rset.c: Likewise.
4132
4133 * src/rec-mset.c: Include rec.h instead of rec-mset.h.
4134
4135 * src/Makefile.am (librec_la_SOURCES): rec-mset.h removed.
4136
4137 * src/rec-mset.h: File deleted.
4138
4139 * src/rec.h: Stuff from rec-mset.h moved there.
4140 (rec_mset_new): New prototype, and documented.
4141 (rec_mset_destroy): Likewise.
4142 (rec_mset_dup): Likewise.
4143 (rec_mset_type_p): Likewise.
4144 (rec_mset_register_type): Likewise.
4145 (rec_mset_get_at): Likewise.
4146 (rec_mset_insert_at): Likewise.
4147 (rec_mset_append): Likewise.
4148 (rec_mset_add_sorted): Likewise.
4149 (rec_mset_insert_after): Likewise.
4150 (rec_mset_remove_at): Likewise.
4151 (rec_mset_remove): Likewise.
4152 (rec_mset_search): Likewise.
4153 (rec_mset_first): Likewise.
4154 (rec_mset_next): Likewise.
4155 (rec_mset_elem_new): Likewise.
4156 (rec_mset_elem_destroy): Likewise.
4157 (rec_mset_elem_type): Likewise.
4158 (rec_mset_elem_data): Likewise.
4159 (rec_mset_elem_set_data): Likewise.
4160 (rec_mset_elem_equal_p): Likewise.
4161
4162 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4163
4164 mset: several optimizations.
4165 * src/rec-rset.c (rec_rset_get_elem): Likewise.
4166 (rec_rset_get_record): Likewise.
4167 (rec_rset_get_comment): Likewise.
4168
4169 * src/rec-record.c (rec_record_get_elem): rec_mset_get is now
4170 called rec_mset_get_at.
4171 (rec_record_get_field): Likewise.
4172 (rec_record_get_comment): Likewise.
4173
4174 * src/rec-mset.c (rec_mset_remove_at): Use gl_list_get_at instead
4175 of gl_list_remove_at.
4176 (rec_mset_get): Optimization when the requested element is of any
4177 type.
4178 (rec_mset_get_at): Renamed from rec_mset_get.
4179
4180 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4181
4182 torture: xfail tests failing are reported as failures.
4183 * torture/utils/testutils.sh: Accumulate an error if an xfail test
4184 does not fail.
4185
4186 2011-12-22 Jose E. Marchesi <jemarch@gnu.org>
4187
4188 src: auto fields not having an explicit type are now implicitly
4189 typed as integers.
4190 * doc/recutils.texi (%auto): Document that auto fields are
4191 integers by default.
4192
4193 * torture/utils/recins.sh (auto-notype): New input file.
4194 (recins-auto-notype): New test.
4195
4196 * torture/utils/recfix.sh (recfix-auto-notype): Adapted to new
4197 semantics.
4198 (auto-invalid-type): New input file.
4199 (recfix-auto-invalid-type): New test.
4200
4201 * src/rec-rset.c (rec_rset_update_field_props): Auto fields not
4202 having an explicit type are implicitly typed as integers.
4203
4204 2011-12-20 Jose Marchesi <jco@wilhelm>
4205
4206 Tasktool operations.
4207 * TODO: Task 20 resolved to 'DISCARDED'.
4208 Note added for task 24.
4209 Task 16 resolved to 'DISCARDED'.
4210 Task 10 edited.
4211 Task 35 resolved to 'DONE'.
4212 Task 26 resolved to 'DONE'.
4213
4214 2011-12-20 Jose E. Marchesi <jco@terma.com>
4215
4216 recfix: interactive password prompt.
4217 * doc/recutils.texi (recfix Invocation): Document the interactive
4218 behaviour of recfix when it needs a password.
4219
4220 * utils/recfix.c (recfix_parse_args): Prompt for a password to the
4221 user if needed, and ignore empty passwords.
4222
4223 2011-12-20 Jose E. Marchesi <jco@terma.com>
4224
4225 recins: avoid code duplication in encryption code.
4226 * utils/recins.c (recins_encrypt_record): New function.
4227 (recins_insert_record): Use recins_encrypt_record.
4228 (recins_add_new_record): Likewise.
4229
4230 2011-12-20 Jose E. Marchesi <jco@terma.com>
4231
4232 utils: interactive password prompt in recins.
4233 * doc/recutils.texi (recins Encryption): Document the interactive
4234 behaviour of recins when it needs a password.
4235
4236 * utils/recins.c (recins_insert_record): Prompt for a password to
4237 the user if needed, and ignore empty passwords.
4238 (recins_add_new_record): Likewise.
4239
4240 2011-12-20 Jose E. Marchesi <jco@terma.com>
4241
4242 utils: interactive password prompt in recsel.
4243 * utils/recsel.c (recsel_process_data): Use the provided password
4244 only if it not the empty string.
4245
4246 * doc/recutils.texi (recsel Encryption): Document the interactive
4247 behaviour of recsel when it needs a password.
4248
4249 * utils/recsel.c (recsel_process_data): Ask for a password if
4250 recsel was called interactively, a password is needed and -s was
4251 provided alone.
4252 (GNU_longOptions): allow optional arguments to PASSWORD_ARG.
4253
4254 * utils/recutl.c: New global variable recutl_interactive_p.
4255 (recutl_interactive): New function.
4256 (recutl_init): Initialize recutl_interactive.
4257
4258 2011-12-20 Jose E. Marchesi <jemarch@gnu.org>
4259
4260 * gnulib module getpass-gnu imported.
4261
4262 2011-12-20 Jose E. Marchesi <jemarch@gnu.org>
4263
4264 src: support for hexadecimal and octal literals in selection
4265 expressions.
4266 * doc/recutils.texi (SEX Operands): Document the usage of
4267 hexadecimal and octal literals in selection expressions.
4268
4269 * torture/utils/recsel.sh (recsel-sex-integer-equal-hex): New
4270 test.
4271 (recsel-sex-integer-equal-oct): Likewise.
4272
4273 * src/rec-sex-lex.l: Modified to recognize hexadecimal and octal
4274 literals as integers.
4275
4276 2011-12-19 Jose E. Marchesi <jemarch@gnu.org>
4277
4278 src: support for hexadecimal and octal numbers in type
4279 descriptions, field values and %size entries.
4280 * doc/recutils.texi (%size): Mention that hexadecimal and octal
4281 numbers can be used in %size entries.
4282
4283 * src/rec-utils.h (REC_INT_SIZE_RE): Rewritten to allow hex and
4284 octal constants.
4285
4286 * torture/utils/recfix.sh (size-exact-hex): New input file.
4287 (size-exact-oct): Likewise.
4288 (recfix-size-exact-hex): New test.
4289 (recfix-size-exact-oct): Likewise.
4290
4291 * doc/recutils.texi (Escalar types): Document that hexadecimal and
4292 octal numbers can be used to define ranges.
4293 (String types): Ditto for 'size' types.
4294
4295 * src/rec-types.c (rec_type_parse_size): Make sure the user
4296 specified type is not negative.
4297
4298 * torture/utils/recfix.sh (ranges-hex-invalid): New input file.
4299 (recfix-range-hex-xfail): New test.
4300 (ranges-oct-ok): New input file.
4301 (ranges-oct-invalid): Likewise.
4302 (recfix-range-oct-ok): New test.
4303 (recfix-range-oct-xfail): Likewise.
4304 (type-size-valid): New input file.
4305 (type-size-valid-hex): Likewise.
4306 (type-size-valid-oct): Likewise.
4307 (type-size-invalid): Likewise.
4308 (type-size-invalid-negative): Likewise.
4309 (recfix-type-size-valid): New test.
4310 (recfix-type-size-valid-hex): Likewise.
4311 (recfix-type-size-valid-oct): Likewise.
4312 (recfix-type-size-invalid): Likewise.
4313 (recfix-type-size-invalid-negative): Likewise.
4314
4315 * src/rec-utils.c (rec_parse_int): Support hexadecimal numbers.
4316
4317 * src/rec-types.c (REC_TYPE_INT_RE): New constant.
4318 (REC_TYPE_RANGE_DESCR_RE): Use REC_TYPE_INT_RE.
4319 (REC_TYPE_SIZE_DESCR_RE): Likewise.
4320
4321 * torture/utils/recfix.sh (type-int-valid): Add integers in both
4322 hexadecimal and octal formats.
4323 (type-int-invalid): Likewise.
4324 (ranges-hex-ok): New input file.
4325 (recfix-ranges-hex-ok): New test.
4326
4327 * src/rec-types.c (REC_TYPE_INT_VALUE_RE): Allow letters a-f and
4328 A-F in hexadecimal constants.
4329
4330 2011-12-10 Jose E. Marchesi <jemarch@gnu.org>
4331
4332 src,utils: initial support for hexadecimal and octal numbers.
4333 * src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Use
4334 REC_TYPE_INT_VALUE_RE.
4335 (REC_TYPE_SIZE_DESCR_RE): Likewise.
4336
4337 * src/rec-int.c (rec_int_check_descriptor): Error message fixed.
4338
4339 * doc/recutils.texi (Escalar types): Document octal and
4340 hexadecimal numbers.
4341
4342 * src/rec-types.c (REC_TYPE_INT_VALUE_RE): Modified to allow a 0x
4343 prefix.
4344
4345 * src/rec-utils.c (rec_atoi): Pass 'base' as 0 to strtol to
4346 support numbers in hexadecimal and octal representation.
4347
4348 2011-12-19 Jose E. Marchesi <jco@terma.com>
4349
4350 utils: make recfix to exit with an error status if there is a
4351 parse error.
4352 * utils/recutl.c (recutl_parse_db_from_file): Return 'false' if a
4353 syntax error is found by the parser.
4354
4355 2011-12-06 Jose E. Marchesi <jemarch@gnu.org>
4356
4357 src: allow tabs in blank lines between records.
4358 * src/rec-parser.c (rec_parse_rset): Make the parser to ignore
4359 tabs appearing between records.
4360
4361 2011-12-05 Jose E. Marchesi <jemarch@gnu.org>
4362
4363 src: support for several numeration bases in rec_atoi.
4364 * src/rec-utils.c (rec_parse_int): Likewise.
4365
4366 * src/rec-sex-lex.l (rec_sex_lex_extract_index): Likewise.
4367
4368 * src/rec-sex.c (ATOI_VAL): Likewise.
4369 (rec_sex_op_real_p): Likewise.
4370
4371 * src/rec-rset.c (rec_rset_record_compare_fn): Pass the base
4372 argument to rec_atoi.
4373
4374 * src/rec-utils.c (rec_atoi): Get a new argument with the base of
4375 the number.
4376
4377 2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
4378
4379 librec: use rec_match intead of regex functions.
4380 * src/rec-fex.c (rec_fex_check): Use rec_match instead of
4381 regcomp/regexec.
4382
4383 2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
4384
4385 qa: syntax fixes.
4386 * algol68/rec.a68: Trailing blanks removed.
4387
4388 * .x-sc_prohibit_xalloc_without_use: New file.
4389
4390 2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
4391
4392 utils,librec: encrypted fields are now decrypted when using field
4393 expressions in recsel.
4394 * torture/utils/recsel.sh (confidential): New input file.
4395 (recsel-confidential): New test.
4396 (recsel-confidential-fex): New test.
4397 (recsel-confidential-fex-value): New test.
4398 (recsel-confidential-num): New test.
4399
4400 * utils/recsel.c (recsel_process_data): Pass recsel_password to
4401 recutl_eval_field_expression.
4402
4403 * utils/recutl.c (recutl_eval_field_expression): Get a new
4404 argument, 'password'.
4405 (recutl_eval_field_expression): Set the passed password, if any,
4406 to decrypt confidential fields.
4407
4408 * src/rec-writer.c (rec_write_record_with_fex): Decrypt
4409 confidential fields before printing them out.
4410
4411 2011-11-27 Jose E. Marchesi <jemarch@gnu.org>
4412
4413 librec: initialize passwords in writers, and avoid code
4414 replication.
4415 * src/rec-writer.c (rec_writer_new_str): Initialize the password
4416 field to NULL.
4417 (rec_writer_new_common): New function.
4418 (rec_writer_new): Use rec_writer_new_common.
4419 (rec_writer_new_str): Likewise.
4420
4421 2011-11-26 Jose E. Marchesi <jemarch@gnu.org>
4422
4423 Distribution fixes.
4424 * etc/Makefile.am (dist_lisp_DATA): Install and distribute
4425 ob-rec.el.
4426
4427 * README-dev: Remove information incorrectly copied from the
4428 libgnupdf README-dev file.
4429
4430 2011-11-23 Jose E. Marchesi <jemarch@gnu.org>
4431
4432 Wrappers for flexible buffers in the Algol68 frontend.
4433 * algol68/rec.a68: Cast pointers to void* for values of mode CSTR.
4434 Keep 'rec init' and 'rec fini'.
4435 (MODE RECBUF): New mode.
4436 (rec buf new): New procedure.
4437 (rec buf close): New procedure.
4438 (rec buf putc): New procedure.
4439 (rec buf puts): New procedure.
4440 (rec buf rewind): New procedure.
4441
4442 2011-11-20 Jose E. Marchesi <jemarch@gnu.org>
4443
4444 librec: avoid duplication of regular expressions and generalize
4445 the usage of the rec_match_* functions.
4446 * src/rec-types.c (rec_type_check_int): Use rec_match instead of
4447 rec_type_check_re.
4448 (rec_type_check_field): Likewise.
4449 (rec_type_check_bool): Likewise.
4450 (rec_type_check_real): Likewise.
4451 (rec_type_check_line): Likewise.
4452 (rec_type_check_email): Likewise.
4453 (rec_type_check_enum): Likewise.
4454 (rec_type_check_re): Function deleted.
4455
4456 * src/rec-sex.c (rec_sex_eval_node): Use rec_match and
4457 rec_match_insensitive.
4458
4459 * src/rec-utils.c (rec_match_int): New function.
4460 (rec_match_insensitive): New function.
4461
4462 * src/rec-rset.c (rec_rset_type_field_p): Use
4463 REC_FNAME_LIST_CS_RE.
4464 (rec_rset_type_field_fex): Likewise.
4465 (rec_rset_type_field_type): Likewise.
4466
4467 * src/rec-field-name.c (rec_field_name_part_str_p): Use rec_match
4468 instead of regcomp/regexec.
4469 (rec_field_name_str_p): Likewise.
4470 * src/rec-int.c (rec_int_rec_type_p): Likewise.
4471
4472 * src/rec-fex.c (rec_fex_check): Use the REC_*_RE constants.
4473
4474 * src/rec-utils.h (REC_FNAME_LIST_CS_RE): New constant.
4475 (REC_FNAME_LIST_RE): Likewise.
4476 (REC_FNAME_LIST_SUB_RE): Likewise.
4477
4478 2011-11-20 Jose E. Marchesi <jemarch@gnu.org>
4479
4480 librec: avoid duplication of error reporting code in rec-int.c.
4481 * src/rec-int.c (ADD_ERROR): New macro.
4482 (rec_int_check_rset): Use ADD_ERROR.
4483 (rec_int_check_rset): Likewise.
4484 (rec_int_check_record_mandatory): Likewise.
4485 (rec_int_check_record_unique): Likewise.
4486 (rec_int_check_record_prohibit): Likewise.
4487 (rec_int_check_record_secrets): Likewise.
4488 (rec_int_check_record_key): Likewise.
4489 (rec_int_check_descriptor): Likewise.
4490 (rec_int_merge_remote): Likewise.
4491
4492 2011-11-20 Jose E. Marchesi <jemarch@gnu.org>
4493
4494 librec: avoid duplication of special field names in the codebase.
4495 * src/rec-parser.c (rec_parse_rset): Use rec_std_field_name.
4496
4497 * src/rec-int.c (rec_int_check_descriptor): Use rec_std_field_name.
4498 (rec_int_merge_remote): Likewise.
4499 (rec_int_check_record_mandatory): Likewise.
4500 (rec_int_check_record_unique): Likewise.
4501 (rec_int_check_record_prohibit): Likewise.
4502 (rec_int_check_record_key): Likewise.
4503
4504 * src/rec-rset.c (rec_rset_rename_field): Use rec_std_field_name.
4505 (rec_rset_set_type): Likewise.
4506 (rec_rset_type): Likewise.
4507 (rec_rset_url): Likewise.
4508 (rec_rset_update_size_constraints): Likewise.
4509 (rec_rset_update_field_props): Likewise.
4510 (rec_rset_update_types): Likewise.
4511
4512 * src/rec-field-name.c (rec_std_field_name_s): New structure type.
4513 (rec_std_field_name_s): Global containing the names for the
4514 standard fields.
4515 (rec_std_field_name): New function.
4516
4517 2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
4518
4519 utils: new function recutl_yesno.
4520 * utils/recutl.c (recutl_yesno): New function.
4521
4522 2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
4523
4524 * gnulib update, and module readline imported.
4525
4526 2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
4527
4528 manual: document the -q,--quick command line argument in the
4529 utilities supporting it.
4530 * doc/recutils.texi (recsel Invocation): Documentation for the
4531 -q,--quick command line argument.
4532 (recdel Invocation): Likewise.
4533 (recins Invocation): Likewise.
4534 (recset Invocation): Likewise.
4535
4536 2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
4537
4538 torture: tests for -q,--quick.
4539 * torture/utils/recset.sh (multiple-records): New input file.
4540 (recset-quick-simple): New test.
4541
4542 * torture/utils/recins.sh (recins-quick-simple): New test.
4543
4544 * torture/utils/recdel.sh (recdel-quick-simple): New test.
4545
4546 * torture/utils/recsel.sh (recsel-quick-simple): New test.
4547 (recsel-quick-and-sex): Likewise.
4548 (recsel-sex-and-quick): Likewise.
4549 (recsel-num-and-quick): Likewise.
4550 (recsel-quick-and-num): Likewise.
4551
4552 2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
4553
4554 recins: memory bug when several records get replaced fixed.
4555 * utils/recins.c (recins_add_new_record): Insert copies of the new
4556 record to insert, to cover cases where more than one record is
4557 replaced.
4558
4559 2011-11-19 Jose E. Marchesi <jemarch@gnu.org>
4560
4561 utils: recset, recins, recdel and recsel adapted to support the
4562 -q, --quick option.
4563 * utils/recset.c (recset_process_actions): Honour
4564 recutl_quick_str.
4565 (recset_process_ren): Likewise.
4566
4567 * utils/recins.c (recins_add_new_record): Honour recutl_quick_str.
4568
4569 * utils/recdel.c (recdel_delete_records): Honour recutl_quick_str.
4570 (recdel_parse_args): Take into account recutl_quick_str when
4571 deciding whether a request to delete all records.
4572 (main): Likewise.
4573
4574 * src/rec-record.c (rec_record_contains_value): New function.
4575
4576 * utils/recutl.h (RECORD_SELECTION_SHORT_ARGS): Updated with q:.
4577
4578 * utils/recset.c: New global recutl_quick_str.
4579
4580 * utils/recdel.c: New global recutl_quick_str.
4581 (recutl_print_help): Document the usae of -q, --quick.
4582
4583 * utils/recins.c: New global recutl_quick_str.
4584 (recutl_print_help): Document the usage of -q, --quick.
4585
4586 * utils/recutl.c (recutl_print_help_record_selection): Document
4587 the usage of -q, --quick.
4588
4589 * utils/recutl.h (RECORD_SELECTION_ARGS): QUICK_ARG added.
4590 (RECORD_SELECTION_LONG_ARGS): Entry for QUICK_ARG.
4591 (RECORD_SELECTION_ARGS_CASES): Likewise.
4592
4593 * utils/recsel.c (recsel_process_data): Improve grammar in
4594 comment.
4595 (recutl_print_help): Document the usage of -q, --quick.
4596 (recutl_quick_str): New global variable.
4597
4598 2011-11-15 Jose E. Marchesi <jemarch@gnu.org>
4599
4600 rec-init and rec-fini defined in the algol68 binding.
4601 * algol68/rec.a68 (rec init): New procedure.
4602 (rec fini): Likewise.
4603
4604 2011-11-13 Jose E. Marchesi <jemarch@gnu.org>
4605
4606 Initial work on the Algol 68 binding for librec.
4607 * algol68/nameseed: New file.
4608
4609 * Makefile.am (SUBDIRS): Recurse into algol68/ in case an Algol68
4610 compiler is available.
4611
4612 * configure.ac: Check for the ca68 compiler.
4613
4614 * algol68/Makefile.am: New file.
4615
4616 * algol68/rec.a68: New file.
4617 Define 'rec major version', 'rec minor version' and 'rec version
4618 string'.
4619
4620 2011-11-06 Jose E. Marchesi <jemarch@gnu.org>
4621
4622 configure: generation of the lexer fixed.
4623 * configure.ac: Define LEX_OUTPUT_ROOT so ylwrap can work
4624 propertly when flex is installed.
4625
4626 2011-11-03 Jose E. Marchesi <jemarch@gnu.org>
4627
4628 Preparation for 1.4.
4629 * NEWS: Updated.
4630
4631 * configure.ac: Version number changed to 1.4.
4632
4633 2011-11-02 Jose E. Marchesi <jemarch@gnu.org>
4634
4635 Preparation for 1.3.91.
4636 * configure.ac: Version number changed to 1.3.91.
4637
4638 2011-11-02 Jose E. Marchesi <jemarch@gnu.org>
4639
4640 src: endianess problem fixed in rec_encrypt/rec_decrypt.
4641 * src/rec-utils.h: Include stdlib.h and declare rec_endian_swap.
4642
4643 * src/rec-utils.c (rec_endian_swap): New function.
4644
4645 * src/rec-crypt.c (rec_encrypt): Store the crc always in
4646 little-endian.
4647 (rec_decrypt): Restore the crc in little-endian.
4648
4649 2011-11-01 Jose E. Marchesi <jemarch@gnu.org>
4650
4651 * src/rec-crypt.c (rec_encrypt): Store the crc bytes in a way
4652 independant of the endianess.
4653
4654 2011-11-01 Jose E. Marchesi <jemarch@gnu.org>
4655
4656 torture: portability problem with malloc.h fixed.
4657 * torture/rec-fex/rec-fex-str.c: Include stdlib.h instead of
4658 malloc.h to avoid problems in systems not featuring the second
4659 header.
4660
4661 2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
4662
4663 torture: support the running of the tests in Windows.
4664 * torture/utils/testutils.sh: Append $EXEEXT to the utility name.
4665 Source config.sh.
4666
4667 * torture/utils/config.sh.in (EXEEXT): Make it available to the
4668 tests.
4669
4670 2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
4671
4672 Fixes to avoid warnings while compiling the codebase.
4673 * src/rec-utils.c (rec_parse_regexp): Set result to NULL if there
4674 is not match.
4675
4676 * src/rec-types.c (rec_type_descr_p): Get a const char* parameter.
4677 (rec_type_new): Likewise.
4678
4679 * src/rec-rset.c (rec_rset_update_field_props): Make p and q const
4680 char*.
4681
4682 * src/rec-utils.c (rec_skip_blanks): Get a const char** parameter.
4683 (rec_parse_regexp): Likewise.
4684 (rec_atoi): Likewise.
4685 (rec_atod): Likewise.
4686 (rec_extract_file): Likewise.
4687 (rec_extract_url): Likewise.
4688 (rec_extract_type): Likewise.
4689 (rec_parse_int): Likewise.
4690 (rec_extract_size_condition): Likewise.
4691
4692 * src/rec-rset.c (rec_rset_type_field_p): Make local pointer p
4693 const.
4694
4695 * src/rec-writer.c (rec_write_record): Return
4696 rec_write_record_with_rset.
4697 (rec_write_field): Likewise with rec_write_field_with_rset.
4698
4699 * utils/recset.c (recset_process_actions): Parenthesis around &&
4700 and || added.
4701 * utils/recdel.c (recdel_delete_records): Likewise.
4702
4703 * utils/mdb2rec.c (process_table): Use column_name instead of
4704 col->name.
4705
4706 * utils/recfix.c (recfix_do_crypt): Unused variable elem_record
4707 removed.
4708 (main): Unused variable db removed.
4709
4710 * utils/recutl.c: Include sys/stat.h.
4711
4712 2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
4713
4714 torture: fix warnings in the rec-mset unit tests.
4715 * torture/rec-mset/elem-types.h (type1_disp): Free s instead of
4716 the void pointer.
4717 (type2_disp): Likewise.
4718
4719 2011-10-31 Jose E. Marchesi <jemarch@gnu.org>a
4720
4721 Examples sections removed from the --help outputs.
4722 * utils/csv2rec.c (recutl_print_help): Examples removed from
4723 --help output.
4724 * utils/recset.c (recutl_print_help): Likewise.
4725 * utils/recsel.c (recutl_print_help): Likewise.
4726 * utils/recins.c (recutl_print_help): Likewise.
4727 * utils/recinf.c (recutl_print_help): Likewise.
4728 * utils/recfmt.c (recutl_print_help): Likewise.
4729 * utils/recdel.c (recutl_print_help): Likewise.
4730 * utils/rec2csv.c (recutl_print_help): Likewise.
4731 * utils/mdb2rec.c (recutl_print_help): Likewise.
4732
4733 2011-10-31 Jose E. Marchesi <jemarch@gnu.org>
4734
4735 gnulib update.
4736
4737 2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
4738
4739 configure: do not require flex and bison at build time.
4740 * utils/recdel.c: Include xalloc.h.
4741
4742 * configure.ac: Use gl_BISON instead of AM_PROG_YACC.
4743
4744 2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
4745
4746 Don't run tests associated with confidential fields when building
4747 the tools without crypt support.
4748 * .gitignore: torture/utils/config.sh added.
4749
4750 * torture/utils/recfix.sh: include config.sh and test the
4751 encryption support only if the utilities were built with that
4752 support.
4753
4754 * configure.ac: Generate torture/utils/config.sh
4755
4756 * torture/utils/config.sh.in: New file.
4757
4758 * configure.ac (REC_CRYPT_SUPPORT): Define and subst
4759 CRYPT_SUPPORT.
4760
4761 2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
4762
4763 Fixes for problems detected by the clang analyzer.
4764 * src/rec-sex.c (rec_sex_eval_node): Take care about possible
4765 divisions by zero when evaluating / and %.
4766
4767 * utils/csv2rec.c (main): Unused local variable 'out' removed.
4768
4769 * utils/recfmt.c (recfmt_process_db): Use rset_size to avoid
4770 calculating the size of the rset at every iteration.
4771
4772 * torture/rec-comment/rec-comment-set-text.c
4773 (rec_comment_set_text_nominal): Use new version of
4774 rec_comment_set_text.
4775
4776 * src/rec-comment.c (rec_comment_set_text): Get a pointer to
4777 comment in order to set its value.
4778
4779 * src/rec-mset.c (rec_mset_remove_at): Unused local elem_type
4780 removed.
4781
4782 * src/rec-parser.c (rec_parser_perror): Usage of uninitialized
4783 pointer fixed.
4784
4785 2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
4786
4787 Preparation for 1.3.90.
4788 * NEWS: Updated for 1.3.90.
4789
4790 * configure.ac: Version updated to 1.3.90.
4791
4792 2011-10-30 Jose E. Marchesi <jemarch@gnu.org>
4793
4794 * doc/recutils.texi (recsel Encryption): Written.
4795 (recins Encryption): Written.
4796
4797 2011-10-29 Jose E. Marchesi <jemarch@gnu.org>
4798
4799 manual: documentation for %confidential fields.
4800 * doc/recutils.texi (%confidential): Written.
4801
4802 2011-10-27 Jose E. Marchesi <jemarch@gnu.org>
4803
4804 Don't allow several %sort entries in record descriptors.
4805 * doc/recutils.texi (%sort): Document that only one %sort per
4806 record descriptor is allowed.
4807
4808 * torture/utils/recfix.sh (recfix-sort-several-fields-invalid):
4809 New test.
4810
4811 * src/rec-int.c (rec_int_check_descriptor): It is an error to have
4812 several %sort fields in a record descriptor.
4813
4814 2011-10-27 Jose E. Marchesi <jemarch@gnu.org>
4815
4816 manual: documentation for %sort.
4817 * doc/recutils.texi (%sort): Written.
4818
4819 2011-10-26 Jose E. Marchesi <jemarch@gnu.org>
4820
4821 manual: documenttion for %mandatory, %prohibit, %unique, %key and
4822 %auto rewritten.
4823 * doc/recutils.texi (%mandatory and %prohibit): Written.
4824 (%unique and %key): Written.
4825 (%auto): Improved and relocated.
4826
4827 2011-10-25 Jose E. Marchesi <jemarch@gnu.org>
4828
4829 * doc/recutils.texi (Record Descriptors): Reworked and simplified.
4830
4831 2011-10-16 Jose E. Marchesi <jemarch@gnu.org>
4832
4833 syntax fixes.
4834 * utils/recdel.c: Don't include xalloc.h.
4835
4836 * .x-sc_prohibit_undesirable_word_seq: New file.
4837
4838 * .x-sc_prohibit_strings_without_use: New file.
4839
4840 * .x-sc_prohibit_path_max_allocation: New file.
4841
4842 * .x-sc_prohibit_doubled_word: Ignored lib/*.
4843
4844 * README-dev: Spell file systme.
4845
4846 2011-10-13 Jose E. Marchesi <jemarch@gnu.org>
4847
4848 * doc/recutils.texi (Comments): Relocated.
4849 (Fields and Records): Matusalen -> Matusalem.
4850
4851 2011-10-13 Jose E. Marchesi <jemarch@gnu.org>
4852
4853 manual: document the encryption options in recsel and recins.
4854 * doc/recutils.texi (recsel Invocation): Global options added,
4855 including a description of the --password argument.
4856 (recins Invocation): Document --password.
4857 (recins Invocation): Document --case-insensitive.
4858
4859 2011-10-12 Jose E. Marchesi <jemarch@gnu.org>
4860
4861 torture: tests for the --sort operation of recfix.
4862 * torture/utils/recfix.sh (recfix-sort-ints): New test.
4863 (recfix-sort-ranges): New test.
4864 (recfix-sort-reals): New test.
4865 (recfix-sort-lex): New test.
4866 (recfix-sort-dates): New test.
4867 (recfix-sort-booleans): New test.
4868
4869 2011-10-11 Jose E. Marchesi <jemarch@gnu.org>
4870
4871 * README-dev: URL to the git repo updated.
4872
4873 2011-10-07 Jose E. Marchesi <jemarch@gnu.org>
4874
4875 recfix: manage --encrypt when there are already encrypted fields
4876 in the database.
4877 * torture/utils/recfix.sh (recfix-encrypt-already-encrypted): New
4878 test.
4879 (recfix-encrypt-already-encrypted-force): New test.
4880
4881 * utils/recfix.c (recfix_do_crypt): Emit an error if an already
4882 encrypted field is found, unless --force was specified in the
4883 command line.
4884 (recutl_print_help): --force documented.
4885 (recfix_parse_args): Recognize --force.
4886
4887 * src/rec-crypt.c (rec_encrypt_field): Make sure the field is not
4888 already encrypted before encrypting it.
4889
4890 2011-10-07 Jose E. Marchesi <jemarch@gnu.org>
4891
4892 utils: typo fixed in help string.
4893 * utils/recsel.c (recutl_print_help): Typo in help string fixed.
4894
4895 2011-10-06 Jose E. Marchesi <jemarch@gnu.org>
4896
4897 build: documentation of dependencies updated.
4898 * README-dev: Dependency on libgcrypt documented.
4899
4900 2011-10-05 Jose E. Marchesi <jemarch@gnu.org>
4901
4902 manual: little fix.
4903 * doc/recutils.texi (mdb2rec Examples): Example fixed. Reported by
4904 Sven Wick.
4905
4906 2011-10-04 Jose E. Marchesi <jemarch@gnu.org>
4907
4908 torture: tests for the --encrypt and --decrypt options of recfix.
4909 * torture/utils/recfix.sh (recfix-encrypt): New test.
4910 (recfix-encrypt-password-long): Likewise.
4911 (recfix-encrypt-without-password): Likewise.
4912 (recfix-encrypt-password-before-operation): Likewise.
4913 (recfix-decrypt-invalid-password): Likewise.
4914
4915 2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
4916
4917 torture: tests for the --check operation of recfix regarding
4918 encryption, and some fixes.
4919 * src/rec-int.c (rec_int_check_record_secrets): Return the number
4920 of errors that occurred while checking the integrity.
4921
4922 * torture/utils/recfix.sh (recfix-with-operation): New test.
4923 (recfix-confidential): Likewise.
4924 (recfix-invalid-confidential): Likewise.
4925 (recfix-confidential-with-unencrypted-fields): Likewise.
4926
4927 2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
4928
4929 manual: documentation for recfix updated.
4930 * doc/recutils.texi (recfix Invocation): Documentation for the new
4931 synopsis of recfix, including a description of all the supported
4932 operations.
4933 (recfix Examples): Add more examples covering the several
4934 supported operations.
4935
4936 2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
4937
4938 * utils/recfix.c (recfix_do_crypt): Don't check integrity before
4939 doing an en/decryption operation.
4940
4941 2011-10-03 Jose E. Marchesi <jemarch@gnu.org>
4942
4943 librec: more encryption related routines, and encryption support
4944 in recfix.
4945 * utils/recfix.c (recfix_do_crypt): Use rec_decrypt_record.
4946
4947 * src/rec-crypt.c (rec_decrypt_record): New function.
4948
4949 * src/rec-writer.c (rec_write_field_with_rset): Use
4950 rec_decrypt_field.
4951
4952 * src/rec-crypt.c (rec_decrypt_field): New function.
4953
4954 * utils/recfix.c (recfix_do_crypt): Adapted to the new semantics
4955 of rec_encrypt_record.
4956 * utils/recins.c (recins_insert_record): Likewise.
4957 (recins_add_new_record): Likewise.
4958
4959 * src/rec-crypt.c (rec_encrypt_field): New function.
4960 (rec_encrypt_record): Use rec_encrypt_field.
4961
4962 2011-09-30 Jose E. Marchesi <jemarch@gnu.org>
4963
4964 * utils/recins.c (recins_insert_record): Use rec_encrypt_record.
4965 (recins_encrypt_fields): Function removed.
4966
4967 * src/rec-crypt.c (rec_encrypt_record): New function.
4968
4969 * utils/recfix.c (main): Invoke the recfix_do_* functions
4970 depending on the selected operation.
4971 (recfix_do_check): New function.
4972 (recfix_check_database): Renamed from recfix_process_data.
4973 (recfix_parse_args): Made static, and adapted to use the new
4974 recfix_do_* functions.
4975 (recfix_do_sort): New function.
4976
4977 2011-09-30 Jose E. Marchesi <jemarch@gnu.org>
4978
4979 build: install lisp files in the proper directory.
4980 * etc/Makefile.am: Install rec-mode.el in the proper place, and
4981 use the dist_ prefix instead of the EXTRA_DIST automake variable.
4982 Suggested by Ludovic Courtes.
4983
4984 2011-09-19 Jose E. Marchesi <jemarch@gnu.org>
4985
4986 lib: missing sorting cases added.
4987 * src/rec-rset.c (rec_rset_record_compare_fn): Date sorting
4988 algorithm fixed.
4989 (rec_rset_record_compare_fn): Real sorting implemented.
4990 (rec_rset_record_compare_fn): Likewise for booleans.
4991
4992 2011-09-11 Jose E. Marchesi <jemarch@gnu.org>
4993
4994 manual: argument description fixed.
4995 * doc/recutils.texi (Common Options): The description of the '--'
4996 option was truncated. Fixed.
4997
4998 2011-09-04 Jose E. Marchesi <jemarch@gnu.org>
4999
5000 recfix: normalise invocation to allow more commands.
5001 * utils/recfix.c: New type recfix_op.
5002 (recutl_print_help): Adapted to the new synopsis of recfix.
5003 (recutl_print_help): Don't include examples in the --help output.
5004
5005 2011-09-01 Jose E. Marchesi <jemarch@gnu.org>
5006
5007 build: linking with libgcrypt fixed.
5008 * src/Makefile.am (librec_la_LIBADD): Link with $LTLIBGCRYPT if
5009 compiling with encryption support.
5010 * utils/Makefile.am (COMMONLIBS): Likewise.
5011
5012 2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
5013
5014 crypt: fix build with crypt support disabled.
5015 * src/rec-rset.c (rec_rset_get_props): Update confidential_p only
5016 if compiling with encryption support.
5017
5018 2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
5019
5020 recfix: check for non-encrypted confidential fields.
5021 * src/rec-int.c: Copyright year updated.
5022 (rec_int_check_record): Call rec_int_check_record_secrets.
5023 (rec_int_check_record_secrets): New function.
5024
5025 2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
5026
5027 lib: regression affecting auto fields fixed.
5028 * utils/recins.c (recins_add_new_record): Fix regression causing
5029 the loosing of the auto fields.
5030 (recins_add_new_record): Avoid memory leak destroying
5031 recins_record.
5032
5033 * src/rec-rset.c (rec_rset_get_props): Initialize confidential_p
5034 to false.
5035
5036 2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
5037
5038 crypt: support for CRC and encrypted prefix.
5039 * src/rec-crypt.c: Include crc.h.
5040 (rec_decrypt): Check the CRC of decrypted data.
5041 (rec_encrypt): Append the CRC when encrypting.
5042
5043 2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
5044
5045 gnulib: imported module crc.
5046 * lib/crc.c: Imported from gnulib.
5047 * lib/crc.h: Likewise.
5048
5049 2011-08-28 Jose E. Marchesi <jemarch@gnu.org>
5050
5051 * src/rec-writer.c (rec_write_record_with_rset): New function.
5052 (rec_write_field_with_rset): New function.
5053
5054 * utils/recsel.c (recsel_process_data): Set the password of the
5055 writer, if specified on the command line.
5056
5057 * src/rec-writer.c (rec_writer_new): Initialize the password field
5058 of the writer structure.
5059 (rec_writer_destroy): Free the memory used by the password, if
5060 any.
5061 (rec_writer_set_password): New function.
5062
5063 * utils/recsel.c (recutl_print_help): Support the -s, --password
5064 option.
5065 (recsel_parse_args): Likewise.
5066
5067 * src/rec-crypt.c (rec_decrypt): New function.
5068
5069 2011-08-27 Jose E. Marchesi <jemarch@gnu.org>
5070
5071 * utils/recins.c: Include base64.h.
5072
5073 * gnulib base64 module imported.
5074
5075 2011-08-26 Jose E. Marchesi <jemarch@gnu.org>
5076
5077 * src/Makefile.am (librec_la_SOURCES): Compile rec-crypt.c if
5078 encryption is supported.
5079
5080 * src/rec-crypt.c: New file.
5081
5082 * utils/recins.c (recins_encrypt_fields): New function.
5083
5084 * src/rec-rset.c (rec_rset_confidential): New function.
5085
5086 * utils/recins.c: New variable recins_password.
5087 (recutl_print_help): Document -s,--password.
5088 (recins_parse_args): Set recins_password.
5089
5090 * src/rec-utils.c (rec_encrypt): New function.
5091 (rec_decrypt): New function.
5092 (rec_passphrase_cb): New function.
5093
5094 * src/rec-utils.c: Include gcrypt.h.
5095
5096 * src/rec-int.c (rec_int_check_descriptor): Check for the value of
5097 %confidential entries.
5098
5099 * src/rec-rset.c (rec_rset_rename_field): Rename field names in
5100 %confidential fields.
5101 (rec_rset_update_field_props): Set the confidential property of
5102 fields.
5103
5104 2011-08-25 Jose E. Marchesi <jemarch@gnu.org>
5105
5106 * doc/recutils.texi (recfmt Templates): Typo fixed.
5107
5108 2011-08-24 Jose E. Marchesi <jemarch@gnu.org>
5109
5110 * doc/recutils.texi (Introduction): Comment about YAML.
5111
5112 2011-08-24 Jose E. Marchesi <jemarch@gnu.org>
5113
5114 * configure.ac: Complain if flex or bison are not found and exit.
5115
5116 2011-08-24 Jose E. Marchesi <jemarch@gnu.org>
5117
5118 * Time-stamp marks removed from the entire codebase and syntax
5119 checks fixes.
5120
5121 2011-08-15 Thien-Thi Nguyen <ttn@gnuvola.org> (tiny change)
5122
5123 librec: Don't #include <config.h> in rec.h.
5124 * src/rec.h: Don't #include <config.h>.
5125
5126 2011-08-05 Jose E. Marchesi <jemarch@gnu.org>
5127
5128 librec: acknowledge %sort entries when renaming fields.
5129 * src/rec-rset.c (rec_rset_rename_field): Rename fields used as
5130 sorting criteria in %sort: entries.
5131
5132 * torture/utils/recset.sh: Tests renaming fields updated to cover
5133 %sort entries.
5134
5135 2011-08-05 Jose E. Marchesi <jco@terma.com>
5136
5137 * etc/ob-rec.el (org-babel-execute:rec): Separate header when
5138 generating tables.
5139 (org-babel-execute:rec): Generate raw data when executed with
5140 results: verbatim.
5141
5142 2011-08-05 Jose E. Marchesi <jemarch@gnu.org>
5143
5144 ob-rec: support for :sort and minor fixes.
5145 * etc/ob-rec.el (org-babel-execute:rec): Support for :sort added.
5146 (org-babel-execute:rec): Emit rec data, and not csv, when executed
5147 with results: scalar, html or code.
5148
5149 2011-07-29 Jose E. Marchesi <jemarch@gnu.org>
5150
5151 librec: sorting by date values implemented.
5152 * src/rec-rset.c (rec_rset_record_compare_fn): Sorting by date
5153 value implementing.
5154
5155 * src/rec-sex.c (rec_sex_eval_node): Use rec_timespec_subtract.
5156
5157 * src/rec-utils.c (rec_timespec_subtract): Moved from rec-sex.c.
5158
5159 2011-07-28 Jose E. Marchesi <jemarch@gnu.org>
5160
5161 manual: documentation for %sort and %typedef.
5162 * doc/recutils.texi (Record Descriptors): Document %typedef in the
5163 list of special fields.
5164 (Record Descriptors): Likewise for %sort.
5165 (recsel Invocation): Document -S,--sort.
5166 (rec2csv Invocation): Likewise.
5167
5168 2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
5169
5170 manual: documentation for the sorting option of recfix.
5171 * doc/recutils.texi (recfix Invocation): Synopsis fixed.
5172 (recfix Invocation): Document the --sort operation.
5173 (recfix Examples): Example of --sort added.
5174
5175 2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
5176
5177 recfix: support the phisical sort operation.
5178 * utils/recfix.c (main): Use recutl_read_db_from_file.
5179 (recfix_parse_args): Set the value of recfix_file from the command
5180 line and complain if no file was provided.
5181 (recutl_print_help): Document the new usage of the command.
5182 (recutl_print_help): Documnt the --sort option.
5183 (recfix_parse_args): Manage --sort.
5184 (main): Update the rec file if an operation requires it.
5185
5186 2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
5187
5188 librec: check the integrity of %sort entries, and tests.
5189 * torture/utils/recfix.sh (recfix-sortcheck-valid): New test.
5190 (recfix-sortcheck-with-blanks): Likewise.
5191 (recfix-sortcheck-invalid-empty): Likewise.
5192 (recfix-sortcheck-invalid-field-name): Likewise.
5193
5194 * src/rec-int.c (rec_int_check_descriptor): Make sure that %sort
5195 fields have correct values.
5196
5197 2011-07-21 Jose E. Marchesi <jemarch@gnu.org>
5198
5199 librec: options -S,--sort supported in recsel and rec2csv.
5200 * utils/rec2csv.c (recutl_print_help): Documentation for
5201 --sort,-S.
5202 (rec2csv_parse_args): Manage --sort, -S.
5203
5204 * utils/recsel.c: New command-line argument --sort, -S.
5205 (recutl_print_help): Documentation for --sort, -S.
5206 (recsel_parse_args): Manage -S.
5207
5208 * doc/recutils.texi (recinf Invocation): -S is not like
5209 --print-sexps anymore.
5210
5211 * utils/recutl.c (recutl_sorting_parser): Get a field name as a
5212 sorting criteria.
5213
5214 * src/rec-rset.c (rec_rset_update_field_props): %sort only has an
5215 effect if order_by_field is not already set in the record set.
5216
5217 * src/rec-parser.c (rec_parser_new): Initialize order_by_field to
5218 NULL.
5219 (rec_parser_set_order_by_field): New function.
5220
5221 * src/rec-rset.c: New function.
5222 (rec_rset_order_by_field): New function.
5223
5224 2011-07-19 Jose E. Marchesi <jemarch@gnu.org>
5225
5226 librec: record sorting implementation, and tools adjusted.
5227 * utils/recsel.c (main): Likewise.
5228
5229 * utils/recfmt.c (main): Likewise.
5230
5231 * utils/rec2csv.c (main): Call recutl_sorting_parser with the
5232 appropriate value.
5233
5234 * utils/recutl.c (recutl_sorting_parser): New function.
5235
5236 * utils/recutl.c (recutl_parse_db_from_file): Set the ordered
5237 attribute of the parser to the value of the global recutl_sort_p.
5238
5239 * src/rec-parser.c (rec_parser_new): Initialise ordered_p to
5240 false.
5241 (rec_parser_set_ordered): New function.
5242 (rec_parser_ordered): New function.
5243 (rec_parse_rset): Set the ordered attribute of the newly created
5244 record set to the desired value.
5245
5246 * src/rec-rset.c: New structure rec_rset_comment_s.
5247 (rec_rset_elem_comment_new): Use rec_rset_comment_s.
5248 (rec_rset_elem_comment): Likewise.
5249 (rec_rset_comment_disp_fn): Likewise.
5250 (rec_rset_comment_dup_fn): Likewise.
5251 (rec_rset_set_ordered): New function.
5252 (rec_rset_ordered): New function.
5253 (rec_rset_insert_at): Insert sorting only if ordered_p.
5254 (rec_rset_append): Likewise.
5255 (rec_rset_append_record): Likewise.
5256 (rec_rset_insert_after): Likewise.
5257 (rec_rset_dup): Copy ordered_p.
5258
5259 2011-07-19 Jose E. Marchesi <jco@terma.com>
5260
5261 librec: use mset_add_sort in all record inserting operations in
5262 rec-rset.
5263 * src/rec-rset.c (rec_rset_insert_at): If the rset has a sort by
5264 field and the element to be inserted is a record, insert it using
5265 the sorting criteria instead of the requested location.
5266 (rec_rset_append): Likewise.
5267 (rec_rset_insert_after): Likewise.
5268
5269 2011-07-18 Jose E. Marchesi <jemarch@gnu.org>
5270
5271 librec: initial support for %sort.
5272 * src/rec-rset.c (rec_rset_comment_compare_fn): New function.
5273 (rec_rset_record_compare_fn): New function.
5274 (rec_rset_update_field_props): Manage the %sort special field.
5275
5276 * src/rec-record.c (rec_record_new): Pass NULL for the compare
5277 function to rec_mset_register_type.
5278
5279 * src/rec-mset.c (rec_mset_add_sorted): New function.
5280 (rec_mset_new): Initialize the compare_fn function for types to
5281 NULL.
5282 (rec_mset_dup): Make a copy of compare_fn.
5283 (rec_mset_register_type): Get a compare_fn argument.
5284 (rec_mset_elem_compare_fn): New function.
5285
5286 * src/rec-mset.h: New type rec_mset_compare_fn_t.
5287
5288 * src/rec-rset.c: New attribute 'order_by_field' in struct
5289 rec_rsets.
5290 New structure rec_rset_record_s.
5291 (rec_rset_new): Initialise the order by field name to NULL.
5292 (rec_rset_destroy): Destroy the order by field name if it exists
5293 in the record set.
5294 (rec_rset_dup): Care about the order by field, if any.
5295 (rec_rset_append_record): Use rec_mset_add_sorted to add the
5296 record to the mset if there is a sort by field.
5297 (rec_rset_elem_record_new): Insert a rec_rset_record_t instead of a
5298 rec_record_t in the mset.
5299 (rec_rset_record_disp_fn): Destroy a rec_rset_record_t structure,
5300 including the contained record.
5301 (rec_rset_record_dup_fn): Dup a rec_rset_record_t structure,
5302 including the contained record.
5303
5304 2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
5305
5306 torture: system tests for typedefs.
5307 * torture/utils/recfix.sh (typedef-valid): New input file.
5308 (typedef-valid-xfail): Likewise.
5309 (typedef-valid-with-blanks): Likewise.
5310 (typedef-valid-with-blanks-xfail): Likewise.
5311 (typedef-valid-order): Likewise.
5312 (typedef-valid-order-xfail): Likewise.
5313 (typedef-valid-chain): Likewise.
5314 (typedef-valid-chain-xfail): Likewise.
5315 (typedef-valid-multiple): Likewise.
5316 (typedef-valid-multiple-xfail): Likewise.
5317 (typedef-invalid-bad-type): Likewise.
5318 (typedef-invalid-chain-undefined): Likewise.
5319 (typedef-invalid-chain-loop): Likewise.
5320 (recfix-typedef-valid): New test.
5321 (recfix-typedef-valid-xfail): Likewise.
5322 (recfix-typedef-valid-with-blanks): Likewise.
5323 (recfix-typedef-valid-with-blanks-xfail): Likewise.
5324 (recfix-typedef-valid-order): Likewise.
5325 (recfix-typedef-valid-order-xfail): Likewise.
5326 (recfix-typedef-valid-chain): Likewise.
5327 (recfix-typedef-valid-chain-xfail): Likewise.
5328 (recfix-typedef-valid-multiple): Likewise.
5329 (recfix-typedef-valid-multiple-xfail): Likewise.
5330 (recfix-typedef-invalid-bad-type): Likewise.
5331 (recfix-typedef-invalid-chain-undefined): Likewise.
5332 (recfix-typedef-invalid-chain-loop): Likewise.
5333
5334 2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
5335
5336 manual: documentation for %typedef.
5337 * doc/recutils.texi (Field Types): Rewritten to introduce field
5338 types in a clearer way.
5339 (Declaring types): New section.
5340 (Type descriptions): New section.
5341 (Escalar types): Rewritten as a subsection.
5342 (String types): Likewise.
5343 (Enumerated types): Likewise.
5344 (Other types): Likewise.
5345 (Types and fields): New section.
5346
5347 2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
5348
5349 librec: support for synonyms in type registries.
5350 * src/rec-rset.c (rec_rset_update_types): Manage the declaration
5351 of synonyms in %typedef entries.
5352
5353 * src/rec-types.c: New struct rec_type_reg_entry_s.
5354 (rec_type_reg_destroy): Adapted to the new structure of type
5355 registry entries.
5356 (rec_type_reg_add): Likewise.
5357 (rec_type_reg_get): Likewise.
5358 (rec_type_reg_add_synonym): New function.
5359
5360 * src/rec-int.c (rec_int_check_descriptor): Check for the
5361 existance of referred named types.
5362
5363 2011-07-17 Jose E. Marchesi <jemarch@gnu.org>
5364
5365 librec: support for %typedef.
5366 * src/rec-int.c (rec_int_check_descriptor): Verify %typedef
5367 entries.
5368
5369 * src/rec-types.c: REC_TYPE_NAME_RE renamed to REC_TYPE_CLASS_RE
5370 to not collide with the macro of the same name defined in rec.h.
5371
5372 * src/rec.h (REC_TYPE_NAME_RE): New constant.
5373
5374 * src/rec-int.c (rec_int_check_descriptor): Accept type names in
5375 type descriptions.
5376
5377 * src/rec-rset.c (rec_rset_rename_field): Update field props after
5378 the rename of a field.
5379 (rec_rset_update_types): Rewritten to process %typedef entries.
5380 (rec_rset_type_field_p): Allow %type entries with named types.
5381
5382 2011-07-16 Jose E. Marchesi <jemarch@gnu.org>
5383
5384 librec: manage anonymous types using the fields props structures.
5385 * src/rec-rset.c (rec_rset_new): Create an empty types registry.
5386
5387 * src/rec-types.c: Data structures storing the associations
5388 removed.
5389 (rec_type_reg_destroy): Assocs code removed. Destroy the types.
5390 (rec_type_reg_assoc): Deleted.
5391 (rec_type_reg_assoc_anon): Deleted.
5392 (rec_type_reg_field_type): Deleted.
5393
5394 * src/rec-int.c (rec_int_check_field_type): Use
5395 rec_rset_get_field_name instead of the type registry of the rset.
5396 (rec_int_check_descriptor): Likewise.
5397
5398 * src/rec-rset.c (rec_rset_update_field_props): Renamed from
5399 rec_rset_update_auto_fields.
5400 (rec_rset_get_field_type): Use the field properties to find and
5401 return the type of a given field.
5402 (rec_rset_update_field_props): Update type properties in the field
5403 props.
5404
5405 2011-07-16 Jose E. Marchesi <jemarch@gnu.org>
5406
5407 librec: manage auto fields with the new fields properties
5408 structure in record sets.
5409 * utils/recins.c (recins_add_auto_fields): rec_rset_auto now
5410 returns the auto fields in the right order, so no need to reverse
5411 it.
5412
5413 * src/rec-rset.c: New structure rec_rset_fprops_s to hold the
5414 properties of a field.
5415 New field field_props in the rec_rset_s struct.
5416 (rec_rset_new): Initialise field_props to NULL.
5417 (rec_rset_get_props): New function.
5418 (rec_rset_update_auto_fields): Update field_props instead of the
5419 auto_fields fex.
5420 (rec_rset_auto): Build a fex from the contents of field_props and
5421 return it.
5422 (rec_rset_destroy): Destroy field_props.
5423
5424 2011-07-16 Jose E. Marchesi <jemarch@gnu.org>
5425
5426 torture: type-reg tests adapted.
5427 * torture/rec-type-reg/rec-type-reg-assoc-anon.c: Renamed from
5428 rec-type-reg-register.c, and adapted to the new semantics.
5429
5430 * torture/rec-type-reg/rec-type-reg-get.c: Adapted to the new
5431 semantics of rec_type_reg_get.
5432
5433 2011-07-15 Jose E. Marchesi <jemarch@gnu.org>
5434
5435 librec: support for named types in type registries.
5436 * src/rec-rset.c (rec_rset_get_field_type): Likewise.
5437
5438 * src/rec-int.c (rec_int_check_field_type): Use
5439 rec_type_reg_get_type instead of rec_type_reg_get.
5440 (rec_int_check_descriptor): Likewise.
5441
5442 * src/rec-types.c (rec_type_reg_add): New function.
5443 (rec_type_reg_assoc_anon): Renamed from rec_type_reg_register.
5444 (rec_type_reg_assoc): New function.
5445 (rec_type_reg_get): New function.
5446 (rec_type_reg_assoc): Renamed from rec_type_reg_get and adapted to
5447 use the new registry internal structure.
5448
5449 2011-07-14 Jose E. Marchesi <jemarch@gnu.org>
5450
5451 librec: attribute 'name' for types.
5452 * torture/rec-type/tsuite-rec-type.c (tsuite_rec_type): Test cases
5453 for rec_type_name and rec_type_set_name added.
5454
5455 * torture/rec-type/rec-type-name.c: New file.
5456 (rec_type_name_anonymous): New test.
5457 (rec_type_name_nominal): New test.
5458
5459 * torture/rec-type/rec-type-set-name.c: New file.
5460 (rec_type_set_name_nominal): New test.
5461
5462 * src/rec-types.c: New field 'name' in struct rec_type_s to hold
5463 the name of the type, or NULL for an anonymous type.
5464 (rec_type_name): New function.
5465 (rec_type_set_name): New function.
5466 (rec_type_new): Initialize the name to NULL.
5467 (rec_type_new): type_name_str renamed to type_kind_str to avoid
5468 confusion.
5469 (rec_type_destroy): Deallocate type->name upon destruction.
5470
5471 2011-07-14 Jose E. Marchesi <jemarch@gnu.org>
5472
5473 librec: improvements in the api of rec_type.
5474 * torture/rec-type/rec-type-check.c: Changed to use the new
5475 rec_type_* API.
5476 * torture/rec-type/rec-type-descr-p.c: Likewise.
5477 * torture/rec-type-reg/rec-type-reg-get.c: Likewise.
5478 * torture/rec-type-reg/rec-type-reg-register.c: Likewise.
5479 * torture/rec-type/rec-type-new.c: Likewise.
5480 * torture/rec-type/rec-type-kind-str.c: Likewise.
5481 * torture/rec-type/rec-type-kind.c: Likewise.
5482 * torture/rec-type/rec-type-equal-p.c: Likewise.
5483 * torture/rec-type/rec-type-destroy.c: Likewise.
5484
5485 * torture/rec-type/tsuite-rec-type.c: Tests for rec_type_descr_fex
5486 and rec_type_descr_type removed.
5487
5488 * src/rec-rset.c (rec_rset_type_field_type): New function.
5489 (rec_rset_rename_field): Use rec_rset_type_field_type instead of
5490 rec_type_descr_type.
5491
5492 * src/rec-types.c: rec_type_descr_fex function removed.
5493 * src/rec.h: Likewise.
5494
5495 * src/rec-rset.c (rec_rset_update_types): Parse the list of fields
5496 before invoking rec_type_new while processing %type: special
5497 fields.
5498 (rec_rset_type_field_p): New function.
5499 (rec_rset_update_types): Use rec_rset_type_field_p instead of
5500 rec_type_descr_p.
5501 (rec_rset_rename_field): Likewise.
5502 (rec_rset_type_field_fex): New function.
5503 (rec_rset_rename_field): Use rec_rset_type_field_fex instead of
5504 rec_type_descr_fex.
5505 (rec_rset_update_types): Likewise.
5506
5507 * src/rec-int.c (rec_int_check_descriptor): Likewise.
5508
5509 * src/rec-types.c (rec_type_new): Do not expect the list of field
5510 names in the STR parameter.
5511
5512 * src/rec-utils.c (rec_parse_regexp): Don't store the result of
5513 the parsing in 'result' if it is NULL.
5514
5515 2011-06-21 Jose E. Marchesi <jco@terma.com>
5516
5517 build: get offline builds working again.
5518 * man/Makefile.am (rec2csv.1): Use $(builddir) to get offline
5519 builds working.
5520 (csv2rec.1): Likewise.
5521 (mdb2rec.1): Likewise.
5522 (recdel.1): Likewise.
5523 (recfix.1): Likewise.
5524 (recinf.1): Likewise.
5525 (recins.1): Likewise.
5526 (recsel.1): Likewise.
5527 (recset.1): Likewise.
5528 (recfmt.1): Likewise.
5529
5530 * .gitignore: build-aux/config.guess, build-aux/config.sub.
5531
5532 2011-06-19 Jose E. Marchesi <jemarch@gnu.org>
5533
5534 utils: avoid the truncation of the result of getopt_long in
5535 architectures featuring unsigned chars.
5536 * utils/recfix.c (recfix_parse_args): 'ret' shall be an integer to
5537 not truncate the -1 returned by getopt_long in architectures
5538 featuring unsigned chars.
5539 * utils/recsel.c (recsel_parse_args): Likewise.
5540 * utils/recinf.c (main): Likewise.
5541 * utils/recfmt.c (recfmt_parse_args): Likewise.
5542
5543 2011-06-19 Jose E. Marchesi <jemarch@gnu.org>
5544
5545 m4: files installed by libtool removed. They were causing a clash
5546 on some systems shipping old versions of libtool.
5547 * m4/ltoptions.m4: Deleted.
5548
5549 2011-06-17 Jose E. Marchesi <jemarch@gnu.org>
5550
5551 recins: create the specified file if it does not exist.
5552 * doc/recutils.texi (recins Invocation): recins will create a new
5553 file if it does not exist.
5554
5555 * utils/recset.c (main): Likewise.
5556
5557 * utils/recdel.c (main): Print an error message if the file could
5558 not be opened.
5559
5560 * utils/recutl.c (recutl_read_db_from_file): Return NULL if the
5561 file could not be opened.
5562
5563 * utils/recins.c (main): If the specified file does not exist then
5564 create and populate an empty database.
5565
5566 2011-06-17 Jose E. Marchesi <jemarch@gnu.org>
5567
5568 recins: generate parseable dates that are locale independent.
5569 * utils/recins.c: Include locale.h.
5570 (recins_add_auto_field_date): Set the LC_TIME locale setting to
5571 "C" before calling strftime and restore it to the environment
5572 value afterwards.
5573
5574 2011-06-09 Jose E. Marchesi <jemarch@gnu.org>
5575
5576 ob-rec.el is not part of Emacs.
5577 * etc/ob-rec.el: Not part of Emacs yet.
5578
5579 2011-06-09 Jose E. Marchesi <jemarch@gnu.org>
5580
5581 gitignore updated.
5582 * .gitignore: Several entries added to the ignore list.
5583
5584 2011-05-24 Jose E. Marchesi <jemarch@gnu.org>
5585
5586 On MAC OS X, GNU libtoolize is named 'glibtoolize'.
5587 * autogen.sh: Use glibtoolize instead of libtoolize in Darwin
5588 systems. Reported and fixed by Sven Wick.
5589
5590 2011-05-18 Jose E. Marchesi <jemarch@gnu.org>
5591
5592 Updates to the FSD file.
5593 * FSD (Version): Updated to 1.3
5594 (MaturityLevel): Updated to Production.
5595 (HelpList): New entry.
5596
5597 2011-05-16 Jose E. Marchesi <jemarch@gnu.org>
5598
5599 Fix size constraint handling on LP64 systems. Patch sent by Daiki
5600 Ueno.
5601
5602 2011-05-10 Jose E. Marchesi <jemarch@termi>
5603
5604 Tasktool operations.
5605 * TODO: Task 25 resolved to 'DONE'.
5606 Task 35 created.
5607
5608 2011-05-10 Jose E. Marchesi <jemarch@gnu.org>
5609
5610 librec: support for double quotes for delimiting string literals,
5611 and unescaped newline characters.
5612 * torture/utils/recsel.sh (recsel-sex-string-single-quote): New
5613 test.
5614 (recsel-sex-string-double-quote): New test.
5615 (recsel-sex-string-multiline): New test.
5616
5617 * doc/recutils.texi (SEX Operands): Description of string literals
5618 updated to cover the usage of " as a delimiter and the support for
5619 non-scaped newline characters.
5620
5621 * src/rec-sex-lex.l: Regular expression for string literals
5622 changed to support both ' and " style quotes and to support
5623 newline characters.
5624
5625 2011-05-05 Jose E. Marchesi <jemarch@gnu.org>
5626
5627 Remove unneeded library linkages. Problem reported by Sven Wick.
5628 * utils/Makefile.am (mdb2rec_LDADD): Don't link mdb2rec with glib
5629 in a direct way.
5630 (COMMONLIBS): Don't link the utilities with libgnu.la.
5631
5632 * torture/Makefile.am (runtests_LDADD): Typo fixed: CHECK_LIBS to
5633 CHECKLIBS.
5634
5635 * src/Makefile.am (librec_la_LIBADD): Link with libcurl only if
5636 the REMOVE_ESCRIPTORS automake conditional is set.
5637
5638 * configure.ac: Avoid automatic linking with libcurl by specifying
5639 an action for library-if-found in AC_CHECK_LIB.
5640 Same for libcheck.
5641 Subst CHECKLIBS.
5642
5643 2011-05-04 Jose E. Marchesi <jemarch@gnu.org>
5644
5645 ob-rec.el imported in the repo.
5646 * etc/ob-rec.el: New file.
5647
5648 2011-03-23 Jose E. Marchesi <jemarch@gnu.org>
5649
5650 readme: added note about year intervals in the copyrights.
5651 * README: The GNU maintainers guide asks to include an explicit
5652 statement explaining the usage of year intervals in the copyright
5653 notifications.
5654
5655 2011-02-11 Jose E. Marchesi <jemarch@gnu.org>
5656
5657 Preparation for 1.3.
5658 * .gitignore: Trailing empty line removed.
5659
5660 * configure.ac: Version changed to 1.3.
5661
5662 2011-02-11 Jose E. Marchesi <jemarch@gnu.org>
5663
5664 Translations updated.
5665 * po/de.po: Updated from the translation project.
5666 * po/fi.po: Likewise.
5667 * po/nl.po: Likewise.
5668 * po/sv.po: Likewise.
5669
5670 2011-02-09 Jose E. Marchesi <jemarch@gnu.org>
5671
5672 Documentation for %size.
5673 * doc/recutils.texi (Record Descriptors): Documentation of the
5674 %size special field.
5675
5676 2011-02-09 Jose E. Marchesi <jemarch@gnu.org>
5677
5678 Tests for the %size special field.
5679 * torture/utils/recfix.sh: New input files size-invalid-1,
5680 size-invalid-2, size-exact-zero, size-exact-zero-invalid,
5681 size-exact, size-exact-invalid, size-less, size-less-invalid,
5682 size-less-equal, size-less-equal-invalid, size-bigger,
5683 size-bigger-invalid, size-bigger-equal and
5684 size-bigger-equal-invalid.
5685 (recfix-size-invalid-1): New test.
5686 (recfix-size-invalid-2): New test.
5687 (recfix-size-exact-zero): New test.
5688 (recfix-size-exact-zero-invalid): New test.
5689 (recfix-size-exact): New test.
5690 (recfix-size-exact-invalid): New test.
5691 (recfix-size-less): New test.
5692 (recfix-size-less-invalid): New test.
5693 (recfix-size-less-equal): New test.
5694 (recfix-size-less-equal-invalid): New test.
5695 (recfix-size-bigger): New test.
5696 (recfix-size-bigger-invalid): New test.
5697 (recfix-size-bigger-equal): New test.
5698 (recfix-size-bigger-equal-invalid): New test.
5699
5700 2011-02-08 Jose E. Marchesi <jemarch@gnu.org>
5701
5702 portability fix for macos x.
5703 * torture/rec-type/rec-type-descr-type.c: Include stdlib.h for
5704 malloc, not malloc.h. Macos X does not provide malloc.h
5705
5706 2011-02-08 Jose E. Marchesi <jemarch@gnu.org>
5707
5708 manual: several texinfo fixes and improvements.
5709 * doc/recutils.texi: Use @dots{}.
5710 Use @: after i.e. and e.g. to avoid texinfo to insert double
5711 spacing.
5712 (recfmt Examples): Fix incomplete statement.
5713 Use @var{} for all the parameters in synopsis.
5714
5715 2011-02-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5716
5717 Fix typos and nits in the manual.
5718 * doc/recutils.texi (Introduction, Record Descriptors)
5719 (SEX Operands, recsel Invocation, recset Invocation)
5720 (recfix Examples, recfmt Templates, rec2csv Conversion):
5721 Fix typos, add a few @noindent's.
5722
5723 2011-02-08 Jose E. Marchesi <jemarch@gnu.org>
5724
5725 warnings fixed in the codebase.
5726 * src/rec-utils.c (rec_extract_size): Cast the second argument to
5727 rec_parse_int from size_t* to int*.
5728
5729 * src/rec-rset.c (rec_rset_update_size_constraints): Unused
5730 variable record_elem removed.
5731 (rec_rset_source): Unused variable rset_elem removed.
5732
5733 * src/rec-int.c (rec_int_merge_remote): Return 0.
5734 (rec_int_check_descriptor): Unused variables size_max, size_min,
5735 size and invalid_sizes removed.
5736
5737 * utils/recins.c (recins_add_new_record): Unused variables
5738 errors_str_size, errors_str and errors_buf removed.
5739 (recins_add_auto_field_int): Unused variable new_field removed.
5740
5741 * utils/recdel.c (recdel_delete_records): Unused variable
5742 'errors_buf' removed.
5743
5744 * utils/recfmt.c (recfmt_apply_template): Unused variable 'n'
5745 removed.
5746
5747 * utils/rec2csv.c (rec2csv_generate_csv): Unused variable
5748 'field_index' removed.
5749
5750 * utils/mdb2rec.c (get_field_name): Unused variables field_part_0,
5751 field_part_1 and field_part_2 removed.
5752 (process_table): Unused variable j removed.
5753 (process_mdb): Unused variables 'in' and 'rset' removed.
5754 (main): Set 'ret' to success or failure.
5755
5756 * torture/rec-type-reg/rec-type-reg-get.c (START_TEST): Unused
5757 variable 'type' removed.
5758
5759 * torture/rec-parser/rec-parse-db.c (START_TEST): Unused variable
5760 stm removed.
5761
5762 * torture/rec-parser/rec-parser-eof.c (START_TEST): Unused
5763 variable ci removed.
5764
5765 2011-02-07 Jose E. Marchesi <jemarch@gnu.org>
5766
5767 List of ignored files updated.
5768 * .gitignore: Ignore generated po/*mo files.
5769 Ignore the doc/manual directory.
5770
5771 2011-02-07 Jose E. Marchesi <jemarch@gnu.org>
5772
5773 librec: implementation of the %size field.
5774 * src/rec-rset.c (rec_rset_min_records): New function.
5775 (rec_rset_max_records): New function.
5776 (rec_rset_source): New function.
5777
5778 * src/rec-int.c (rec_int_check_rset): Verify the size restrictions
5779 of the record set.
5780
5781 * src/rec-utils.c (rec_extract_size): New function.
5782 (rec_extract_size_condition): Likewise.
5783
5784 * src/rec-rset.c (rec_rset_update_size_constraints): New function.
5785
5786 * src/rec-utils.c (rec_match): New function.
5787
5788 * src/rec-rset.c (struct rec_rset_s): New fields min_size and
5789 max_size.
5790 (rec_rset_new): Initialize rset->size_min and rset->size_max.
5791 (rec_rset_set_descriptor): Update size constraints.
5792 (rec_rset_update_size_constraints): New function.
5793 Include stdint.h for SIZE_MAX.
5794
5795 * src/rec-int.c (rec_int_check_descriptor): Check for the validity
5796 of values of %size fields.
5797
5798 2011-02-07 Jose E. Marchesi <jemarch@gnu.org>
5799
5800 librec: problem with non initialized variable fixed.
5801 * src/rec-int.c (rec_int_check_descriptor): Initialize 'res' to 0.
5802
5803 2011-02-04 Jose E. Marchesi <jemarch@gnu.org>
5804
5805 Preparation for 1.2.
5806 * NEWS: Updated for 1.2.
5807
5808 * configure.ac: Version changed from 1.1.90 to 1.2.
5809
5810 2011-02-04 Jose E. Marchesi <jemarch@gnu.org>
5811
5812 Translations for German, Swedish, Finnish and Ducht.
5813 * po/de.po: New file from the FTP.
5814 * po/sv.po: Likewise.
5815 * po/nl.po: Likewise.
5816 * po/fi.po: Likewise.
5817
5818 * po/LINGUAS: New file.
5819
5820 2011-02-04 Jose E. Marchesi <jemarch@gnu.org>
5821
5822 manual: some examples fixed.
5823 * doc/recutils.texi (Escalar types): Fix example.
5824 (Enumerated types): Likewise.
5825
5826 2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
5827
5828 Preparation for 1.1.90.
5829 * .x-sc_prohibit_strcmp: Added torture/*.
5830
5831 * .x-sc_prohibit_stddef_without_use: New file.
5832
5833 * po/recutils.pot: Updated for 1.1.90.
5834
5835 * NEWS: Updated for 1.1.90.
5836
5837 * configure.ac: Version changed to 1.1.90.
5838
5839 2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
5840
5841 rec2csv: documentation.
5842 * doc/recutils.texi (rec2csv): New section.
5843 (rec2csv Invocation): New section.
5844 (rec2csv Examples): New section.
5845 (rec2csv Conversion): New section.
5846
5847 2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
5848
5849 rec2csv: tests.
5850 * torture/utils/Makefile.am (TESTS): rec2csv added.
5851
5852 * torture/utils/rec2csv.sh: New file. New input files
5853 'default-records', 'missing-fields', 'missing-fields-first',
5854 'multi-line', 'escape-quotes', 'repeated-fields',
5855 'repeated-missing' and 'several-types'.
5856 (rec2csv-default-record): New test.
5857 (rec2csv-missing-fields): New test.
5858 (rec2csv-missing-fields-first): New test.
5859 (rec2csv-multi-line): New test.
5860 (rec2csv-escape-quotes): New test.
5861 (rec2csv-repeated-fields): New test.
5862 (rec2csv-repeated-missing): New test.
5863 (rec2csv-default-type): New test.
5864 (rec2csv-with-type): New test.
5865 (rec2csv-nonexistent-type): New test.
5866
5867 2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
5868
5869 rec2csv: print data.
5870 * utils/rec2csv.c (rec2csv_process_data): Process either the
5871 specified record rset, or the default one, or the only rset
5872 existing in the file.
5873
5874 2011-02-02 Jose E. Marchesi <jemarch@gnu.org>
5875
5876 rec2csv: print headers.
5877 * utils/rec2csv.c (rec2csv_determine_fields): New function.
5878 * utils/rec2csv.c (rec2csv_generate_csv): Likewise.
5879
5880 * src/rec-fex.c (rec_fex_member_p): Get arguments 'min' and 'max'.
5881 * src/rec-rset.c (rec_rset_update_auto_fields): Use the additional
5882 parameters of rec_fex_member_p.
5883
5884 2011-01-31 Jose E. Marchesi <jemarch@gnu.org>
5885
5886 rec2csv: skeleton of the utility.
5887 * man/Makefile.am (man_MANS): rec2csv.1 added.
5888 (rec2csv.1): New rule.
5889
5890 * utils/Makefile.am (bin_PROGRAMS): rec2csv added.
5891 (rec2csv_SOURCES): Defined.
5892 (rec2csv_LDADD): Defined.
5893
5894 * utils/rec2csv.c: New file.
5895 (recutl_print_help): New function.
5896 (parse_args): Likewise.
5897 (rec2csv_process_data): Likewise.
5898 (main): Likewise.
5899
5900 2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
5901
5902 recins: prepend the auto-generated fields.
5903 * torture/utils/recins.sh: Tests adapted.
5904
5905 * utils/recins.c (recins_add_auto_field_int): Prepend the
5906 auto-generated field instead of appending it.
5907 (recins_add_auto_field_date): Likewise.
5908
5909 2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
5910
5911 Documentation for the auto generated fields.
5912 * doc/recutils.texi (Record Descriptors): List %auto in the list
5913 of allowed special fields.
5914 (recins Invocation): Document --no-auto.
5915 (Auto Generated Fields): auto-generated fields documentation.
5916
5917 2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
5918
5919 Tests for the auto generated fields.
5920 * torture/utils/recins.sh: New input files auto-fields and
5921 auto-range-overflow.
5922 (recins-auto-fields): New test.
5923 (recins-no-auto): New test.
5924 (recins-auto-range-overflow): New test.
5925 (recins-auto-range-overflow-force): New test.
5926
5927 * torture/utils/recfix.sh: New input files auto-int, auto-range,
5928 auto-date, auto-notype and auto-nofex.
5929 (recfix-auto-int): New test.
5930 (recfix-auto-range): New test.
5931 (recfix-auto-date): New test.
5932 (recfix-auto-notype): New test.
5933 (recfix-auto-nofex): New test.
5934
5935 2011-01-30 Jose E. Marchesi <jemarch@gnu.org>
5936
5937 Implementation of auto generated fields.
5938 * utils/recins.c: New argument --no-auto.
5939
5940 * src/rec-types.c (rec_type_min): New function.
5941 (rec_type_max): New function.
5942
5943 * src/rec.h: New function rec_rset_get_field_type.
5944
5945 * utils/recins.c (recins_add_new_record): Add auto-set fields when
5946 replacing a record.
5947 (recins_insert_record): Likewise.
5948 (recins_add_auto_fields): New function.
5949 (recins_add_auto_field_int): New function.
5950 (recins_add_auto_field_date): New function.
5951
5952 * torture/rec-fex/rec-fex-new.c: Adapt tests to the new semantics
5953 of rec_fex_new (NULL,...).
5954
5955 * src/rec.h: New functions rec_fex_append and rec_fex_member_p.
5956 * src/rec-fex.c (rec_fex_append): Implemented.
5957 (rec_fex_member_p): Implemented.
5958 (rec_fex_new): Create an empty FEX if the str parameter is NULL.
5959
5960 * src/rec-rset.c (struct rec_rset_s): New 'auto_fields' member.
5961 (rec_rset_new): Initialize 'auto_fields'.
5962 (rec_rset_set_descriptor): Call rec_rset_update_auto_fields.
5963 (rec_rset_update_auto_fields): New function.
5964 (rec_rset_auto): New function.
5965
5966 * src/rec.h: New function rec_rset_auto, that returns a list with
5967 the names of the auto-set fields in the rset.
5968
5969 * src/rec-int.c (rec_int_check_descriptor): Check that
5970 auto-incremented fields are of type int.
5971
5972 2011-01-29 Jose E. Marchesi <jemarch@gnu.org>
5973
5974 utils: recdel now performs an integrity check of the resulting
5975 database.
5976 * doc/recutils.texi (recdel Invocation): Documentation for
5977 '--force' and '--verbose'.
5978 (recins Invocation): Likewise.
5979 (recset Invocation): Likewise.
5980
5981 * torture/utils/recdel.sh: New input file 'integrity-fail'.
5982 New input file 'external-types'.
5983 New input file 'external'.
5984 (recdel-integrity-fail): New test.
5985 (recdel-force-restrictions): New test.
5986 (recdel-external-fail): New test.
5987 (recdel-no-external): New test.
5988
5989 * utils/recins.c (recins_add_new_record): Use
5990 recutl_check_integrity.
5991
5992 * utils/recdel.c: New parameter --verbose.
5993 New parameter --no-external.
5994
5995 * utils/recutl.h: New function 'recutl_check_integrity'.
5996 * uitls/recutl.c: Likewise.
5997
5998 2011-01-29 Jose E. Marchesi <jemarch@gnu.org>
5999
6000 utils: fix the output of integrity error messages.
6001 * utils/recins.c (recins_add_new_record): Dont use recutl_error to
6002 report the integrity errors.
6003 * utils/recset.c (recset_process_actions): Likewise.
6004
6005 2011-01-29 Jose E. Marchesi <jemarch@gnu.org>
6006
6007 librec: manage problems with the remote descriptors as integrity
6008 errors.
6009 * src/rec-int.c (rec_int_check_descriptor): Call
6010 rec_int_merge_remote.
6011 (rec_int_merge_remote): Return 1 if there is an error fetching the
6012 remote descriptor. 0 otherwise.
6013 (rec_int_merge_remote): Get an errors parameter.
6014 (rec_int_merge_remote): Manage errors as integrity errors.
6015
6016 2011-01-28 Jose E. Marchesi <jemarch@gnu.org>
6017
6018 librec: avoid descriptor expansion when using remote descriptors.
6019 * src/rec-int.c (rec_int_check_rset): Save a backup of the
6020 rset descriptor before to merge any remote descriptor, and restore
6021 it before returning.
6022
6023 * torture/utils/recins.sh: New input files external-descriptor and
6024 external-descriptor-types.
6025 (recins-external-descriptor): New test.
6026
6027 2011-01-25 Jose E. Marchesi <jemarch@gnu.org>
6028
6029 manual: Fix the description of %unique, %prohibit, %mandatory,
6030 %url and %type.
6031 * doc/recutils.texi (Record Descriptors): Fix the documentation of
6032 %prohibit, %mandatory and %unique so it says that the field names
6033 are separated by blanks.
6034 (Record Descriptors): Note that %url can be followed by an URL or
6035 a file path.
6036 (Record Descriptors): Clarify that the list of field names in
6037 %type shall be separated by commas.
6038
6039 Problems reported by Jean-François Ollier.
6040
6041 2011-01-24 Jose E. Marchesi <jemarch@gnu.org>
6042
6043 manual: document the supported regexp flavor.
6044 * doc/recutils.texi (Regular Expressions): New chapter.
6045 (String types): Clarify the supported regexp flavor.
6046 (Field Values): Likewise.
6047
6048 2011-01-24 Jose E. Marchesi <jemarch@gnu.org>
6049
6050 gnulib: update and import regexprops-generic.
6051 * doc/regexprops-generic.texi: New file.
6052
6053 * lib/iswblank.c: New file.
6054
6055 2011-01-23 Jose E. Marchesi <jemarch@gnu.org>
6056
6057 recutl: make recset and recins to keep the permissions of the
6058 operated rec file.
6059 * utils/recutl.c (recutl_write_db_to_file): New variables st1 and
6060 stat_result.
6061 (recutl_write_db_to_file): Record the file attributes of the
6062 original rec file and use its mode in the replace file.
6063 Copyright updated.
6064
6065 Problem reported, and solution outlined by Jean-François Ollier.
6066
6067 2011-01-23 Jose E. Marchesi <jemarch@gnu.org>
6068
6069 torture: tests checking the %prohibit restriction.
6070 * torture/utils/recfix.sh: New input files prohibited-fields and
6071 prohibited-fields-fail.
6072 (recfix-prohibited-fields-ok): New test.
6073 (recfix-prohibited-fields-fail): New test.
6074
6075 2011-01-22 Jose E. Marchesi <jemarch@gnu.org>
6076
6077 Use Task instead of Issue in examples involving TODO.
6078 * doc/recutils.texi (recsel Examples): Issue replaced by Task.
6079 (recins Examples): Likewise.
6080 (recdel Examples): Likewise.
6081 * utils/recinf.c (recutl_print_help): Likewise.
6082
6083 2011-01-14 Jose E. Marchesi <jemarch@gnu.org>
6084
6085 tasktool: use --set-add.
6086 * tasktool (tt_process_cmd_resolve): Use the --set-add option of
6087 tasktool to insert the ClosedAt field when resolving to DONE.
6088
6089 2011-01-14 Jose E. Marchesi <jemarch@gnu.org>
6090
6091 Tasktool operations.
6092 * TODO: Task 29 resolved to 'DONE'.
6093 Task 29 resolved to 'DONE'.
6094
6095 2011-01-12 Jose E. Marchesi <jemarch@gnu.org>
6096
6097 reset: support for the set-add operation.
6098 * doc/recutils.texi (recset Invocation): Documentation for the -S,
6099 --set-add command line option.
6100
6101 * torture/utils/recset.sh (recset-set-add-1): New test.
6102 (recset-set-add-2): New test.
6103 (recset-set-add-3): New test.
6104
6105 * utils/recset.c (RECSET_ACT_SET_ADD): New action.
6106 (COMMON_ARGS): SET_ADD_ACTION_ARG added.
6107 (recutl_print_help): Document -S, --set-add.
6108 (recset_parse_args): Manage the set-add option.
6109 (recset_process_actions): Likewise.
6110 (recset_process_set): New parameter 'add_p' that tells whether to
6111 add missing fields with the given value.
6112 (CHECK_ACTION_PREREQ): New macro.
6113 (recset_parse_args): Use CHECK_ACTION_PREREQ to avoid code
6114 repetition.
6115
6116 2011-01-10 Jose E. Marchesi <jemarch@gnu.org>
6117
6118 TODO: put a comment at the beginning asking to execute ./tasktool
6119 --help.
6120 * tasktool (tt_db_template_header): Modified to include a note
6121 about executing ./tasktool --help.
6122
6123 * TODO: Likewise.
6124
6125 2011-01-10 Jose E. Marchesi <jemarch@gnu.org>
6126
6127 librec: support for comments in enum descriptions.
6128 * doc/recutils.texi (Enumerated types): Comments in enum
6129 descriptions documented.
6130 Copyright updated.
6131
6132 * torture/utils/recfix.sh: New input file 'enum-valid'.
6133 New input file 'enum-invalid-1'.
6134 New input file 'enum-invalid-2'.
6135 (recfix-enum-valid): New test.
6136 (recfix-enum-invalid-1): New test.
6137 (recfix-enum-invalid-2): New test.
6138
6139 * src/rec-types.c (rec_type_parse_enum): Skip comments in
6140 enum descriptions.
6141
6142 2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
6143
6144 Preparation for 1.1.
6145 * .x-sc_prohibit_have_config_h: New file.
6146
6147 * po/POTFILES.in: Updated.
6148
6149 * m4/pkg.m4: Relicense from GPLv2+ to GPLv3+.
6150
6151 * NEWS: Updated to version 1.1.
6152
6153 * man/Makefile.am (man_MANS): recfmt.1 added.
6154 (recfmt.1): New rule.
6155
6156 * configure.ac: Package version changed to 1.1.
6157
6158 2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
6159
6160 rec-sex: support for the string concatenation operator.
6161 * doc/recutils.texi (SEX Operators): Documentation for the string
6162 concatenation operator.
6163
6164 * src/rec-sex.c (rec_sex_eval_node): Manage REC_SEX_OP_CONCAT.
6165
6166 * src/rec-sex-ast.h: New operation REC_SEX_OP_CONCAT.
6167
6168 * src/rec-sex-tab.y: Declare REC_SEX_TOK_AMP as a token.
6169
6170 * src/rec-sex-lex.l: Recognize REC_SEX_TOK_AMP.
6171
6172 2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
6173
6174 rec-sex: support for the conditional expression.
6175 * doc/recutils.texi (SEX Operators): Documentation for the ternary
6176 conditional operator added.
6177
6178 * src/rec-sex.c (rec_sex_eval_node): Manage REC_SEX_OP_COND.
6179
6180 * src/rec-sex-tab.y (CREATE_NODE_OP3): Macro defined.
6181
6182 * src/rec-sex-ast.h: New operation REC_SEX_OP_COND.
6183
6184 * src/rec-sex-tab.y: Declare REC_SEX_TOK_QM and REC_SEX_TOK_COLON
6185 as tokens.
6186
6187 * src/rec-sex-lex.l: Recognize REC_SEX_TOK_QM and
6188 REC_SEX_TOK_COLON.
6189
6190 2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
6191
6192 manual: first draft of the documentation for recfmt.
6193 * doc/recutils.texi (recfmt): New chapter.
6194 (recfmt Invocation): New section.
6195 (recfmt Templates): New section.
6196 (recfmt Examples): New section.
6197
6198 2010-12-23 Jose E. Marchesi <jemarch@gnu.org>
6199
6200 recfmt: use SEX expressions in template slots and change the slot
6201 format.
6202 * src/rec-sex.c (rec_sex_compile): Set the parser ast only if the
6203 parsing was successful.
6204
6205 * src/rec-sex-tab.y (exp): Grammar changed to require an
6206 expression.
6207
6208 * src/rec-sex.c (rec_sex_eval_str): New function.
6209
6210 * utils/recfmt.c (recfmt_apply_template): Use {{...}} marks
6211 instead of <#...>.
6212 (recfmt_get_subst): New function.
6213
6214 2010-12-22 Jose E. Marchesi <jemarch@gnu.org>
6215
6216 recfmt: initial version.
6217 * torture/utils/Makefile.am (TESTS): recfmt.sh added.
6218
6219 * torture/utils/recfmt.sh: New file.
6220 (recfmt-empty-template): New test.
6221 (recfmt-empty-file): New test.
6222 (recfmt-all-records): New test.
6223 (recfmt-slot-beginning): New test.
6224 (recfmt-no-prolog): New test.
6225 (recfmt-subscripts): New test.
6226 (recfmt-non-matching-records): New test.
6227 (recfmt-empty-slot): New test.
6228 (recfmt-invalid-slot): New test.
6229
6230 * src/rec-record.c (rec_record_get_field_by_name): Return NULL if
6231 the specified field is not found, instead of the last field of the
6232 record.
6233
6234 * utils/recutl.h: New function recutl_warning.
6235 New function recutl_read_file.
6236 * utils/recutl.c (recutl_warning): Implemented.
6237 (recutl_read_file): Implemented.
6238
6239 * utils/recfmt.c (recfmt_process_db): New function.
6240 (rec_fmt_apply_template): New function.
6241
6242 * utils/Makefile.am (bin_PROGRAMS): recfmt added.
6243
6244 * utils/recfmt.c: New file.
6245 (recutl_print_help): New function.
6246 (recfmt_parse_args): New function.
6247 (main): New function.
6248
6249 2010-12-22 Jose E. Marchesi <jemarch@gnu.org>
6250
6251 torture: manage errors when running the utilities in the system
6252 tests.
6253 * torture/utils/testutils.sh: Make the tests to fail if there is
6254 an error running a system test.
6255
6256 2010-12-21 Jose E. Marchesi <jemarch@gnu.org>
6257
6258 Portability fixes.
6259 * torture/utils/testutils.sh: Use the portable 'expr' instead of
6260 'bc'.
6261
6262 * src/Makefile.am (AM_CFLAGS): gcc specific options -Wall and
6263 -fno-strict-aliasing removed.
6264
6265 * utils/recutl.h: Include progname.h so the declaration of
6266 program_name is accessible in all the utilities.
6267
6268 * utils/csv2rec.c: program_name global variable removed.
6269 * utils/recset.c: Likewise.
6270 * utils/recsel.c: Likewise.
6271 * utils/recins.c: Likewise.
6272 * utils/recinf.c: Likewise.
6273 * utils/recfix.c: Likewise.
6274 * utils/recdel.c: Likewise.
6275 * utils/mdb2rec.c: Likewise.
6276
6277 * utils/recutl.c: Include progname.h and use set_progname.
6278
6279 * module 'progname' imported from gnulib.
6280
6281 * src/rec.c: Remove the setting of a program_name variable when
6282 compiling with mingw.
6283
6284 * src/rec-sex.c (ATOTS_VAL): Use parse_datetime instead of
6285 get_date.
6286 Include parse-datetime.h instead of getdate.h.
6287 * src/rec-types.c: Likewise.
6288
6289 * po/Makevars.template: Removed.
6290
6291 * README-dev: libcsv dependency removed.
6292 Added a note asking for a recent version of flex.
6293
6294 * m4/pkg.m4: Copied from /usr/share/aclocal/pkg.m4.
6295
6296 2010-12-20 Jose E. Marchesi <jemarch@gnu.org>
6297
6298 Build a librec.dll in mingw.
6299 * src/Makefile.am (AM_LDFLAGS): Use -no-undefined.
6300
6301 * src/rec.c: Avoid an undefined symbol in the generated
6302 librec.dll.
6303
6304 2010-12-20 Jose E. Marchesi <jemarch@gnu.org>
6305
6306 Fix compilation in mingw32.
6307 * src/rec-sex-lex.l: Use %top to get config.h included at the top
6308 of the generated file.
6309
6310 * strsep module imported from gnulib.
6311 * mkdstemp module imported from gnulib.
6312
6313 2010-12-20 Jose E. Marchesi <jemarch@gnu.org>
6314
6315 echo -n is not recognized in macosx. Use printf instead.
6316 * torture/utils/testutils.sh (test_declare_input_file): Use printf
6317 instead of echo -n.
6318 (test_tool): Likewise.
6319 * tasktool (tt_email_p): Likewise.
6320 (tt_process_cmd_note): Likewise.
6321 (tt_process_cmd_create): Likewise.
6322
6323 2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
6324
6325 Misc portability problems fixed.
6326 * utils/recutl.h: Make recutl_fatal and recutl_error to get a
6327 const char pointer as its first argument.
6328
6329 * utils/recutl.c: Include locale.h.
6330
6331 * src/rec-writer.c (rec_write_comment): Use strdup instead of
6332 strdupa.
6333 (rec_write_comment): Avoid freeing a tail of a string returned by
6334 strdup.
6335
6336 2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
6337
6338 Include gettext.h instead of libintl.h.
6339 * src/rec.c: Include gettext.h instead of libintl.h.
6340 * utils/recutl.c: Likewise.
6341 * utils/recset.c: Likewise.
6342 * utils/recsel.c: Likewise.
6343 * utils/recins.c: Likewise.
6344 * utils/recinf.c: Likewise.
6345 * utils/recfix.c: Likewise.
6346 * utils/recdel.c: Likewise.
6347 * utils/mdb2rec.c: Likewise.
6348 * utils/csv2rec.c: Likewise.
6349 * src/rec-utils.c: Likewise.
6350 * src/rec-types.c: Likewise.
6351 * src/rec-parser.c: Likewise.
6352 * src/rec-int.c: Likewise.
6353 * src/rec-field-name.c: Likewise.
6354 * src/rec-fex.c: Likewise.
6355
6356 2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
6357
6358 gettext-h module imported from gnulib.
6359 * m4/configmake.m4: New file.
6360
6361 2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
6362
6363 librec: use %zu instead of %d to print size_t values in *printf
6364 calls.
6365 * src/rec-field.c (rec_field_set_location): Use %zu instead of %d
6366 to print size_t values.
6367 (rec_field_set_char_location): Likewise.
6368 * src/rec-types.c (rec_type_check_size): Likewise.
6369 * src/rec-parser.c (rec_parser_perror): Likewise.
6370 * src/rec-record.c (rec_record_set_location): Likewise.
6371 (rec_record_set_char_location): Likewise.
6372
6373 2010-12-19 Jose E. Marchesi <jemarch@gnu.org>
6374
6375 librec: use the safer construction asprintf instead of sprintf.
6376 * src/rec-fex.c (rec_fex_str): Use asprintf instead of sprintf.
6377 * src/rec-types.c (rec_type_check_size): Likewise.
6378 (rec_type_check_range): Likewise.
6379 * src/rec-record.c (rec_record_set_location): Likewise.
6380 (rec_record_set_char_location): Likewise.
6381 * src/rec-parser.c (rec_parser_perror): Likewise.
6382 * src/rec-int.c (rec_int_check_field_type): Likewise.
6383 (rec_int_check_record_mandatory): Likewise.
6384 (rec_int_check_record_unique): Likewise.
6385 (rec_int_check_record_prohibit): Likewise.
6386 (rec_int_check_record_key): Likewise.
6387 (rec_int_check_descriptor): Likewise.
6388 * src/rec-field.c (rec_field_set_location): Likewise.
6389
6390 2010-12-18 Jose E. Marchesi <jemarch@termi>
6391
6392 Tasktool operations.
6393 * TODO: Task 30 resolved to 'DONE'.
6394
6395 2010-12-18 Jose E. Marchesi <jemarch@gnu.org>
6396
6397 Stop using the non portable open_memstream.
6398 * torture/rec-writer/rec-write-comment.c: Use the
6399 rec_writer_new_str function instead of open_memstream and file
6400 streams.
6401 * torture/rec-writer/rec-write-rset.c: Likewise.
6402 * torture/rec-writer/rec-write-record-with-fex.c: Likewise.
6403 * torture/rec-writer/rec-write-record.c: Likewise.
6404 * torture/rec-writer/rec-write-field-name.c: Likewise.
6405 * torture/rec-writer/rec-write-field.c: Likewise.
6406 * torture/rec-writer/rec-write-db.c: Likewise.
6407
6408 * utils/recins.c: Don't use open_memstream.
6409 * utils/recset.c: Likewise.
6410 * utils/recutl.c: Likewise.
6411
6412 * src/rec-buf.c: New file.
6413
6414 * src/rec.h: Get a char** argument instead of a stream for the
6415 'errors' argument of the function rec_int_check_db,
6416 rec_int_check_rset, rec_int_check_record and
6417 rec_int_check_field_type.
6418 rec_buf_* moved there from pdf-utils.h.
6419
6420 * src/rec-writer.c: Support a rec_buf_t backend in the writer.
6421 (rec_writer_new_str): New function.
6422 (rec_writer_puts): Use the rec_buf backend if selected.
6423 (rec_writer_putc): Likewise.
6424 (rec_write_field_str): Use a rec_buf_t backed writer.
6425 (rec_write_field_name_str): Likewise.
6426 (rec_write_comment_str): Likewise.
6427
6428 * src/rec-record.c (rec_record_to_comment): Use rec_buf_new
6429 instead of the non portable open_memstream.
6430 * src/rec-rset.c (rec_rset_rename_field): Likewise.
6431
6432 * src/rec-types.c (rec_type_check): Use rec_buf_new instead of the
6433 non portable open_memstream.
6434 (rec_type_check_int): Likewise.
6435 (rec_type_check_field): Likewise.
6436 (rec_type_check_bool): Likewise.
6437 (rec_type_check_range): Likewise.
6438 (rec_type_check_real): Likewise.
6439 (rec_type_check_size): Likewise.
6440 (rec_type_check_line): Likewise.
6441 (rec_type_check_regexp): Likewise.
6442 (rec_type_check_date): Likewise.
6443 (rec_type_check_email): Likewise.
6444 (rec_type_check_enum): Likewise.
6445
6446 2010-12-17 Jose E. Marchesi <jemarch@gnu.org>
6447
6448 rec-utils: new open_memstream like API for rec_buf_t.
6449 * src/rec-parser.c (rec_parse_field_name_part): Use the new
6450 rec_buf_t API.
6451 (rec_parse_comment): Likewise.
6452 (rec_parse_field_value): Likewise.
6453
6454 * src/rec-utils.h: New interface for the rec_buf_t abstract data
6455 type, including: rec_buf_new, rec_buf_putc, rec_buf_puts and
6456 rec_buf_close.
6457 * src/rec-utils.c: rec_buf_new, rec_buf_putc, rec_buf_puts and
6458 rec_buf_close implemented based in the old implementation.
6459
6460 2010-12-16 Jose E. Marchesi <jemarch@gnu.org>
6461
6462 syntax-check fixes.
6463 * libcsv/libcsv.c (VERSION): Changed to 3.0.0-recutils.
6464 Include config.h.
6465
6466 2010-12-16 Jose E. Marchesi <jemarch@termi>
6467
6468 Tasktool operations.
6469 * TODO: Task 34 resolved to 'DONE'.
6470
6471 2010-12-16 Jose E. Marchesi <jemarch@gnu.org>
6472
6473 libcsv embedded in the source tree.
6474 * utils/csv2rec.c: Include csv.h instead of libcsv/csv.h.
6475
6476 * utils/Makefile.am (csv2rec_LDADD): Link with libcsv.la.
6477 (AM_CPPFLAGS): Add the libcsv/ directory to the include path.
6478
6479 * configure.ac: Checks for libcsv removed.
6480 Conditional COMPILE_CSV2REC removed.
6481
6482 * Makefile.am (SUBDIRS): libcsv/ added.
6483
6484 * libcsv/csv.h: Imported from libcsv-3.0.0.tar.gz and relicensed
6485 from LGPL2.1+ to GPLv3.
6486 * libcsv/libcsv.c: Likewise.
6487
6488 * libcsv/Makefile.am: New file.
6489
6490 2010-12-16 Jose Marchesi <jco@wilhelm>
6491
6492 Tasktool operations.
6493 * TODO: Task 34 created.
6494
6495 2010-12-15 Jose E. Marchesi <jemarch@gnu.org>
6496
6497 tasktool: first version of log subcommand.
6498 * tasktool (tt_process_cmd_log): New function.
6499 (tt_help_log): New variable.
6500 (tt_parse_arguments): Handle the 'log' subcommand.
6501
6502 2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
6503
6504 librec: new function rec_buf_add_str in rec-utils.
6505 * src/rec-utils.h: New function 'rec_buf_add_str'.
6506
6507 * src/rec-utils.c (rec_buf_add_str): New function.
6508
6509 2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
6510
6511 librec: rec_parser_buf abstraction moved to rec-utils as rec_buf.
6512 * src/rec-parser.c: Use the rec_buf_* functions instead of the
6513 rec_parser_buf_* functions.
6514 Include rec-utils.h.
6515
6516 * src/rec-utils.c: Implementation of the rec_buf_t type and the
6517 rec_buf_* functions, moved and adapted from rec-parser.c.
6518
6519 * src/rec-utils.h: New rec_buf_t abstract data type, renamed from
6520 the rec_parser_buf_t type and functions in rec-parser.h.
6521
6522 2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
6523
6524 Tasktool operations.
6525 * TODO: Note added for task 30.
6526
6527 2010-12-14 Jose E. Marchesi <jemarch@gnu.org>
6528
6529 librec: remove the usage of the non-portable fmemopen.
6530 * torture/rec-parser/rec-parse-db.c: Replace uses of fmemopen by
6531 buffer backed parsers.
6532 * torture/rec-parser/rec-parse-field.c: Likewise.
6533 * torture/rec-parser/rec-parse-field-name.c: Likewise.
6534 * torture/rec-parser/rec-parse-record.c: Likewise.
6535 * torture/rec-parser/rec-parser-eof.c: Likewise.
6536 * torture/rec-parser/rec-parser-error.c: Likewise.
6537 * torture/rec-parser/rec-parser-perror.c: Likewise.
6538 * torture/rec-parser/rec-parser-reset.c: Likewise.
6539 * torture/rec-parser/rec-parse-rset.c: Likewise.
6540
6541 * src/rec-parser.c (rec_parse_field_name_str): Rewritten to use
6542 rec_parser_new_str and rec_parser_eof instead of fmemopen.
6543 (rec_parse_record_str): Likewise.
6544
6545 * torture/rec-parser/rec-parser-new-str.c: New file.
6546 (test_rec_parser_new_str): New function.
6547 (rec_parser_new_str_nominal): New test.
6548
6549 * src/rec-parser.c: New member 'buffer' in the struct
6550 rec_parser_s.
6551 (rec_parser_init_common): New function.
6552 (rec_parser_getc): Use the buffer backend if the parser was
6553 created with rec_parser_new_str.
6554 (rec_parser_ungetc): Likewise.
6555
6556 2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
6557
6558 rec-mode: several fixes.
6559 * etc/rec-mode.el: Several fixes.
6560 * utils/recinf.c (print_info_file): Print "unknown" only if
6561 generated normal output. It was breaking the sexps.
6562
6563 2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
6564
6565 recins: check for integrity problems regardless of operational
6566 mode.
6567 * utils/recfix.c (recfix_process_data): Use new semantics of
6568 rec_int_check_db.
6569
6570 * src/rec-int.c (rec_int_check_db): Return the number of errors
6571 found while checking the integrity of the database.
6572 (rec_int_merge_remote): Unused variable removed.
6573
6574 * utils/recins.c (recins_add_new_record): Check for the integrity
6575 of the new database in both operation modes: normal and replace.
6576
6577 2010-12-13 Jose Marchesi <jco@wilhelm>
6578
6579 Tasktool operations.
6580 * TODO: Task 30 edited.
6581 Task 30 edited.
6582
6583 2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
6584
6585 librec: don't allow several %rec: fields in record descriptors.
6586 * src/rec-int.c (rec_int_check_descriptor): Don't allow more than
6587 one %rec: fields in record descriptors.
6588
6589 * torture/utils/recfix.sh: New tests 'recfix-one-rec' and
6590 'recfix-multiple-rec-in-descriptor'.
6591
6592 2010-12-13 Jose E. Marchesi <jemarch@gnu.org>
6593
6594 rec-mode: initial version of rec-cmd-compile.
6595 * etc/rec-mode.el (rec-mode-edit-map): Map the rec-cmd-compile
6596 command.
6597 (rec-mode-map): Likewise.
6598 (rec-recfix): New variable.
6599 (rec-cmd-compile): New function.
6600
6601 2010-12-10 Jose Marchesi <jemarch@gnu.org>
6602
6603 Tasktool operations.
6604 * TODO: Task 28 resolved to 'DONE'.
6605
6606 2010-12-10 Jose E. Marchesi <jemarch@gnu.org>
6607
6608 tasktool: support for categories.
6609 * tasktool (tt_task_categories): New category 'rec-mode'.
6610 (tt_process_cmd_list): Support the -c|--category parameter.
6611 (tt_db_template_task): Set 'Category' as a mandatory field.
6612
6613 * TODO: Updated to reflect the new categories.
6614
6615 2010-12-04 Jose E. Marchesi <jemarch@termi>
6616
6617 Tasktool operations.
6618 * TODO: Task 30 created.
6619 Task 30 edited.
6620
6621 2010-12-04 Jose E. Marchesi <jemarch@gnu.org>
6622
6623 librec: do not include malloc.h. Include the more portable
6624 stdlib.h instead.
6625 * src/rec-fex.c: Include stdlib.h instead of malloc.h.
6626 * src/rec-field-name.c: Likewise.
6627 * src/rec-field.c: Likewise.
6628 * src/rec-parser.c: Likewise.
6629 * src/rec-record.c: Likewise.
6630 * src/rec-rset.c: Likewise.
6631 * src/rec-sex.c: Likewise.
6632 * src/rec-writer.c: Likewise.
6633
6634 2010-12-04 Jose E. Marchesi <jemarch@gnu.org>
6635
6636 Avoid a segmentation fault in rec_write_rset.
6637 * src/rec-writer.c (rec_write_rset): Make sure that the descriptor
6638 of a record set exists before to try to write it. Problem
6639 reported by Elias Pipping.
6640
6641 2010-12-02 Jose E. Marchesi <jemarch@gnu.org>
6642
6643 rec-types: support ranges with implicit minimum limit.
6644 * torture/utils/recfix.sh (recfix-ranges-ok): New test.
6645 (recfix-ranges-xfail-1): New test.
6646 (recfix-ranges-xfail-2): New test.
6647
6648 * torture/rec-type/rec-type-new.c: Test ranges with just one
6649 index.
6650
6651 * src/rec-types.c (REC_TYPE_RANGE_DESCR_RE): Allow the omission of
6652 one of the indexes of the range.
6653 (rec_type_parse_range): Allow the omission of one of the indexes.
6654
6655 2010-12-02 Jose E. Marchesi <jemarch@gnu.org>
6656
6657 mdb2rec: normalise field names appearing in %type fields.
6658 * utils/mdb2rec.c (process_table): Use normalised field name parts
6659 in the %type: entries for columns.
6660
6661 2010-12-01 Jose E. Marchesi <jemarch@termi>
6662
6663 Tasktool operations.
6664 * TODO: Task 29 created.
6665
6666 2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
6667
6668 tasktool: fix the setting of the close time when resolving.
6669 * tasktool (tt_process_cmd_resolve): Add or set the closing time
6670 for a task, depending if there is an existing 'ClosedAt' field.
6671
6672 2010-12-01 Jose E. Marchesi <jemarch@termi>
6673
6674 Tasktool operations.
6675 * TODO: Task 25 edited.
6676 Task 28 created.
6677 Task 27 created.
6678 Task 24 edited.
6679 Task 26 created.
6680
6681 2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
6682
6683 tasktool: control record support.
6684 * TODO: Control record added.
6685
6686 * tasktool: Support for the TasktoolControl record and NextFreeId
6687 field added.
6688
6689 2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
6690
6691 rec-writer: cover an additional special case in rec_write_rset.
6692 * src/rec-writer.c (rec_write_rset): Cover the special case where
6693 a record set contains a set of comments followed by the record
6694 descriptor.
6695
6696 * torture/utils/recins.sh: New tests 'recins-only-descriptor' and
6697 'recins-comments-and-descriptor'.
6698
6699 2010-12-01 Jose E. Marchesi <jemarch@gnu.org>
6700
6701 tasktool: escape parameters passed to eval.
6702 * tasktool (tt_escape_single_quoted): New function.
6703 (tt_process_cmd_create): Escape all the parameters used in single
6704 quoted strings passed to eval.
6705
6706 2010-11-30 Jose E. Marchesi <jemarch@termi>
6707
6708 Tasktool operations.
6709 * TODO: Task 19 resolved to 'DONE'.
6710 Task 24 edited.
6711 Task 24 created.
6712
6713 2010-11-30 Jose E. Marchesi <jemarch@gnu.org>
6714
6715 Tests for the before, after and sametime operators.
6716 * torture/utils/recsel.sh: New input file 'dates'.
6717 (recsel-sex-date-sametime): New test.
6718 (recsel-sex-date-before): New test.
6719 (recsel-sex-date-after): New test.
6720
6721 2010-11-30 Jose E. Marchesi <jemarch@gnu.org>
6722
6723 Documentation of the before, after and sametime operators.
6724 * doc/recutils.texi (SEX Operators): Date operators documented.
6725
6726 2010-11-30 Jose E. Marchesi <jemarch@gnu.org>
6727
6728 Date operators before, after and sametime implementation.
6729 * src/rec-sex.c (timespec_subtract): New function.
6730 (rec_sex_eval_node): Manage REC_SEX_OP_BEFORE.
6731 (rec_sex_eval_node): Manage REC_SEX_OP_AFTER.
6732 (rec_sex_eval_node): Manage REC_SEX_OP_SAMETIME.
6733
6734 * src/rec-sex-ast.h: Constants for the date operators.
6735
6736 * src/rec-sex-tab.y: Support for the date operators.
6737
6738 * src/rec-sex-lex.l: New tokens for date operators '<<', '>>' and
6739 '=='.
6740
6741 2010-11-29 Jose E. Marchesi <jemarch@gnu.org>
6742
6743 * NEWS: Updated for 1.0 release.
6744
6745 2010-11-27 Jose E. Marchesi <jemarch@gnu.org>
6746
6747 Syntax check fixes.
6748 * TESTS: Regenerated.
6749
6750 * torture/rec-record/rec-record-field-p.c: Trailing blanks
6751 removed.
6752
6753 * torture/utils/Makefile.am (TESTS_ENVIRONMENT): Use
6754 $(PATH_SEPARATOR) instead of ':'.
6755
6756 2010-11-27 Jose E. Marchesi <jemarch@termi>
6757
6758 Tasktool operations.
6759 * TODO: Task 22 edited.
6760
6761 2010-11-27 Jose E. Marchesi <jemarch@gnu.org>
6762
6763 Support for file paths as external descriptors.
6764 * src/rec-types.c (rec_type_check_enum): Add digits in enum
6765 constants.
6766
6767 * doc/recutils.texi (External Descriptors): File paths in external
6768 descriptors sources documented.
6769
6770 * src/rec-int.c (rec_int_rec_type_p): Use REC_FILE_REGEXP.
6771
6772 * src/rec-utils.c (rec_extract_file): New file.
6773
6774 2010-11-25 Jose E. Marchesi <jemarch@termi>
6775
6776 Tasktool operations.
6777 * TODO: Task 23 edited.
6778 Task 18 edited.
6779
6780 2010-11-25 Jose E. Marchesi <jemarch@gnu.org>
6781
6782 recset: support for -r|--rename.
6783 * torture/rec-type/rec-type-descr-type.c: New file.
6784 (test_rec_type_descr_type): New function.
6785 (rec_type_descr_type_nominal): New test.
6786 (rec_type_descr_type_invalid): New test.
6787
6788 * src/rec-types.c (rec_type_descr_type): New function.
6789
6790 * TODO: Regenerated.
6791
6792 * torture/rec-fex/rec-fex-str.c: New file.
6793 (test_rec_fex_str): New function.
6794 (rec_fex_str_nominal): New test.
6795
6796 * src/rec-fex.c (rec_fex_elem_set_field_name): New function.
6797 (rec_fex_str): New function.
6798
6799 * src/rec-rset.c (rec_rset_rename_field): New function.
6800
6801 * torture/utils/recset.sh:
6802 (recset-rename): New test.
6803 (recset-rename-first): New test.
6804 (recset-rename-middle): New test.
6805 (recset-rename-last): New test.
6806 (recset-rename-range-first): New test.
6807 (recset-rename-range-last): New test.
6808 (recset-rename-range-all): New test.
6809 (recset-rename-all): New test.
6810 (recset-rename-all-descriptor): New test.
6811 (recset-rename-all-key): New test.
6812 (recset-rename-invalid-fex): New test.
6813
6814 * doc/recutils.texi (recset Invocation): Document -r|--rename.
6815 (recset Examples): Added example for recset rename.
6816
6817 * utils/recset.c (recutl_print_help): New option -r|--rename
6818 documented.
6819 (RECSET_ACT_RENAME): New constant.
6820 (recset_process_ren): New function.
6821
6822 2010-11-23 Jose E. Marchesi <jemarch@termi>
6823
6824 Tasktool operations.
6825 * TODO: Task 23 created.
6826
6827 2010-11-23 Jose E. Marchesi <jemarch@gnu.org>
6828
6829 System tests for the utilities.
6830 * torture/utils/recfix.sh: New file.
6831 (recfix-type-int-valid): New test.
6832 (recfix-type-int-invalid): New test.
6833 (recfix-type-real-valid): New test.
6834 (recfix-type-real-invalid): New test.
6835 (recfix-duplicated-keys): New test.
6836 (recfix-missing-mandatory): New test.
6837 (recfix-several-unique): New test.
6838 (recfix-referred-type): New test.
6839 (recfix-hidden-type): New test.
6840
6841 * torture/utils/testutils.sh: Support expected statuses 'ok' and
6842 'xfail' in 'test_tool'.
6843
6844 * torture/utils/recset.sh: New file.
6845 (recset-append-field): New test.
6846 (recset-set-field): New test.
6847 (recset-delete-field): New test.
6848 (recset-comment-out-field): New test.
6849 (recset-delete-non-existant): New test.
6850 (recset-comment-out-fex-first): New test.
6851 (recset-comment-out-fex-last): New test.
6852 (recset-force-integrity): New test.
6853
6854 * torture/utils/recins.sh: New file.
6855 (recins-empty): New test.
6856 (recins-empty-with-type): New test.
6857 (recins-several-fields): New test.
6858 (recins-append): New test.
6859 (recins-append-in-type): New test.
6860 (recins-append-new-type): New test.
6861 (recins-replace): New test.
6862 (recins-replace-sex): New test.
6863 (recins-force-restrictions): New test.
6864
6865 * torture/utils/recdel.sh: New file.
6866 (recdel-first): New test.
6867 (recdel-second): New test.
6868 (recdel-last): New test.
6869 (recdel-comment): New test.
6870 (recdel-sex): New test.
6871 (recdel-type): New test.
6872 (recdel-force-all): New test.
6873
6874 * utils/recutl.c (recutl_write_db_to_file): Close the stream to
6875 'out' if it is not 'stdout' only.
6876
6877 * torture/utils/recinf.sh: New file.
6878 (recinf-empty): New test.
6879 (recinf-one-record): New test.
6880 (recinf-multiple-records): New test.
6881 (recinf-multiple-named): New test.
6882 (recinf-multiple-named-descriptors): New test.
6883 (recinf-multiple-types): New test.
6884 (recinf-names-only): New test.
6885
6886 * torture/Makefile.am (SUBDIRS): Process the current directory
6887 before 'utils/'.
6888 (recsel-sex-sharp-zero): New test.
6889 (recsel-sex-sharp-one): New test.
6890 (recsel-sex-sharp-multiple): New test.
6891 (recsel-sex-match): New test.
6892
6893 2010-11-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6894
6895 manual: fix overlong lines and a couple of examples.
6896 * doc/recutils.texi (recsel Invocation, recins Invocation)
6897 (recins Examples): Do not recommend appending to a file while
6898 reading it. Avoid overlong lines in the synopses and examples.
6899
6900 2010-11-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6901
6902 Fix make check in VPATH case.
6903 * torture/utils/recsel.sh: Ensure $srcdir is set; read
6904 testsutils.sh from $srcdir.
6905 * torture/utils/testutils.sh: Add $srcdir to PATH.
6906
6907 2010-11-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6908
6909 Tasktool operations.
6910 * tasktool (tt_add_changelog_entry): Use portable sed features
6911 only. Avoid changing more than the first matching entry.
6912
6913 2010-11-20 Jose E. Marchesi <jemarch@gnu.org>
6914
6915 Support negative integer and real literals in selection
6916 expressions.
6917 * src/rec-sex-lex.l: Support negative integers and reals in the
6918 lexer level.
6919
6920 * torture/utils/recsel.sh: Integer and real operators tests.
6921
6922 2010-11-20 Jose E. Marchesi <jemarch@termi>
6923
6924 Tasktool operations.
6925 * TODO: Task 11 edited.
6926
6927 2010-11-20 Jose E. Marchesi <jemarch@gnu.org>
6928
6929 * tasktool (tt_process_cmd_list): Do not include tasks in
6930 "resolution" status by default.
6931 Include the status in the list.
6932
6933 2010-11-19 Jose E. Marchesi <jemarch@termi>
6934
6935 Tasktool operations.
6936 * TODO: Task 3 edited.
6937
6938 2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
6939
6940 * torture/utils/Makefile.am: New file.
6941
6942 2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
6943
6944 rec-sex: unit tests.
6945 * torture/rec-sex/rec-sex-eval.c: New file.
6946 (test_rec_sex_eval): New function.
6947 (rec_sex_eval_match): New test.
6948 (rec_sex_eval_nomatch): New test.
6949
6950 * torture/rec-sex/rec-sex-compile.c: New file.
6951 (test_rec_sex_compile): New function.
6952 (rec_sex_compile_nominal): New test.
6953 (rec_sex_compile_invalid): New test.
6954
6955 * torture/rec-sex/rec-sex-destroy.c: New file.
6956 (test_rec_sex_destroy): New function.
6957 (rec_sex_destroy_nominal): New test.
6958
6959 * torture/rec-sex/rec-sex-new.c: New file.
6960 (test_rec_sex_new): New function.
6961 (rec_sex_new_nominal): New test.
6962
6963 * torture/rec-sex/tsuite-rec-sex.c: New file.
6964 (tsuite_rec_sex): New function.
6965
6966 2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
6967
6968 utils: compilation warnings removed.
6969 * utils/recinf.c: Unused variables removed.
6970 * utils/recsel.c: Likewise.
6971 * utils/recset.c: Likewise.
6972 * utils/recins.c: Likewise.
6973
6974 2010-11-15 Jose E. Marchesi <jemarch@gnu.org>
6975
6976 rec-writer: unit tests.
6977 * torture/rec-writer/rec-write-comment-str.c: New file.
6978 (test_rec_write_comment_str): New function.
6979 (rec_write_comment_str_nominal): New test.
6980 (rec_write_comment_str_sexp): New test.
6981
6982 * torture/rec-writer/rec-write-field-str.c: New file.
6983 (test_rec_write_field_str): New function.
6984 (rec_write_field_str_nominal): New test.
6985 (rec_write_field_str_sexp): New test.
6986
6987 * torture/rec-writer/rec-write-field-name-str.c: New file.
6988 (test_rec_write_field_name_str): New function.
6989 (rec_write_field_name_str_nominal): New test.
6990 (rec_write_field_name_str_sexp): New test.
6991
6992 * torture/rec-writer/rec-write-db.c: New file.
6993 (test_rec_write_db): New function.
6994 (rec_write_db_nominal): New test.
6995
6996 * torture/rec-writer/rec-write-rset.c: New file.
6997 (test_rec_write_rset): New function.
6998 (rec_write_rset_nominal): New test.
6999
7000 * torture/rec-writer/rec-write-record-with-fex.c: New file.
7001 (test_rec_write_record_with_fex): New function.
7002 (rec_write_record_with_fex_nominal): New test.
7003 (rec_write_record_with_fex_values): New test.
7004 (rec_write_record_with_fex_rows): New test.
7005
7006 2010-11-14 Jose E. Marchesi <jemarch@gnu.org>
7007
7008 rec-write unit tests.
7009 * torture/rec-writer/rec-write-record.c: New file.
7010 (test_rec_write_record): New function.
7011 (rec_write_record_nominal): New test.
7012 (rec_write_record_sexp): New test.
7013
7014 * torture/rec-writer/rec-write-field-name.c: New file.
7015 (test_rec_write_field_name): New function.
7016 (rec_write_field_name_nominal): New test.
7017 (rec_write_field_name_sexp): New test.
7018
7019 * torture/rec-writer/rec-write-field.c: New file.
7020 (test_rec_write_field): New function.
7021 (rec_write_field_nominal): New test.
7022 (rec_write_field_sexp): New test.
7023
7024 * torture/rec-writer/rec-write-comment.c: New file.
7025 (test_rec_write_comment): New function.
7026 (rec_write_comment_nominal): New test.
7027 (rec_write_comment_sexp): New test.
7028
7029 * torture/rec-writer/rec-writer-destroy.c: New file.
7030 (test_rec_writer_destroy): New function.
7031 (rec_writer_destroy_nominal): New test.
7032
7033 * torture/rec-writer/rec-writer-new.c: New file.
7034 (test_rec_writer_new): New function.
7035 (rec_writer_new_nominal): New test.
7036
7037 * torture/rec-writer/tsuite-rec-writer.c: New file.
7038 (tsuite_rec_writer): New function.
7039
7040 2010-11-13 Jose E. Marchesi <jemarch@gnu.org>
7041
7042 rec-parser unit tests.
7043 * torture/rec-parser/rec-parser-perror.c: New file.
7044 (test_rec_parser_perror): New function.
7045 (rec_parser_perror_nominal): New test.
7046
7047 * torture/rec-parser/rec-parser-reset.c: New file.
7048 (test_rec_parser_reset): New function.
7049 (rec_parser_reset_nominal): New test.
7050
7051 * torture/rec-parser/rec-parser-error.c: New file.
7052 (test_rec_parser_error): New function.
7053 (rec_parser_error_nominal): New test.
7054
7055 * torture/rec-parser/rec-parser-eof.c: New file.
7056 (test_rec_parser_eof): New function.
7057 (rec_parser_eof_nominal): New test.
7058
7059 * torture/rec-parser/rec-parse-db.c: New file.
7060 (test_rec_parse_db): New function.
7061 (rec_parse_db_nominal): New test.
7062 (rec_parse_db_invalid): New test.
7063
7064 * torture/rec-parser/rec-parse-rset.c: New file.
7065 (test_rec_parse_rset): New function.
7066 (rec_parse_rset_nominal): New test.
7067 (rec_parse_rset_invalid): New test.
7068
7069 * torture/rec-parser/rec-parse-record.c: New file.
7070 (test_rec_parse_record): New function.
7071 (rec_parse_record_nominal): New test.
7072 (rec_parse_record_invalid): New test.
7073
7074 * torture/rec-parser/rec-parse-field.c: New file.
7075 (test_rec_parse_field): New function.
7076 (rec_parse_field_nominal): New test.
7077 (rec_parse_field_invalid): New test.
7078
7079 * torture/rec-parser/rec-parse-field-name.c: New file.
7080 (test_rec_parse_field_name): New function.
7081 (rec_parse_field_name_nominal): New test.
7082 (rec_parse_field_name_invalid): New test.
7083
7084 * torture/rec-parser/rec-parse-field-name-str.c: New file.
7085 (test_rec_parse_field_name_str): New function.
7086 (rec_parse_field_name_str_nominal): New test.
7087 (rec_parse_field_name_str_invalid): New test.
7088
7089 * torture/rec-parser/rec-parser-destroy.c: New file.
7090 (test_rec_parser_destroy): New function.
7091 (rec_parser_destroy_nominal): New test.
7092
7093 * torture/rec-parser/rec-parser-new.c: New file.
7094 (test_rec_parser_new): New function.
7095 (rec_parser_new_nominal): New test.
7096
7097 * torture/rec-parser/tsuite-rec-parser.c: New file.
7098 (tsuite_rec_parser): New function.
7099
7100 2010-11-12 Jose E. Marchesi <jemarch@gnu.org>
7101
7102 rec-field unit tests.
7103 * torture/rec-field/rec-field-to-comment.c: New file.
7104 (test_rec_field_to_comment): New function.
7105 (rec_field_to_comment_nominal): New test.
7106
7107 * torture/rec-field/rec-field-set-char-location.c: New file.
7108 (test_rec_field_set_char_location): New function.
7109 (rec_field_set_char_location_nominal): New test.
7110
7111 * torture/rec-field/rec-field-char-location-str.c: New file.
7112 (test_rec_field_char_location_str): New function.
7113 (rec_field_char_location_str_nominal): New test.
7114
7115 * torture/rec-field/rec-field-char-location.c: New file.
7116 (test_rec_field_char_location): New function.
7117 (rec_field_char_location_nominal): New test.
7118
7119 * torture/rec-field/rec-field-set-location.c: New file.
7120 (test_rec_field_set_location): New function.
7121 (rec_field_set_location_nominal): New test.
7122
7123 * torture/rec-field/rec-field-location-str.c: New file.
7124 (test_rec_field_location_str): New function.
7125 (rec_field_location_str_nominal): New test.
7126
7127 * torture/rec-field/rec-field-location.c: New file.
7128 (test_rec_field_location): New function.
7129 (rec_field_location_nominal): New test.
7130
7131 * torture/rec-field/rec-field-set-source.c: New file.
7132 (test_rec_field_set_source): New function.
7133 (rec_field_set_source_nominal): New test.
7134
7135 * torture/rec-field/rec-field-source.c: New file.
7136 (test_rec_field_source): New function.
7137 (rec_field_source_nominal): New test.
7138
7139 * torture/rec-field/rec-field-equal-p.c: New file.
7140 (test_rec_field_equal_p): New function.
7141 (rec_field_equal_p_equal): New test.
7142 (rec_field_equal_p_nonequal): New test.
7143
7144 * torture/rec-field/rec-field-name-str.c: New file.
7145 (test_rec_field_name_str): New function.
7146 (rec_field_name_str_nominal): New test.
7147
7148 * torture/rec-field/rec-field-destroy.c: New file.
7149 (test_rec_field_destroy): New function.
7150 (rec_field_destroy_nominal): New test.
7151
7152 * torture/rec-field/rec-field-new-str.c: New file.
7153 (test_rec_field_new_str): New function.
7154 (rec_field_new_str_nominal): New test.
7155 (rec_field_new_str_invalid): New test.
7156
7157 * torture/rec-field/rec-field-new.c: New file.
7158 (test_rec_field_new): New function.
7159 (rec_field_new_nominal): New test.
7160
7161 2010-11-12 Jose E. Marchesi <jemarch@gnu.org>
7162
7163 More rec-fex unit tests.
7164 * torture/rec-fex/rec-fex-elem-max.c: New file.
7165 (test_rec_fex_elem_max): New function.
7166 (rec_fex_elem_max_nosubs): New test.
7167 (rec_fex_elem_max_min): New test.
7168 (rec_fex_elem_max_minmax): New test.
7169
7170 * torture/rec-fex/rec-fex-elem-min.c: New file.
7171 (test_rec_fex_elem_min): New function.
7172 (rec_fex_elem_min_nosubs): New test.
7173 (rec_fex_elem_min_min): New test.
7174 (rec_fex_elem_min_minmax): New test.
7175
7176 * torture/rec-fex/rec-fex-elem-field-name-str.c: New file.
7177 (test_rec_fex_elem_field_name_str): New function.
7178 (rec_fex_elem_field_name_str_nominal): New test.
7179
7180 2010-11-10 Jose E. Marchesi <jemarch@gnu.org>
7181
7182 More rec-fex unit tests.
7183 * torture/rec-fex/rec-fex-elem-field-name.c: New file.
7184 (test_rec_fex_elem_field_name): New function.
7185 (rec_fex_elem_field_name_nominal): New test.
7186
7187 * torture/rec-fex/rec-fex-get.c: New file.
7188 (test_rec_fex_get): New function.
7189 (rec_fex_get_nominal): New test.
7190 (rec_fex_get_invalid): New test.
7191
7192 2010-11-09 Jose E. Marchesi <jemarch@gnu.org>
7193
7194 rec-fex unit tests and some fixes.
7195 * torture/rec-fex/rec-fex-size.c: New file.
7196 (test_rec_fex_size): New function.
7197 (rec_fex_size_nominal): New test.
7198
7199 * torture/rec-fex/rec-fex-sort.c: New file.
7200 (test_rec_fex_sort): New function.
7201 (rec_fex_sort_nominal): New test.
7202
7203 * torture/rec-fex/rec-fex-check.c: New file.
7204 (test_rec_fex_check): New funtion.
7205 (rec_fex_check_simple_nominal): New test.
7206 (rec_fex_check_simple_invalid): New test.
7207 (rec_fex_check_csv_nominal): New test.
7208 (rec_fex_check_csv_invalid): New test.
7209 (rec_fex_check_sub_nominal): New test.
7210 (rec_fex_check_sub_invalid): New test.
7211
7212 * torture/rec-fex/rec-fex-destroy.c: New file.
7213 (test_rec_fex_destroy): New function.
7214 (rec_fex_destroy_nominal): New test.
7215
7216 * src/rec-fex.c (rec_fex_parse_elem): Support for maximum part in
7217 subscripts.
7218
7219 * torture/rec-fex/rec-fex-new.c: New file.
7220 (test_rec_fex_new): New function.
7221 (rec_fex_new_single): New test.
7222 (rec_fex_new_simple): New test.
7223 (rec_fex_new_subscripts): New test.
7224
7225 * torture/rec-fex/tsuite-rec-fex.c: New file.
7226 (tsuite_rec_fex): New function.
7227
7228 2010-11-09 Jose E. Marchesi <jemarch@gnu.org>
7229
7230 Lists of field names supported in type definitions. Closes task
7231 12.
7232 * TESTS: Regenerated.
7233
7234 * torture/rec-type/tsuite-rec-type.c: Reference rec-type-descr-fex
7235 instead of rec-type-descr-field-name.
7236 * torture/Makefile.am (REC_TYPE_TSUITE): Likewise.
7237
7238 * torture/rec-type/rec-type-descr-fex.c: File renamed from
7239 'rec-type-descr-field-name.c'.
7240
7241 * src/rec-rset.c: Include rec-utils.h.
7242
7243 * src/rec-types.c (REC_TYPE_DESCR_RE): Regexp modified to allow a
7244 comma-separated list of field names as part of the type
7245 descriptor.
7246 (rec_type_new): Skip the list of field names.
7247 (rec_type_descr_fex): Renamed from 'rec_type_descr_field_name'.
7248
7249 2010-11-08 Jose E. Marchesi <jemarch@termi>
7250
7251 Tasktool operations.
7252 * TODO: Task 19 created.
7253
7254 2010-11-08 Jose E. Marchesi <jemarch@gnu.org>
7255
7256 * tasktool: Make 'test' to use -ne and -eq for integer
7257 comparisons. Problem reported by Ralf Wildenhues.
7258
7259 2010-11-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7260
7261 * doc/recutils.texi (recset Invocation): Avoid double `='.
7262
7263 * man/Makefile.am (man_MANS): Do not build man pages when
7264 associated programs are not present.
7265
7266 * tasktool (tt_rec_check_utility): Fix redirection.
7267
7268 2010-11-07 Jose E. Marchesi <jemarch@termi>
7269
7270 Tasktool operations.
7271 * TODO: Task 16 created.
7272
7273 2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
7274
7275 Some improvements.
7276 * doc/recutils.texi (Record Descriptors): Documentation of the
7277 special fields fixed.
7278
7279 2010-11-07 Jose E. Marchesi <jemarch@termi>
7280
7281 Tasktool operations.
7282 * TODO: Task 15 created.
7283
7284 2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
7285
7286 * AUTHORS: Ralf Wildenhues added.
7287
7288 2010-11-07 Jose E. Marchesi <jemarch@termi>
7289
7290 Tasktool operations.
7291 * TODO: Task 14 created.
7292 Task 22 created.
7293 Task 10 edited.
7294 Task 21 edited.
7295 Task 21 created.
7296 Task 9 edited.
7297 Task 8 edited.
7298 Task 20 created.
7299 Task 18 created.
7300 Task 17 created.
7301
7302 2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
7303
7304 recins: support replace mode.
7305 * tasktool (tt_supported_vcs): Use the replace-mode of recins.
7306
7307 * doc/recutils.texi (recins Invocation): Replace mode documented.
7308
7309 * utils/recins.c (COMMON_ARGS): RECORD_SELECTION_ARGS added.
7310 (recutl_print_help): Print the record selection --help output.
7311 (recins_parse_args): Manage record selection arguments.
7312
7313 2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
7314
7315 recins: support -r|--record.
7316 * doc/recutils.texi (recins Invocation): Document -r|--record.
7317
7318 * src/rec-parser.c (rec_parse_record_str): New function.
7319
7320 * utils/recins.c (COMMON_ARGS): RECORD_ARG added.
7321 (recins_parse_args): Manage the -r|--record option.
7322
7323 2010-11-07 Jose E. Marchesi <jemarch@gnu.org>
7324
7325 tasktool: support filtering by assigned-to in list command.
7326 * tasktool: Support the --assigned-to option in 'list'.
7327 (tt_supported_vcs): Use generic names for the fields in the
7328 selection expression.
7329 (tt_help_edit): New variable.
7330 (tt_process_cmd_show): New function.
7331
7332 2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
7333
7334 Syntax check fixes.
7335 * src/rec-int.c: Useless cpp parens removed.
7336 * src/rec.c: Likewise.
7337
7338 * .x-sc_prohibit_always_true_header_tests: New file.
7339
7340 * cfg.mk (gnulib_dir): Set gnulib_dir.
7341
7342 * ChangeLog: Empty lines removed.
7343 * .x-sc_trailing_blank: Likewise.
7344 More exceptions added.
7345
7346 * po/POTFILES.in: Updated.
7347
7348 * .x-sc_prohibit_S_IS_definition: New file.
7349
7350 * .x-sc_obsolete_symbols: New file.
7351
7352 2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
7353
7354 * configure.ac: Generate etc/Makefile.
7355
7356 * etc/Makefile.am: New file.
7357
7358 2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
7359
7360 * etc/FSD.rec: New file.
7361
7362 * doc/recutils.texi: Document the --no-remote command line
7363 argument for recins, recfix and recset.
7364
7365 * utils/recins.c: Support the --no-remote command line argument.
7366 * utils/recfix.c: Likewise.
7367 * utils/recset.c: Likewise.
7368
7369 * src/rec-int.c (rec_int_check_rset): New function argument
7370 'remote_descriptor_p'.
7371 (rec_int_check_rset): Call 'rec_int_merge_remote'.
7372 (rec_int_merge_remote): New function.
7373 Include regex.h.
7374
7375 2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
7376
7377 tasktool: support for ChangeLog annotations.
7378 * tasktool (tt_supported_vcs): New function.
7379
7380 2010-11-06 Jose E. Marchesi <jemarch@gnu.org>
7381
7382 * configure.ac: Version changed from git to 1.0.
7383
7384 * TODO: Some tasks added.
7385
7386 2010-11-05 Jose E. Marchesi <jemarch@gnu.org>
7387
7388 * TODO: First serious version.
7389
7390 * tasktool: Fixed many problems and 'delete' command implemented.
7391
7392 2010-11-03 Jose E. Marchesi <jemarch@gnu.org>
7393
7394 recfix: little fixes.
7395 * utils/recfix.c (main): Use EXIT_SUCCESS and EXIT_FAILURE.
7396 (recfix_process_data): Fix wrong comparison.
7397
7398 2010-11-02 Jose E. Marchesi <jemarch@gnu.org>
7399
7400 Generate manpages using help2man.
7401 * configure.ac: Generate man/Makefile.
7402
7403 * man/Makefile.am: New file.
7404
7405 * configure.ac: Search for help2man if not cross-compiling.
7406
7407 2010-11-01 Jose E. Marchesi <jemarch@gnu.org>
7408
7409 Syntax check problems fixed.
7410 * src/rec-writer.c: Include config.h.
7411 * torture/runtests.c: Likewise.
7412
7413 * tasktool: Use test ... && test ... instead of test ... -a
7414 ... (likewise for ||).
7415
7416 * utils/csv2rec.c (parse_args): Use EXIT_* values.
7417 * utils/recutl.h: Likewise.
7418 * utils/recutl.c: Likewise.
7419 * utils/recset.c: Likewise.
7420 * utils/recsel.c: Likewise.
7421 * utils/recins.c: Likewise.
7422 * utils/recinf.c: Likewise.
7423 * utils/recfix.c: Likewise.
7424 * utils/recdel.c: Likewise.
7425 * utils/mdb2rec.c: Likewise.
7426 * src/rec-types.c: Likewise.
7427 * src/rec-sex.c: Likewise.
7428
7429 2010-11-01 Jose E. Marchesi <jemarch@gnu.org>
7430
7431 Make distcheck to work.
7432 * doc/recutils.texi: Include version.texi.
7433
7434 * doc/Makefile.am (TEXI_TEXINFOS): Added getdate.texi.
7435
7436 * torture/rec-mset/rec-mset-count.c: Include
7437 rec-mset/elem-types.h.
7438 * torture/rec-mset/rec-mset-type-p.c: Likewise.
7439 * torture/rec-mset/rec-mset-register-type.c: Likewise.
7440 * torture/rec-mset/rec-mset-dup.c: Likewise.
7441
7442 * torture/Makefile.am (AM_CPPFLAGS): -I$(top_srcdir)/torture
7443 added.
7444
7445 2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
7446
7447 Warnings removed in the codebase.
7448 * src/rec-sex.c: Include rec-utils.h.
7449
7450 * src/rec-sex.l: Include rec-utils.h.
7451
7452 * src/rec-types.c (rec_type_new): Missing cases REC_TYPE_DATE and
7453 REC_TYPE_EMAIL added.
7454 Include rec-utils.h for rec-atoi.
7455 (rec_type_parse_regexp): Unused variable 'b' removed.
7456 (rec_type_descr_field_name): Likewise.
7457 (rec_type_new): Likewise.
7458 (rec_type_parse_size): Unused variable 'ret' removed.
7459 (rec_type_parse_regexp_type): Unused variable 'escaping' removed.
7460
7461 * src/rec-fex.c: Include rec-utils.h for rec-atoi.
7462 Unused static function rec_fex_parse_int removed.
7463
7464 2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
7465
7466 Coverage report generation.
7467 * build-aux/generate-coverage-report: New file, from libgnupdf.
7468
7469 * configure.ac: Support the --enable-coverage switch.
7470
7471 * src/Makefile.am (AM_CFLAGS): Add coverage gcc options if
7472 compiling the library with coverage support.
7473
7474 2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
7475
7476 rec-type-reg unit tests and bug fixes.
7477 * torture/rec-type-reg/rec-type-reg-get.c: New file.
7478 (test_rec_type_reg_get): New function.
7479 (rec_type_reg_get_nominal): New test.
7480 (rec_type_reg_get_nonexisting): New test.
7481
7482 * torture/rec-type-reg/rec-type-reg-register.c: New file.
7483 (test_rec_type_reg_register): New function.
7484 (rec_type_reg_register_nominal): New test.
7485
7486 * torture/rec-type-reg/rec-type-reg-destroy.c: New file.
7487 (test_rec_type_reg_destroy): New function.
7488 (rec_type_reg_destroy_nominal): New test.
7489
7490 * torture/rec-type-reg/rec-type-reg-new.c: New file.
7491 (test_rec_type_reg_new): New function.
7492 (rec_type_reg_new_nominal): New test.
7493
7494 * torture/rec-type-reg/tsuite-rec-type-reg.c: New file.
7495 (tsuite_rec_type_reg): New function.
7496
7497 2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
7498
7499 rec-type unit tests and bug fixes.
7500 * torture/rec-type/rec-type-check.c: New file.
7501 (test_rec_type_check): New function.
7502 (rec_type_check_int): New test.
7503 (rec_type_check_bool): New test.
7504 (rec_type_check_range): New test.
7505 (rec_type_check_real): New test.
7506 (rec_type_check_size): New test.
7507 (rec_type_check_line): New test.
7508 (rec_type_check_regexp): New test.
7509 (rec_type_check_date): New test.
7510 (rec_type_check_enum): New test.
7511 (rec_type_check_field): New test.
7512 (rec_type_check_email): New test.
7513
7514 * torture/rec-type/rec-type-equal-p.c: New file.
7515 (test_rec_type_equal_p): New function.
7516 (rec_type_equal_p_nominal): New test.
7517
7518 * torture/rec-type/rec-type-kind-str.c: New file.
7519 (test_rec_type_kind_str): New function.
7520 (rec_type_kind_str_nominal): New test.
7521
7522 * torture/rec-type/rec-type-kind.c: New file.
7523 (test_rec_type_kind): New function.
7524 (rec_type_kind_nominal): New test.
7525
7526 * torture/rec-type/rec-type-descr-field-name.c: New file.
7527 (test_rec_type_descr_field_name): New function.
7528 (rec_type_descr_field_name_nominal): New test.
7529 (rec_type_descr_field_name_invalid): New test.
7530
7531 * torture/rec-type/rec-type-descr-p.c: New file.
7532 (test_rec_type_descr_p): New function.
7533 (rec_type_descr_p_nominal): New test.
7534 (rec_type_descr_p_invalid): New test.
7535
7536 * torture/rec-type/rec-type-destroy.c: New file.
7537 (test_rec_type_destroy): New function.
7538 (rec_type_destroy_nominal): New test.
7539
7540 * torture/rec-type/rec-type-new.c: New file.
7541 (test_rec_type_new): New function.
7542 (rec_type_new_nominal): New test.
7543 (rec_type_new_invalid): New test.
7544
7545 * torture/rec-type/tsuite-rec-type.c: New file.
7546 (tsuite_rec_type): New function.
7547
7548 2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
7549
7550 rec-field-name unit tests and bug fixes.
7551 * TESTS: Regenerated.
7552
7553 * torture/rec-field-name/rec-field-name-part-normalise.c: New
7554 file.
7555 (test_rec_field_name_part_normalise): New function.
7556 (rec_field_name_part_normalise_nominal): New test.
7557
7558 * torture/rec-field-name/rec-field-name-str-p.c: New file.
7559 (test_rec_field_name_str_p): New function.
7560 (rec_field_name_str_p_nominal): New test.
7561
7562 * torture/rec-field-name/rec-field-name-part-str-p.c: New file.
7563 (test_rec_field_name_part_str_p): New function.
7564 (rec_field_name_part_str_p_nominal): New test.
7565
7566 * torture/rec-field-name/rec-field-name-get.c: New file.
7567 (test_rec_field_name_get): New function.
7568 (rec_field_name_get_nominal): New test.
7569
7570 * torture/rec-field-name/rec-field-name-set.c: New file.
7571 (test_rec_field_name_set): New function.
7572 (rec_field_name_set_nominal): New test.
7573
7574 * torture/rec-field-name/rec-field-name-size.c: New file.
7575 (test_rec_field_name_size): New function.
7576 (rec_field_name_size_empty): New test.
7577 (rec_field_name_size_nonempty): New test.
7578
7579 * torture/rec-field-name/rec-field-name-ref-p.c: New file.
7580 (test_rec_field_name_ref_p): New function.
7581 (rec_field_name_ref_p_empty): New test.
7582 (rec_field_naem_ref_p_nonempty): New test.
7583
7584 * torture/rec-field-name/rec-field-name-equal-p.c: New file.
7585 (test_rec_field_name_equal_p): New function.
7586 (rec_field_name_equal_p_empty): New test.
7587 (rec_field_name_equal_p_nonempty): New test.
7588
7589 * torture/rec-field-name/rec-field-name-eql-p.c: New file.
7590 (test_rec_field_name_eql_p): New function.
7591 (rec_field_name_eql_p_empty): New test.
7592 (rec_field_naem_eql_p_nonempty): New test.
7593
7594 * torture/rec-field-name/rec-field-name-dup.c: New file.
7595 (test_rec_field_name_dup): New function.
7596 (rec_field_name_dup_empty): New test.
7597 (rec_field_name_dup_nominal): New test.
7598
7599 * torture/rec-field-name/rec-field-name-destroy.c: New file.
7600 (test_rec_field_name_destroy): New function.
7601 (rec_field_name_destroy_nominal): New test.
7602
7603 * torture/rec-field-name/tsuite-rec-field-name.c: New file.
7604
7605 * torture/rec-field-name/rec-field-name-new.c: New file.
7606 (test_rec_field_name_new): New function.
7607 (rec_field_name_new_nominal): New test.
7608
7609 2010-10-29 Jose E. Marchesi <jemarch@gnu.org>
7610
7611 rec-comment unit tests and bug fixes.
7612 * TESTS: regenerated.
7613
7614 * src/rec-comment.c (rec_comment_new): Check for a NULL argument.
7615
7616 * torture/rec-comment/rec-comment/equal-p.c: New file.
7617 (test_rec_comment_equal_p): New function.
7618 (rec_comment_equal_p_nominal): New test.
7619
7620 * torture/rec-comment/rec-comment-set-text.c: New file.
7621 (test_rec_comment_set_text): New function.
7622 (rec_comment_set_text_nominal): New test.
7623
7624 * torture/rec-comment/rec-commment-text.c: New file.
7625 (test_rec_comment_text): New function.
7626 (rec_comment_text_nominal): New test.
7627 (rec_comment_text_empty): New test.
7628
7629 * torture/rec-comment/rec-comment-dup.c: New file.
7630 (test_rec_comment_dup): New function.
7631 (rec_comment_dup_nominal): New test.
7632
7633 * torture/rec-comment/rec-comment-new.c: New file.
7634 (test_rec_comment_new): New function.
7635 (rec_comment_new_nominal): New test.
7636 (rec_comment_new_null): New test.
7637
7638 * torture/rec-comment/rec-comment-destroy.c: New file.
7639 (test_rec_comment_destroy): New function.
7640 (rec_comment_destroy_nominal): New test.
7641
7642 * torture/runtests.c (main): rec-comment test suite added.
7643
7644 * torture/Makefile.am: rec-comment files added.
7645
7646 * torture/rec-comment/tsuite-rec-comment.c: New file.
7647 (tsuite_rec_comment): New function.
7648
7649 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7650
7651 Regenerate TESTS.
7652 * TESTS: Regenerated.
7653
7654 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7655
7656 Unit tests for rec_mset_get.
7657 * torture/rec-mset/rec-mset-get.c: New file
7658 (test_rec_mset_get): New function.
7659 (rec_mset_get_empty): New test.
7660 (rec_mset_get_existing): New test.
7661 (rec_mset_get_any): New test.
7662 (rec_mset_get_invalid): New test.
7663
7664 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7665
7666 Unit tests for rec_mset_count.
7667 * torture/rec-mset/rec-mset-count.c: New file.
7668 (test_rec_mset_count): New function.
7669 (rec_mset_count_empty): New test.
7670 (rec_mset_count_existing): New test.
7671 (rec_mset_count_nonexisting): New test.
7672
7673 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7674
7675 Unit tests for rec_mset_register_type.
7676 * torture/rec-mset/rec-mset-register-type.c: New file.
7677 (test_rec_mset_register_type): New function.
7678 (rec_mset_register_type_nominal): New test.
7679
7680 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7681
7682 Unit tests for rec_mset_type_p.
7683 * torture/rec-mset/rec-mset-type-p.c: New file.
7684 (test_rec_mset_type_p): New function.
7685 (rec_mset_type_p_any): New test.
7686 (rec_mset_type_p_existing): New test.
7687 (rec_mset_type_p_nonexisting): New test.
7688
7689 * torture/rec-mset/elem-types.h: New file.
7690
7691 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7692
7693 Unit tests for rec_mset_dup, and a bug fixed.
7694 * src/rec-mset.c (rec_mset_dup): Avoid duplicating the counter of
7695 nodes of the element types.
7696
7697 * torture/Makefile.am (REC_MSET_TSUITE): rec-mset-dup.c added.
7698
7699 * torture/rec-mset/rec-mset-dup.c: New file.
7700 (test_rec_mset_dup): New function.
7701 (rec_mset_dup_empty): New test.
7702
7703 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7704
7705 rec_mset test suite.
7706 * torture/runtests.c: rec_mset test suite added.
7707
7708 * torture/Makefile.am: Include files from the rec_mset test suite.
7709
7710 * torture/rec-mset/rec-mset-new.c: New file.
7711 (rec_mset_new_and_destroy): New unit test.
7712
7713 * torture/rec-mset/tsuite-rec-mset.c: New file.
7714 (tsuite_rec_mset): New function.
7715
7716 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7717
7718 * tasktool (tt_db_template_header): New variable.
7719 (tt_db_template_issue): New variable.
7720 (tt_db_template): Use tt_db_template_header and tt_db_template_issue.
7721 (tt_db_wish): New variable.
7722 (tt_db_wish_id): New variable.
7723 (tt_db_wish_summary): New variable.
7724 (tt_db_wish_description): New variable.
7725
7726 2010-10-28 Jose E. Marchesi <jemarch@gnu.org>
7727
7728 Documentation improvements.
7729 * utils/recset.c (recutl_print_help): Don't duplicate the
7730 --case-insensitive option in the output of --help.
7731
7732 * utils/recinf.c (recutl_print_help): Print a newline before the
7733 examples in the output of --help.
7734
7735 * doc/recutils.texi: Documentation for recdel, recins, recset and
7736 recfix added to the reference manual.
7737
7738 2010-10-25 Jose E. Marchesi <jemarch@gnu.org>
7739
7740 User manual work.
7741 * doc/recutils.texi (Fields and Records): Wording improvements.
7742 (Escalar types): Completed.
7743 (String types): Completed.
7744 (Time related types): Completed.
7745 (recinf Invocation): Document -S|--print-sexps.
7746
7747 * doc/recutils.texi (Top): Improve the menu layout.
7748
7749 2010-10-24 Jose E. Marchesi <jemarch@gnu.org>
7750
7751 i18n with gettext.
7752 * m4/gettext.m4: Upgrade to gettext-0.18.1.
7753 * m4/iconv.m4: Upgrade to gettext-0.18.1.
7754 * m4/lib-ld.m4: Upgrade to gettext-0.18.1.
7755 * m4/lib-link.m4: Upgrade to gettext-0.18.1.
7756 * m4/progtest.m4: Upgrade to gettext-0.18.1.
7757 * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.18.1.
7758
7759 * src/Makefile.am (librec_la_SOURCES): Add rec.c.
7760
7761 * src/rec-fex.c: Internationalize strings with gettext.
7762 * src/rec-types.c: Likewise.
7763 * src/rec-parser.c: Likewise.
7764 * src/rec-int.c: Likewise.
7765 * src/rec-field-name.c: Likewise.
7766 * utils/recutl.c: Likewise.
7767 * utils/recset.c: Likewise.
7768 * utils/recsel.c: Likewise.
7769 * utils/recins.c: Likewise.
7770 * utils/recinf.c: Likewise.
7771 * utils/recdel.c: Likewise.
7772 * utils/mdb2rec.c: Likewise.
7773 * utils/csv2rec.c: Likewise.
7774
7775 * Makefile.am (SUBDIRS): Add po.
7776
7777 2010-09-23 Jose E. Marchesi <jemarch@gnu.org>
7778
7779 * configure.ac: Invoke AB_INIT.
7780
7781 2010-09-19 Jose E. Marchesi <jemarch@gnu.org>
7782
7783 Simple fix in --help.
7784 * utils/recutl.h (COMMON_ARGS_DOC): Don't mention recsel in the
7785 description of the --version option.
7786
7787 2010-09-14 Jose E. Marchesi <jemarch@gnu.org>
7788
7789 rec-mode: make C-a to do the right thing.
7790 * lisp/rec-mode.el (rec-mode-map): Bind C-a to
7791 rec-cmd-beginning-of-line.
7792 (rec-mode-edit-map): Likewise.
7793 (rec-cmd-beginning-of-line): New function.
7794
7795 2010-09-09 Jose E. Marchesi <jemarch@gnu.org>
7796
7797 Support for localization on lisp output.
7798 * src/rec-record.c: New fiels 'char_location' and
7799 'char_location_str' in the 'rec_record_s' struct.
7800
7801 * src/rec-parser.c (rec_parse_field): Set the char location of
7802 fields.
7803 (rec_parser_ungetc): Decrease parser->character.
7804
7805 * src/rec-field.c: New functions 'rec_field_char_location',
7806 'rec_field_set_char_location' and 'rec_field_char_location_str'.
7807
7808 * src/rec-parser.c: Use size_t instead of int for the 'line' field
7809 of the rec_parser_s structure.
7810 (rec_parser_getc): Update parser->character as well.
7811 (rec_parser_new): Initialize parser->character to 0.
7812
7813 2010-09-09 Jose E. Marchesi <jemarch@gnu.org>
7814
7815 Support for lisp output.
7816 * utils/recinf.c: Support the -S option.
7817
7818 * utils/recsel.c: Likewise.
7819
7820 * src/rec-writer.c (rec_write_record): New 'mode' argument.
7821 (rec_write_field_name): Likewise.
7822 (rec_write_field): Likewise.
7823 (rec_write_field_str): Likewise.
7824
7825 * src/rec.h: New function.
7826 (rec_writer_mode_t): New data type.
7827
7828 2010-09-02 Jose E. Marchesi <jemarch@gnu.org>
7829
7830 Little doc improvements.
7831 * doc/recutils.texi: Little doc improvements.
7832
7833 2010-08-24 Jose E. Marchesi <jemarch@gnu.org>
7834
7835 fixes in the parsing of types.
7836 * src/rec-int.c (rec_int_check_descriptor): Localize the error in
7837 the concrete field.
7838
7839 * src/rec-types.c: Parsing routines rewritten.
7840
7841 2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
7842
7843 * src/rec-types.c (rec_type_skip_blanks): New function.
7844 (rec_type_descr_field_name): Use rec_type_skip_blanks.
7845 (rec_type_new): Likewise.
7846 (rec_type_parse_int): New function.
7847
7848 2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
7849
7850 rec-sex: support for real values in some operators.
7851 * src/rec-sex.c (rec_sex_op_real_p): New function.
7852 (ATOF_VAL): New macro.
7853
7854 2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
7855
7856 utilities: use xmalloc and xstrdup.
7857 * utils/csv2rec.c: Use xmalloc instead of malloc.
7858 Use xstrdup instead of strdup.
7859 Include xalloc.h.
7860
7861 * utils/recutl.h: Likewise.
7862
7863 * utils/recutl.c: Likewise.
7864
7865 * utils/recset.c: Likewise.
7866
7867 * utils/recins.c: Likewise.
7868
7869 * utils/mdb2rec.c: Likewise.
7870
7871 2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
7872
7873 mdb2rec: documentation and management of money fields.
7874 * utils/mdb2rec.c (process_table): Declare MONEY fields as real
7875 values.
7876
7877 * doc/recutils.texi (mdb2rec Examples): Written.
7878
7879 2010-08-23 Jose E. Marchesi <jemarch@gnu.org>
7880
7881 rec-types: support for the 'field' type.
7882 * src/rec-types.c (REC_TYPE_FIELD_NAME): Defined.
7883 (REC_TYPE_FIELD_VALUE_RE): Defined in terms of REC_FNAME_RE.
7884 (REC_TYPE_NAME_RE): REC_TYPE_FIELD_NAME added.
7885 (REC_TYPE_FIELD_DESCR_RE): Defined.
7886 (REC_TYPE_DESCR_RE): REC_TYPE_FIELD_DESCR_RE added.
7887 (rec_type_kind_str): Added case for REC_TYPE_FIELD.
7888 (rec_type_check): Likewise.
7889 (rec_type_parse_type_kind): Likewise.
7890 (rec_type_check_field): New function.
7891
7892 * src/rec.h (REC_FNAME_RE): Do not include anchors in regexp.
7893
7894 2010-08-23 Jose E. Marchesi <jemarch@gnu.com>
7895
7896 mdb2rec: specification of the table in the command line and the
7897 list-tables option.
7898 * doc/recutils.texi (mdb2rec Invocation): Document the
7899 --list-tables command line option.
7900
7901 * utils/mdb2rec.c (process_mdb): Print the names of the tables,
7902 one per line, if mdb2rec_list_tables was specified.
7903
7904 * doc/recutils.texi (mdb2rec Invocation): Document the usage of
7905 TABLE in the command line.
7906
7907 * utils/mdb2rec.c: New global variable 'mdb2rec_mdb_table'.
7908 (parse_args): Set mdb2rec_mdb_table.
7909 (process_mdb): Process the requested table only if
7910 mdb2rec_mdb_table is initialized.
7911
7912 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7913
7914 mdb2rec: emit field types for VARCHAR columns.
7915 * src/rec-types.c (rec_type_new): Finish the number[] string with
7916 a null value.
7917
7918 * utils/mdb2rec.c (process_table): Process case when col_size > 0.
7919
7920 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7921
7922 rec-int: warn on colling types only if the types are different.
7923 * src/rec-int.c (rec_int_check_field_type): Emit warning on
7924 colliding types only if the types are not equal.
7925
7926 * src/rec-types.c (rec_type_equal_p): New function.
7927
7928 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7929
7930 mdb2rec: use compound field names to reflect relationships between
7931 columns in the mdb tables.
7932 * utils/mdb2rec.c (get_field_name): New function.
7933 (process_table): Use 'get_field_name'.
7934
7935 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7936
7937 manual: texinfo fixes.
7938 * doc/recutils.texi: mdb2rec is a chapter.
7939 Fix mdb2rec menu.
7940
7941 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7942
7943 build: advertise third-party dependencies.
7944 * README-dev: Add a note on the dependencies on third party
7945 products.
7946
7947 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7948
7949 Validation of record type names and minor fixes.
7950 * utils/mdb2rec.c (process_table): Use
7951 'rec_field_name_part_normalise'.
7952
7953 * src/rec-field-name.c (rec_field_name_part_normalise): New
7954 function.
7955
7956 * utils/mdb2rec.c (process_mdb): Configure libmdb to dump dates in
7957 ISO 8601 format.
7958
7959 * src/rec-int.c (rec_int_check_descriptor): Check for the validity
7960 of the record set type.
7961
7962 * utils/recutl.h (RECORD_SELECTION_ARGS_CASES): Check for the
7963 validity of the record types passed using -t.
7964
7965 * src/rec.h: New function 'rec_field_name_str_p'.
7966 New function 'rec_field_name_part_str_p'.
7967 (REC_FNAME_PART_RE): Defined.
7968 (REC_FNAME_RE): Defined.
7969
7970 * src/rec-field-name.c (rec_field_name_str_p): New function.
7971 (rec_field_name_part_str_p): New function.
7972
7973 * doc/recutils.texi (Record Descriptors): Clarify that the record
7974 types have the same format restrictions that field names.
7975
7976 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7977
7978 build: check for glib as a dependency to build mdb2rec.
7979 * configure.ac: Check for glib.
7980
7981 * utils/mdb2rec.c: Include glib.h.
7982
7983 2010-08-22 Jose E. Marchesi <jemarch@gnu.org>
7984
7985 mdb2rec: normalize field names and new option to keep empty fields
7986 in the rec output.
7987 * doc/recutils.texi (mdb2rec Invocation): Document '-e'.
7988
7989 * utils/mdb2rec.c (parse_args): Manage '-e'.
7990 (process_table): Normalize field names.
7991
7992 2010-08-21 Jose E. Marchesi <jemarch@gnu.org>
7993
7994 utils: new util mdb2rec.
7995 * src/rec-writer.c (rec_write_rset): Manage special case: empty
7996 record sets with a record descriptor.
7997
7998 * src/rec.h: New function 'rec_field_new_str'.
7999
8000 * src/rec-field.c (rec_field_new_str): Idem.
8001
8002 2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
8003
8004 * configure.ac: Search for libmdbtools and define MDBLIBS.
8005
8006 * utils/Makefile.am: Build mdb2rec.
8007
8008 * utils/mdb2rec.c: New file.
8009
8010 2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
8011
8012 csv2rec: several minor fixes.
8013 * utils/csv2rec.c (main): Make sure a rec database was created
8014 before to attempt to write it.
8015
8016 * configure.ac: Emit a warning if libcsv is not found, noticing
8017 the user that csv2rec won't build.
8018
8019 2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
8020
8021 Fixing of memory errors.
8022 * src/rec-sex.c (rec_sex_eval_node): Free the memory used by the
8023 compiled regexps.
8024
8025 * utils/recfix.c (main): Free the memory used by the rec database.
8026
8027 * utils/recsel.c (main): Likewise.
8028
8029 * utils/recsel.c (recsel_process_data): Free the memory used by
8030 the rec writer.
8031
8032 * src/rec-parser.c (rec_parser_buf_adjust): Realloc to adjust the
8033 memory used by the buffer.
8034
8035 * src/rec-sex.l (rec_sex_lex_extract_name): Avoid an invalid write
8036 after the res[] buffer.
8037
8038 2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
8039
8040 utils: new util csv2rec.
8041 * doc/recutils.texi (csv2rec): New chapter.
8042
8043 * configure.ac: Check for libcsv and define the LIBCSV automake
8044 conditional accondingly.
8045
8046 * utils/Makefile.am (bin_PROGRAMS): csv2rec added.
8047 (csv2rec_SOURCES): New variable.
8048 (csv2rec_LDADD): New variable.
8049
8050 * utils/csv2rec.c: New file.
8051
8052 2010-08-20 Jose E. Marchesi <jemarch@gnu.org>
8053
8054 build: fix autogen.sh.
8055 * autogen.sh: Call libtoolize.
8056 Invoke automake with --add-missing.
8057
8058 2010-08-09 Jose E. Marchesi <jemarch@gnu.org>
8059
8060 Little script to get cyclomatic metrics from pmccabe.
8061 * build-aux/pmccabe2rec: New file.
8062
8063 2010-08-08 Jose E. Marchesi <jemarch@gnu.org>
8064
8065 Fix source in parse error messages in recinf.
8066 * utils/recinf.c (print_info_file): Specify the file name in parse
8067 errors instead of 'stdin'.
8068
8069 2010-08-08 Jose E. Marchesi <jemarch@gnu.org>
8070
8071 Generate information about tests in rec format and store it in
8072 TESTS.
8073 * README-dev: Added a note on updating the TESTS file when a test
8074 is added to the test suite.
8075
8076 * TESTS (Test): New file, generated ith 'get-test-data'.
8077
8078 * build-aux/get-test-data: New file.
8079
8080 * torture/rec-record/rec-record-size.c: rec_record_size_001
8081 renamed to rec_record_size_empty.
8082 rec_record_size_002 renamed to rec_record_size_nonempty.
8083 (test_rec_record_size): Call to rec_record_size_empty and
8084 rec_record_size_nonempty.
8085
8086 * torture/rec-record/rec-record-remove-field.c:
8087 rec_record_remove_field_001 renamed to
8088 rec_record_remove_field_existing.
8089 (test_rec_record_remove_field): Call to
8090 rec_record_remove_field_existing.
8091
8092 * torture/rec-record/rec-record-new.c: rec_record_new_001 renamed
8093 to rec_record_new_and_destroy.
8094
8095 * torture/rec-record/rec-record-insert-field.c:
8096 rec_record_insert_field_001 renamed to
8097 rec_record_insert_field_empty.
8098 rec_record_insert_field_002 renamed to
8099 rec_record_insert_field_nonempty.
8100 rec_record_insert_field_003 renamed to
8101 rec_record_insert_field_duplicated.
8102 (test_rec_record_insert_field): Call
8103 rec_record_insert_field_empty, rec_record_insert_field_nonempty
8104 and rec_record_insert_field_duplicated.
8105
8106 * torture/rec-record/rec-record-field-p.c: rec_record_field_p_001
8107 renamed to rec_record_field_existing.
8108 rec_record_field_p_002 renamed to rec_record_field_nonexisting.
8109
8110 * torture/rec-field/rec-field-value.c: rec_field_value_001 renamed
8111 to rec_field_value_empty.
8112 rec_field_value_002 renamed to rec_field_value_nonempty.
8113 (test_rec_field_value): Call to rec_field_value_empty and
8114 rec_field_value_nonempty.
8115
8116 * torture/rec-field/rec-field-set-value.c: rec_field_set_value_001
8117 renamed to rec_field_set_value_empty.
8118 rec_field_set_value_002 renamed to rec_field_set_value_nonempty.
8119 (test_rec_field_set_value): Call to rec_field_set_value_empty and
8120 rec_field_set_value_nonempty.
8121
8122 * torture/rec-field/rec-field-set-name.c: rec_field_set_name_001
8123 renamed to rec_field_set_name_empty.
8124 rec_field_set_name_002 renamed to rec_field_set_name_nonempty.
8125 (test_rec_field_set_name): Call to rec_field_set_name_empty and
8126 rec_field_set_name_nonempty.
8127
8128 * torture/rec-field/rec-field-name.c: rec_field_name_001 renamed
8129 to rec_field_name_empty.
8130 rec_field_name_002 renamed to rec_field_name_nonempty.
8131 (test_rec_field_name): Call to 'rec_field_name_empty' and
8132 'rec_field_name_nonempty'.
8133 Comments reformatted to contain rec data.
8134
8135 * torture/rec-field/rec-field-dup.c: rec_field_dup_001 renamed to
8136 rec_field_dup_empty.
8137 rec_field_dup_002 renamed to rec_field_dup_nonempty.
8138 (test_rec_field_dup): Call to 'rec_field_dup_empty' and
8139 'rec_field_dup_nonempty'.
8140 Comments reformated to contain rec data.
8141
8142 2010-08-07 Jose E. Marchesi <jemarch@gnu.org>
8143
8144 Import the gnulib gettext module.
8145 * 'gettext' gnulib module imported.
8146
8147 2010-08-06 Jose E. Marchesi <jemarch@gnu.org>
8148
8149 Minor fixes in documentation.
8150 * src/rec-int.c (rec_int_check_field_type): Out to date comment
8151 removed.
8152
8153 * doc/recutils.texi (Field Types): New chapter.
8154 (Escalar types): New section.
8155 (String types): New section.
8156 (Enumerated types): New section.
8157 (Time related types): New section.
8158 (Selection Expressions): New section.
8159
8160 2010-08-05 Jose E. Marchesi <jemarch@gnu.org>
8161
8162 Assure proper exit values when redirecting output and some common
8163 facilities in recutl.c
8164 * utils/recset.c (recset_parse_args): Use 'recutl_fatal' and
8165 'recutl_error'.
8166 (main): Use 'recutl_init'.
8167
8168 * utils/recins.c (recins_insert_record): Use 'recutl_error'.
8169 (main): Use 'recutl_init'.
8170
8171 * utils/recinf.c (main): Use 'recutl_init'.
8172
8173 * utils/recfix.c (main): Use 'recutl_init'.
8174
8175 * utils/recdel.c (recdel_delete_records): Use 'recutl_fatal'.
8176 (recdel_delete_records): Likewise.
8177 (recdel_parse_args): Likewise.
8178 (main): Use 'recutl_init'.
8179
8180 * utils/recsel.c (main): Use 'recutl_init'.
8181
8182 * utils/recutl.c (recutl_error): New function.
8183
8184 * utils/recsel.c (recsel_parse_args): Use 'recutl_fatal'.
8185 (recsel_parse_args): Likewise.
8186 (recsel_process_data): Use 'recutl_error'.
8187
8188 * utils/recutl.c: Include 'closeout.h'.
8189 (recutl_init): New function.
8190 (recutl_init): Initialize the global variable 'program_name' with
8191 'util_name'.
8192 (recutl_init): Install the 'close_stdout' handler to be executed
8193 upon exit.
8194 (recutl_fini): New function.
8195 (recutl_fatal): New function.
8196 Include stdarg.
8197
8198 * Module 'closeout' imported from gnulib.
8199
8200 2010-08-05 Jose E. Marchesi <jemarch@gnu.org>
8201
8202 * README-dev: Imported and adapted from GNU hello.
8203
8204 * NEWS: Likewise.
8205
8206 * README: Rephrased to follow the GNU hello style.
8207
8208 * configure.ac: Invoke AC_PROG_YACC.
8209
8210 * autogen.sh: Imported and adapted from GNU hello.
8211
8212 2010-08-02 Jose E. Marchesi <jemarch@gnu.org>
8213
8214 lib+utils: check the values returned by malloc.
8215 * src/rec-field.c (rec_field_set_location): Check for the return
8216 value of 'malloc'.
8217
8218 * src/rec-parser.c (rec_parser_perror): Likewise.
8219
8220 * src/rec-parser.c (rec_parse_field_name_str): Likewise.
8221
8222 * src/rec-record.c (rec_record_set_location): Likewise.
8223
8224 * utils/recins.c (recins_parse_args): Likewise.
8225
8226 * utils/recutl.c (recutl_write_db_to_file): Likewise.
8227
8228 * src/rec-fex.c (rec_fex_check): Emit error message only if there
8229 is enough memory to build the message.
8230 (rec_fex_parse_str_simple): Check for the return value of
8231 'malloc'.
8232 (rec_fex_parse_str_subscripts): Likewise.
8233 (rec_fex_parse_elem): Likewise.
8234
8235 2010-08-01 Jose E. Marchesi <jemarch@gnu.org>
8236
8237 recutl: avoid printing spurious newline characters when -P or -R
8238 is used.
8239 * utils/recutl.c (recutl_eval_field_expression): New variable
8240 'written_field'.
8241 (recutl_eval_field_expression): Add a newline to a sequence of
8242 field values only if some field was actually written.
8243
8244 rec-record: Tiny improvement in an algorithm.
8245 * src/rec-record.c (rec_record_get_field_by_name): Don't return
8246 from the middle of the function. Use a variable and break
8247 instead.
8248
8249 recsel: allow dashes in field names when checking the field
8250 expressions.
8251 * src/rec-fex.c (rec_fex_check): Allow dashes '-' in field names
8252 in field expressions.
8253
8254 recsel: avoid a segmentation fault while printing record descriptors.
8255 * utils/recsel.c (recsel_process_data): Test for NULL before
8256 printing the record descriptor of a record set. Reported by Kai
8257 via savannah.
8258
8259 2010-07-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8260
8261 Fix distcheck: linking tests in torture/.
8262 * torture/Makefile.am: Simplify. Use relative path to librec.la
8263 so dependencies are tracked correctly and distcheck works.
8264
8265 2010-07-31 Jose E. Marchesi <jemarch@gnu.org>
8266
8267 Information for the Free Software Directory added in FSD.
8268 * FSD (Description): New file.
8269
8270 Make git to ignore some more generated files.
8271 * .gitignore: Ignore doc/recutils.aux, doc/recutils.cp, doc/recutils.cps,
8272 doc/recutils.fn, doc/recutils.fns, doc/recutils.ky,
8273 doc/recutils.log, doc/recutils.pg,
8274 doc/recutils.toc, doc/recutils.tp, doc/recutils.vr and
8275 doc/recutils.vrs.
8276 Ignore lib/alloca.h, lib/c++defs.h, lib/stdlib.h, lib/string.h,
8277 lib/sys, lib/time.h, lib/warn-on-use.h, lib/wchar.h.
8278 Ignore torture/test
8279
8280 2010-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8281
8282 Simplify makefile rules.
8283 * utils/Makefile.am: Simplify.
8284 * src/Makefile.am: Likewise.
8285
8286 Typos and formatting nits.
8287 * configure.ac: Fix typo.
8288 * doc/recutils.texi: Fix typo, add some @noindents.
8289
8290 2010-07-30 Jose E. Marchesi <jemarch@gnu.org>
8291
8292 * gendocs gnulib module imported.
8293
8294 2010-07-25 Jose E. Marchesi <jemarch@gnu.org>
8295
8296 Manual: misc improvements.
8297 * doc/recutils.texi: Misc improvements.
8298
8299 2010-07-25 Jose E. Marchesi <jemarch@gnu.org>
8300
8301 GHM 2010 slides.
8302 * doc/recutils.ept: New file.
8303
8304 2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
8305
8306 Parametrize the name of the fields in the issues.
8307 * tasktool: New variables containing the names of the issue
8308 fields: tt_db_field_id, tt_db_field_summary, tt_db_field_type,
8309 tt_db_field_status, tt_db_field_originator, tt_db_field_assignee,
8310 tt_db_field_assigned, tt_db_field_component, tt_db_field_created,
8311 tt_db_field_note, tt_db_field_description.
8312 (tt_db_template): Use the variables described above.
8313 (tt_version): Likewise.
8314 (tt_version): Likewise.
8315 (tt_version): Likewise.
8316 (tt_supported_vcs): Likewise.
8317 (tt_supported_vcs): Likewise.
8318
8319 2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
8320
8321 Avoid build dependency with bison.
8322 * lib/getdate.c: New file.
8323
8324 * build-aux/.gitignore: Ignore ylwrap.
8325
8326 2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
8327
8328 Integrate getdate documentation in the manual.
8329 * doc/recutils.texi (Top): Entry for the "Date input formats"
8330 chapter added.
8331 Include 'getdate.texi'.
8332 FSF copyright added in the manual.
8333
8334 2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
8335
8336 Implementation of the 'date' field type.
8337 * tasktool (tt_db_template): Declare Date as a field of type
8338 'date'.
8339
8340 * src/Makefile.am (librec_la_LIBADD): LIB_CLOCK_GETTIME added to
8341 find the definition of 'clock_gettime'.
8342
8343 * src/rec-types.c (rec_type_check_date): Implemented using
8344 'get_date'.
8345 Include getdate.h.
8346
8347 2010-07-23 Jose E. Marchesi <jemarch@gnu.org>
8348
8349 Gnulib work.
8350 * Gnulib updated.
8351
8352 * Module 'getdate' imported.
8353
8354 2010-07-18 Jose E. Marchesi <jemarch@gnu.org>
8355
8356 Localization of fields and better error reporting.
8357 * src/rec-int.c (rec_int_check_record_types): Improve error
8358 localization.
8359
8360 * utils/recutl.c (recutl_parse_db_from_file): Report parse errors.
8361
8362 * src/rec-int.c (rec_int_check_field_type): Use localization
8363 information in the warning.
8364
8365 * src/rec-parser.c (rec_parse_field): Annotate the fields with
8366 their location in the source file.
8367
8368 * src/rec-field.c (rec_field_destroy): Free memory occupied by the
8369 location properties upon field destruction.
8370
8371 * src/rec.h: New functions 'rec_field_source',
8372 'rec_field_set_source', 'rec_field_location',
8373 'rec_field_set_location' and 'rec_field_location_str'.
8374
8375 * src/rec-field.c: Implementation of the functions listed above.
8376
8377 2010-07-18 Jose E. Marchesi <jemarch@gnu.org>
8378
8379 * src/rec-int.c: Copyright notification added.
8380
8381 2010-07-15 Jose E. Marchesi <jemarch@gnu.org>
8382
8383 * src/rec-field-name.c (rec_field_name_ref_p): New function.
8384
8385 * src/rec-int.c (rec_int_check_rset): Pass 'db' to
8386 'rec_rset_elem_record'.
8387
8388 * utils/recins.c (recins_insert_record): Pass the database
8389 containing the rset containing the record to 'rec_int_check_rset'.
8390
8391 * utils/recset.c (recset_process_actions): Likewise.
8392
8393 * src/rec.h: 'rec_int_check_rset' gets a parameter (optional using
8394 NULL) 'db'.
8395 Likewise for 'rec_int_check_record'.
8396 Likewise for 'rec_int_check_field_type'.
8397
8398 * src/rec-int.c (rec_int_check_rset): Likewise.
8399
8400 2010-07-15 Jose E. Marchesi <jemarch@gnu.org>
8401
8402 New function re_int_check_db to check the integrity of a database.
8403 * utils/recfix.c (recfix_process_data): Use 'rec_int_check_db'.
8404
8405 * src/rec-int.h: New function 'rec_int_check_db'.
8406
8407 * src/rec-int.c (rec_int_check_db): New function.
8408
8409 2010-07-15 Jose E. Marchesi <jemarch@gnu.org>
8410
8411 Relocate data integrity related code to rec-int.c.
8412 * src/rec-int.c (rec_int_check_field_type): Use
8413 'rec_rset_get_type_reg' to get the type registry of records sets
8414 instead of accessing the data structure.
8415
8416 * src/rec.h: New function 'rec_rset_get_type_reg'.
8417
8418 * src/rec-rset.c (rec_rset_get_type_reg): New function.
8419
8420 * src/Makefile.am (librec_la_SOURCES): 'rec-int.c' added.
8421
8422 * utils/recfix.c (recfix_process_data): Use 'rec_int_check_rset'
8423 instead of 'rec_rset_check'.
8424
8425 * utils/recins.c (recins_insert_record): Likewise.
8426
8427 * utils/recset.c (recset_process_actions): Likewise.
8428
8429 * src/rec-int.c: New file.
8430
8431 * src/rec.h: 'rec_rset_check' renamed to 'rec_int_check_rset'.
8432 'rec_rset_check_record' renamed to 'rec_int_check_record'.
8433 'rec_rset_check_field_type' renamed to 'rec_int_check_field_type'.
8434
8435 2010-07-14 Jose E. Marchesi <jemarch@gnu.com>
8436
8437 Change -v|--verbose in recinf for -d|--descriptor.
8438 * utils/recinf.c (COMMON_ARGS): VERBOSE_ARG renamed to
8439 DESCRIPTOR_ARG.
8440 (print_info_file): Process the -d|--descriptor command line
8441 argument instead of -v|--verbose.
8442
8443 2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
8444
8445 Support for the --type option in recinf.
8446 * utils/recinf.c (COMMON_ARGS): New argument 'TYPE_ARG'.
8447 (GNU_longOptions): New argument '--type'.
8448 (recutl_help_msg): Doc for the new argument 'type'.
8449 (recinf_type): New global variable.
8450 (print_info_file): If a type was specified at command line, skip
8451 records not having that type.
8452
8453 2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
8454
8455 Keep the descriptor relative position when inserting records in an
8456 empty record set.
8457 * utils/recins.c (recins_insert_record): Take into account the
8458 descriptor relative position in the record set when inserting a
8459 record into an empty rset.
8460
8461 2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
8462
8463 Little fixes in tasktool.
8464 * tasktool (tt_db_show_task): Use a selection expression implying
8465 that Id is an integer, not a string.
8466 (tt_supported_vcs): Typo fixed.
8467
8468 * tasktool (tt_db_task_p): Likewise.
8469
8470 2010-07-14 Jose E. Marchesi <jemarch@gnu.org>
8471
8472 Fix a regression in the definition of the REC_TYPE_DESCR_RE
8473 regexp.
8474 * src/rec-types.c (REC_TYPE_DESCR_RE): Regexp fixed.
8475
8476 2010-07-13 Jose E. Marchesi <jemarch@gnu.org>
8477
8478 Support for the type 'field' removed.
8479 * src/rec-types.c: Data types, constants and functions removed for
8480 the 'field' type.
8481
8482 2010-07-13 Jose E. Marchesi <jemarch@gnu.org>
8483
8484 Bug preventing empty fields without a beginning space fixed.
8485 * src/rec-parser.c (rec_parse_field_name): If a newline is found
8486 terminating a field name then push it back to the input stream, so
8487 it will be part of the field value.
8488
8489 2010-07-13 Jose E. Marchesi <jemarch@gnu.org>
8490
8491 Keep information about the position of the record descriptor in a
8492 record set.
8493 * src/rec-rset.c (rec_rset_set_descriptor_pos): New function.
8494 (rec_rset_descriptor_pos): New function.
8495 (rec_rset_new): Initialize new->descriptor_pos to 0.
8496 (struct rec_rset_s): New field descriptor_pos.
8497
8498 * src/rec.h: Prototypes for 'rec_rset_descriptor_pos' and
8499 'rec_rset_set_descriptor_pos'.
8500
8501 * src/rec-parser.c (rec_parse_rset): New local variable to store
8502 the number of comments added to the record set. In the special
8503 case where some comments are preceding the first record descriptor
8504 in the file, store the relative position of the descriptor in the
8505 record set using rec_rset_descriptor_pos.
8506
8507 * src/rec-writer.c (rec_write_rset): Write the descriptor in its
8508 relative position into the record set.
8509
8510 2010-06-19 Jose E. Marchesi <jemarch@gnu.org>
8511
8512 * utils/recins.c: Help string improved.
8513
8514 2010-04-30 Jose E. Marchesi <jemarch@gnu.org>
8515
8516 * lisp/rec-mode.el (rec-count): New implementation based on
8517 'recsel'.
8518
8519 2010-04-28 Jose E. Marchesi <jemarch@gnu.org>
8520
8521 * .gitignore: Ignore /utils/recfix.
8522
8523 2010-04-22 Jose E. Marchesi <jemarch@gnu.org>
8524
8525 * utils/recset.c (recset_parse_args): Stop the program with an
8526 error code if an invalid option is specified in the command line.
8527 (recset_process_actions): SET action implemented.
8528
8529 2010-04-21 Jose E. Marchesi <jemarch@gnu.org>
8530
8531 * utils/recset.c: Help string completed with record selection
8532 options, fields selection options and actions.
8533
8534 * doc/recutils.texi (Record Descriptors): Documentation for the
8535 record descriptor field '%order'.
8536
8537 2010-04-08 Jose E. Marchesi <jemarch@gnu.org>
8538
8539 * src/rec-mset.c: Distribution terms added.
8540
8541 * src/rec-mset.h: Likewise.
8542
8543 2010-04-07 Jose E. Marchesi <jemarch@gnu.org>
8544
8545 * src/rec-mset.c (rec_mset_elem_next): Added the MSET parameter.
8546 Return the first element of the given type if ELEM is NULL.
8547
8548 2010-04-01 Jose E. Marchesi <jemarch@gnu.org>
8549
8550 * .gitignore: Ignore backup files.
8551
8552 2010-01-11 Jose E. Marchesi <jemarch@gnu.org>
8553
8554 * src/rec-parser.c (rec_parse_field_name_str): New function.
8555
8556 2010-01-09 Jose E. Marchesi <jemarch@gnu.org>
8557
8558 * src/Makefile.am (librec_la_SOURCES): rec-sex.l added to the
8559 list.
8560
8561 * src/rec-sex.y: New file.
8562
8563 * src/rec-sex.l: New file.
8564
8565 2009-12-28 Jose E. Marchesi <jemarch@gnu.org>
8566
8567 * utils/recinf.h (HELP_ARG): New file.
8568
8569 * utils/recinf.c: New file.
8570
8571 * utils/Makefile.am (recinf_LDFLAGS): New file.
8572
8573 2009-12-23 Jose E. Marchesi <jemarch@gnu.org>
8574
8575 * lisp/rec-mode.el: New file.
8576 (rec-field-trim-value): New function.
8577 (rec-cmd-trim-field-value): New function.
8578
8579 2009-11-30 Jose E. Marchesi <jemarch@gnu.org>
8580
8581 * lisp/rec-mode.el (rec-beginning-of-record-pos): Don't signal an
8582 error if the buffer is empty.
8583
8584 2009-10-02 Jose E. Marchesi <jemarch@gnu.org>
8585
8586 * lisp/rec-mode.el: New file.
8587
8588 2009-10-01 Jose E. Marchesi <jemarch@gnu.org>
8589
8590 * src/rec-record.c (rec_record_new): Allow duplicates.
8591
8592 2009-09-03 Jose E. Marchesi <jemarch@gnu.org>
8593
8594 * src/grec.h: Comments clarified.
8595
8596 2009-07-23 Jose E. Marchesi <jemarch@gnu.org>
8597
8598 * doc/fdl.texi: New file.
8599
8600 * doc/gnurec.texi: New file.
8601
8602 2009-07-13 Jose E. Marchesi <jemarch@gnu.org>
8603
8604 * torture/runtests.c (main): Use CK_ENV instead of CK_VERBOSE in
8605 srunner_run_all.
8606
8607 * Begin of the change log.
8608
8609 Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2020, 2022 Jose E.
8610 Marchesi
8611
8612 Copying and distribution of this file, with or without modification, are
8613 permitted in any medium without royalty provided the copyright notice
8614 and this notice are preserved.