[srvx-commits] CVS: services/src saxdb.c,1.14,1.15
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-09-16 18:35:16
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv19259/src
Modified Files:
saxdb.c
Log Message:
fix the "cheating" to add newlines between top-level mondo sections
Index: saxdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/saxdb.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** saxdb.c 8 Sep 2002 04:28:38 -0000 1.14
--- saxdb.c 16 Sep 2002 18:35:11 -0000 1.15
***************
*** 45,49 ****
};
! #define COMPLEX(CTX) ((CTX)->complex.used && ((CTX)->complex.list[(CTX)->complex.used-1]))
static struct saxdb *last_db;
--- 45,49 ----
};
! #define COMPLEX(CTX) ((CTX)->complex.used ? ((CTX)->complex.list[(CTX)->complex.used-1]) : 1)
static struct saxdb *last_db;
***************
*** 323,331 ****
saxdb_mondo_write(struct saxdb_context *ctx, struct saxdb *saxdb) {
int res;
! if (saxdb->prev) {
! if ((res = saxdb_mondo_write(ctx, saxdb->prev))) return res;
! /* cheat a little here to put a newline between mondo sections */
! saxdb_put_char(ctx, '\n');
! }
if (saxdb->mondo_section) {
saxdb_start_record(ctx, saxdb->mondo_section, 1);
--- 323,327 ----
saxdb_mondo_write(struct saxdb_context *ctx, struct saxdb *saxdb) {
int res;
! if (saxdb->prev && (res = saxdb_mondo_write(ctx, saxdb->prev))) return res;
if (saxdb->mondo_section) {
saxdb_start_record(ctx, saxdb->mondo_section, 1);
***************
*** 335,338 ****
--- 331,336 ----
}
saxdb_end_record(ctx);
+ /* cheat a little here to put a newline between mondo sections */
+ saxdb_put_char(ctx, '\n');
}
return 0;
|