RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [email protected] Module: rpm Date: 12-Apr-2010 20:10:20 Branch: HEAD Handle: 2010041218102000 Modified files: rpm/rpmio rpmsql.c Log: - rpmsql: WIP. Summary: Revision Changes Path 2.33 +6 -3 rpm/rpmio/rpmsql.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsql.c ============================================================================ $ cvs diff -u -r2.32 -r2.33 rpmsql.c --- rpm/rpmio/rpmsql.c 12 Apr 2010 17:59:20 -0000 2.32 +++ rpm/rpmio/rpmsql.c 12 Apr 2010 18:10:20 -0000 2.33 @@ -2831,6 +2831,7 @@ if (fd) (void) Fclose(fd); /* XXX stdout/stderr were dup'd */ fd = NULL; + /* XXX permit numeric fdno's? */ if (fn == NULL) fd = NULL; else if (!strcmp(fn, "stdout") || !strcmp(fn, "-")) @@ -2871,11 +2872,12 @@ char *azArg[50]; SQLDBG((stderr, "--> %s(%p,%s)\n", __FUNCTION__, sql, zLine)); + /* Parse the input line into tokens. */ while (zLine[i] && nArg < ArraySize(azArg)) { while (xisspace((unsigned char) zLine[i])) i++; - if (zLine[i] == 0) + if (zLine[i] == '\0') break; if (zLine[i] == '\'' || zLine[i] == '"') { int delim = zLine[i++]; @@ -3715,7 +3717,7 @@ zLine++; if (zLine[0] == '/' && _all_whitespace(&zLine[1])) goto exit; /* Oracle */ - if (tolower(zLine[0]) == 'g' && tolower(zLine[1]) == 'o' + if (xtolower(zLine[0]) == 'g' && xtolower(zLine[1]) == 'o' && _all_whitespace(&zLine[2])) goto exit; /* SQL Server */ rc = 0; @@ -3766,7 +3768,7 @@ int startline = 0; SQLDBG((stderr, "--> %s(%p)\n", __FUNCTION__, sql)); -if (_rpmsql_debug) +if (_rpmsql_debug < 0) rpmsqlDebugDump(sql); while (errCnt == 0 || !F_ISSET(sql, BAIL) || F_ISSET(sql, PROMPT)) @@ -3862,6 +3864,7 @@ int rc = 0; SQLDBG((stderr, "--> %s(%p,%s)\n", __FUNCTION__, sql, sqliterc)); +if (_rpmsql_debug < 0) rpmsqlDebugDump(sql); if (sqliterc == NULL) @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository [email protected]
