diff options
| author | Peter Eisentraut | 2017-08-16 04:22:32 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-11-08 16:37:28 +0000 |
| commit | 2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 (patch) | |
| tree | b46993cceb7cd8b848e39a45c1bb8c73dc67b221 /src/interfaces/libpq | |
| parent | 4497f2f3b30fa5cd48898033c351bfcf01ce73e2 (diff) | |
Change TRUE/FALSE to true/false
The lower case spellings are C and C++ standard and are used in most
parts of the PostgreSQL sources. The upper case spellings are only used
in some files/modules. So standardize on the standard spellings.
The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so
those are left as is when using those APIs.
In code comments, we use the lower-case spelling for the C concepts and
keep the upper-case spelling for the SQL concepts.
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/interfaces/libpq')
| -rw-r--r-- | src/interfaces/libpq/fe-connect.c | 28 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-exec.c | 86 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-misc.c | 2 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-protocol2.c | 12 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-protocol3.c | 12 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-secure.c | 4 | ||||
| -rw-r--r-- | src/interfaces/libpq/libpq-events.c | 34 |
7 files changed, 89 insertions, 89 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 6bcf60a712c..ada219032ec 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -3586,7 +3586,7 @@ closePGconn(PGconn *conn) * Don't call PQsetnonblocking() because it will fail if it's unable to * flush the connection. */ - conn->nonblocking = FALSE; + conn->nonblocking = false; /* * Close the connection, reset all transient state, flush I/O buffers. @@ -3781,8 +3781,8 @@ PQfreeCancel(PGcancel *cancel) * PQcancel and PQrequestCancel: attempt to request cancellation of the * current operation. * - * The return value is TRUE if the cancel request was successfully - * dispatched, FALSE if not (in which case an error message is available). + * The return value is true if the cancel request was successfully + * dispatched, false if not (in which case an error message is available). * Note: successful dispatch is no guarantee that there will be any effect at * the backend. The application must read the operation result as usual. * @@ -3871,7 +3871,7 @@ retry5: /* All done */ closesocket(tmpsock); SOCK_ERRNO_SET(save_errno); - return TRUE; + return true; cancel_errReturn: @@ -3889,13 +3889,13 @@ cancel_errReturn: if (tmpsock != PGINVALID_SOCKET) closesocket(tmpsock); SOCK_ERRNO_SET(save_errno); - return FALSE; + return false; } /* * PQcancel: request query cancel * - * Returns TRUE if able to send the cancel request, FALSE if not. + * Returns true if able to send the cancel request, false if not. * * On failure, an error message is stored in *errbuf, which must be of size * errbufsize (recommended size is 256 bytes). *errbuf is not changed on @@ -3907,7 +3907,7 @@ PQcancel(PGcancel *cancel, char *errbuf, int errbufsize) if (!cancel) { strlcpy(errbuf, "PQcancel() -- no cancel object supplied", errbufsize); - return FALSE; + return false; } return internal_cancel(&cancel->raddr, cancel->be_pid, cancel->be_key, @@ -3917,7 +3917,7 @@ PQcancel(PGcancel *cancel, char *errbuf, int errbufsize) /* * PQrequestCancel: old, not thread-safe function for requesting query cancel * - * Returns TRUE if able to send the cancel request, FALSE if not. + * Returns true if able to send the cancel request, false if not. * * On failure, the error message is saved in conn->errorMessage; this means * that this can't be used when there might be other active operations on @@ -3933,7 +3933,7 @@ PQrequestCancel(PGconn *conn) /* Check we have an open connection */ if (!conn) - return FALSE; + return false; if (conn->sock == PGINVALID_SOCKET) { @@ -3942,7 +3942,7 @@ PQrequestCancel(PGconn *conn) conn->errorMessage.maxlen); conn->errorMessage.len = strlen(conn->errorMessage.data); - return FALSE; + return false; } r = internal_cancel(&conn->raddr, conn->be_pid, conn->be_key, @@ -4781,7 +4781,7 @@ conninfo_init(PQExpBuffer errorMessage) * Returns a malloc'd PQconninfoOption array, if parsing is successful. * Otherwise, NULL is returned and an error message is left in errorMessage. * - * If use_defaults is TRUE, default values are filled in (from a service file, + * If use_defaults is true, default values are filled in (from a service file, * environment variables, etc). */ static PQconninfoOption * @@ -5004,7 +5004,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage, * If not successful, NULL is returned and an error message is * left in errorMessage. * Defaults are supplied (from a service file, environment variables, etc) - * for unspecified options, but only if use_defaults is TRUE. + * for unspecified options, but only if use_defaults is true. * * If expand_dbname is non-zero, and the value passed for the first occurrence * of "dbname" keyword is a connection string (as indicated by @@ -5175,7 +5175,7 @@ conninfo_array_parse(const char *const *keywords, const char *const *values, * * Defaults are obtained from a service file, environment variables, etc. * - * Returns TRUE if successful, otherwise FALSE; errorMessage, if supplied, + * Returns true if successful, otherwise false; errorMessage, if supplied, * is filled in upon failure. Note that failure to locate a default value * is not an error condition here --- we just leave the option's value as * NULL. @@ -5826,7 +5826,7 @@ conninfo_getval(PQconninfoOption *connOptions, * * If not successful, returns NULL and fills errorMessage accordingly. * However, if the reason of failure is an invalid keyword being passed and - * ignoreMissing is TRUE, errorMessage will be left untouched. + * ignoreMissing is true, errorMessage will be left untouched. */ static PQconninfoOption * conninfo_storeval(PQconninfoOption *connOptions, diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index c24bce62dde..66530870d44 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -231,17 +231,17 @@ PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs) /* If attrs already exist, they cannot be overwritten. */ if (!res || res->numAttributes > 0) - return FALSE; + return false; /* ignore no-op request */ if (numAttributes <= 0 || !attDescs) - return TRUE; + return true; res->attDescs = (PGresAttDesc *) PQresultAlloc(res, numAttributes * sizeof(PGresAttDesc)); if (!res->attDescs) - return FALSE; + return false; res->numAttributes = numAttributes; memcpy(res->attDescs, attDescs, numAttributes * sizeof(PGresAttDesc)); @@ -256,13 +256,13 @@ PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs) res->attDescs[i].name = res->null_field; if (!res->attDescs[i].name) - return FALSE; + return false; if (res->attDescs[i].format == 0) res->binary = 0; } - return TRUE; + return true; } /* @@ -368,7 +368,7 @@ PQcopyResult(const PGresult *src, int flags) PQclear(dest); return NULL; } - dest->events[i].resultInitialized = TRUE; + dest->events[i].resultInitialized = true; } } @@ -398,7 +398,7 @@ dupEvents(PGEvent *events, int count) newEvents[i].proc = events[i].proc; newEvents[i].passThrough = events[i].passThrough; newEvents[i].data = NULL; - newEvents[i].resultInitialized = FALSE; + newEvents[i].resultInitialized = false; newEvents[i].name = strdup(events[i].name); if (!newEvents[i].name) { @@ -428,7 +428,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) /* Note that this check also protects us against null "res" */ if (!check_field_number(res, field_num)) - return FALSE; + return false; /* Invalid tup_num, must be <= ntups */ if (tup_num < 0 || tup_num > res->ntups) @@ -436,7 +436,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) pqInternalNotice(&res->noticeHooks, "row number %d is out of range 0..%d", tup_num, res->ntups); - return FALSE; + return false; } /* need to allocate a new tuple? */ @@ -447,7 +447,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) tup = (PGresAttValue *) pqResultAlloc(res, res->numAttributes * sizeof(PGresAttValue), - TRUE); + true); if (!tup) goto fail; @@ -479,7 +479,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) } else { - attval->value = (char *) pqResultAlloc(res, len + 1, TRUE); + attval->value = (char *) pqResultAlloc(res, len + 1, true); if (!attval->value) goto fail; attval->len = len; @@ -487,7 +487,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) attval->value[len] = '\0'; } - return TRUE; + return true; /* * Report failure via pqInternalNotice. If preceding code didn't provide @@ -498,7 +498,7 @@ fail: errmsg = libpq_gettext("out of memory"); pqInternalNotice(&res->noticeHooks, "%s", errmsg); - return FALSE; + return false; } /* @@ -510,7 +510,7 @@ fail: void * PQresultAlloc(PGresult *res, size_t nBytes) { - return pqResultAlloc(res, nBytes, TRUE); + return pqResultAlloc(res, nBytes, true); } /* @@ -622,7 +622,7 @@ pqResultAlloc(PGresult *res, size_t nBytes, bool isBinary) char * pqResultStrdup(PGresult *res, const char *str) { - char *space = (char *) pqResultAlloc(res, strlen(str) + 1, FALSE); + char *space = (char *) pqResultAlloc(res, strlen(str) + 1, false); if (space) strcpy(space, str); @@ -852,7 +852,7 @@ pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) * Result text is always just the primary message + newline. If we can't * allocate it, don't bother invoking the receiver. */ - res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, FALSE); + res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, false); if (res->errMsg) { sprintf(res->errMsg, "%s\n", msgBuf); @@ -868,7 +868,7 @@ pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) /* * pqAddTuple * add a row pointer to the PGresult structure, growing it if necessary - * Returns TRUE if OK, FALSE if an error prevented adding the row + * Returns true if OK, false if an error prevented adding the row * * On error, *errmsgp can be set to an error string to be returned. * If it is left NULL, the error is presumed to be "out of memory". @@ -903,7 +903,7 @@ pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp) else { *errmsgp = libpq_gettext("PGresult cannot support more than INT_MAX tuples"); - return FALSE; + return false; } /* @@ -915,7 +915,7 @@ pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp) if (newSize > SIZE_MAX / sizeof(PGresAttValue *)) { *errmsgp = libpq_gettext("size_t overflow"); - return FALSE; + return false; } #endif @@ -926,13 +926,13 @@ pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp) newTuples = (PGresAttValue **) realloc(res->tuples, newSize * sizeof(PGresAttValue *)); if (!newTuples) - return FALSE; /* malloc or realloc failed */ + return false; /* malloc or realloc failed */ res->tupArrSize = newSize; res->tuples = newTuples; } res->tuples[res->ntups] = tup; res->ntups++; - return TRUE; + return true; } /* @@ -947,7 +947,7 @@ pqSaveMessageField(PGresult *res, char code, const char *value) pqResultAlloc(res, offsetof(PGMessageField, contents) + strlen(value) + 1, - TRUE); + true); if (!pfield) return; /* out of memory? */ pfield->code = code; @@ -1111,7 +1111,7 @@ pqRowProcessor(PGconn *conn, const char **errmsgp) * memory for gettext() to do anything. */ tup = (PGresAttValue *) - pqResultAlloc(res, nfields * sizeof(PGresAttValue), TRUE); + pqResultAlloc(res, nfields * sizeof(PGresAttValue), true); if (tup == NULL) goto fail; @@ -1725,14 +1725,14 @@ parseInput(PGconn *conn) /* * PQisBusy - * Return TRUE if PQgetResult would block waiting for input. + * Return true if PQgetResult would block waiting for input. */ int PQisBusy(PGconn *conn) { if (!conn) - return FALSE; + return false; /* Parse any available data, if our state permits. */ parseInput(conn); @@ -1771,7 +1771,7 @@ PQgetResult(PGconn *conn) */ while ((flushResult = pqFlush(conn)) > 0) { - if (pqWait(FALSE, TRUE, conn)) + if (pqWait(false, true, conn)) { flushResult = -1; break; @@ -1780,7 +1780,7 @@ PQgetResult(PGconn *conn) /* Wait for some more data, and load it. */ if (flushResult || - pqWait(TRUE, FALSE, conn) || + pqWait(true, false, conn) || pqReadData(conn) < 0) { /* @@ -1844,7 +1844,7 @@ PQgetResult(PGconn *conn) res->resultStatus = PGRES_FATAL_ERROR; break; } - res->events[i].resultInitialized = TRUE; + res->events[i].resultInitialized = true; } } @@ -2746,22 +2746,22 @@ PQbinaryTuples(const PGresult *res) /* * Helper routines to range-check field numbers and tuple numbers. - * Return TRUE if OK, FALSE if not + * Return true if OK, false if not */ static int check_field_number(const PGresult *res, int field_num) { if (!res) - return FALSE; /* no way to display error message... */ + return false; /* no way to display error message... */ if (field_num < 0 || field_num >= res->numAttributes) { pqInternalNotice(&res->noticeHooks, "column number %d is out of range 0..%d", field_num, res->numAttributes - 1); - return FALSE; + return false; } - return TRUE; + return true; } static int @@ -2769,38 +2769,38 @@ check_tuple_field_number(const PGresult *res, int tup_num, int field_num) { if (!res) - return FALSE; /* no way to display error message... */ + return false; /* no way to display error message... */ if (tup_num < 0 || tup_num >= res->ntups) { pqInternalNotice(&res->noticeHooks, "row number %d is out of range 0..%d", tup_num, res->ntups - 1); - return FALSE; + return false; } if (field_num < 0 || field_num >= res->numAttributes) { pqInternalNotice(&res->noticeHooks, "column number %d is out of range 0..%d", field_num, res->numAttributes - 1); - return FALSE; + return false; } - return TRUE; + return true; } static int check_param_number(const PGresult *res, int param_num) { if (!res) - return FALSE; /* no way to display error message... */ + return false; /* no way to display error message... */ if (param_num < 0 || param_num >= res->numParameters) { pqInternalNotice(&res->noticeHooks, "parameter number %d is out of range 0..%d", param_num, res->numParameters - 1); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -3177,8 +3177,8 @@ PQparamtype(const PGresult *res, int param_num) /* PQsetnonblocking: - * sets the PGconn's database connection non-blocking if the arg is TRUE - * or makes it blocking if the arg is FALSE, this will not protect + * sets the PGconn's database connection non-blocking if the arg is true + * or makes it blocking if the arg is false, this will not protect * you from PQexec(), you'll only be safe when using the non-blocking API. * Needs to be called only on a connected database connection. */ @@ -3190,7 +3190,7 @@ PQsetnonblocking(PGconn *conn, int arg) if (!conn || conn->status == CONNECTION_BAD) return -1; - barg = (arg ? TRUE : FALSE); + barg = (arg ? true : false); /* early out if the socket is already in the state requested */ if (barg == conn->nonblocking) @@ -3213,7 +3213,7 @@ PQsetnonblocking(PGconn *conn, int arg) /* * return the blocking status of the database connection - * TRUE == nonblocking, FALSE == blocking + * true == nonblocking, false == blocking */ int PQisnonblocking(const PGconn *conn) diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index 41b1749d074..f8851066157 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -934,7 +934,7 @@ pqSendSome(PGconn *conn, int len) break; } - if (pqWait(TRUE, TRUE, conn)) + if (pqWait(true, true, conn)) { result = -1; break; diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 1320d18a996..5335a914407 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -583,7 +583,7 @@ pqParseInput2(PGconn *conn) if (conn->result != NULL) { /* Read another tuple of a normal query response */ - if (getAnotherTuple(conn, FALSE)) + if (getAnotherTuple(conn, false)) return; /* getAnotherTuple() moves inStart itself */ continue; @@ -601,7 +601,7 @@ pqParseInput2(PGconn *conn) if (conn->result != NULL) { /* Read another tuple of a normal query response */ - if (getAnotherTuple(conn, TRUE)) + if (getAnotherTuple(conn, true)) return; /* getAnotherTuple() moves inStart itself */ continue; @@ -679,7 +679,7 @@ getRowDescriptions(PGconn *conn) if (nfields > 0) { result->attDescs = (PGresAttDesc *) - pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); + pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true); if (!result->attDescs) { errmsg = NULL; /* means "out of memory", see below */ @@ -1218,7 +1218,7 @@ nodata: if (async) return 0; /* Need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) return -2; } @@ -1263,7 +1263,7 @@ pqGetline2(PGconn *conn, char *s, int maxlen) else { /* need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) { result = EOF; @@ -1484,7 +1484,7 @@ pqFunctionCall2(PGconn *conn, Oid fnid, if (needInput) { /* Wait for some data to arrive (or for the channel to close) */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) break; } diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 21fb8f2f213..0c5099caac1 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -510,7 +510,7 @@ getRowDescriptions(PGconn *conn, int msgLength) if (nfields > 0) { result->attDescs = (PGresAttDesc *) - pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); + pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true); if (!result->attDescs) { errmsg = NULL; /* means "out of memory", see below */ @@ -668,7 +668,7 @@ getParamDescriptions(PGconn *conn, int msgLength) if (nparams > 0) { result->paramDescs = (PGresParamDesc *) - pqResultAlloc(result, nparams * sizeof(PGresParamDesc), TRUE); + pqResultAlloc(result, nparams * sizeof(PGresParamDesc), true); if (!result->paramDescs) goto advance_and_error; MemSet(result->paramDescs, 0, nparams * sizeof(PGresParamDesc)); @@ -1466,7 +1466,7 @@ getCopyStart(PGconn *conn, ExecStatusType copytype) if (nfields > 0) { result->attDescs = (PGresAttDesc *) - pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); + pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true); if (!result->attDescs) goto failure; MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc)); @@ -1657,7 +1657,7 @@ pqGetCopyData3(PGconn *conn, char **buffer, int async) if (async) return 0; /* Need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) return -2; continue; @@ -1715,7 +1715,7 @@ pqGetline3(PGconn *conn, char *s, int maxlen) while ((status = PQgetlineAsync(conn, s, maxlen - 1)) == 0) { /* need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) { *s = '\0'; @@ -1968,7 +1968,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid, if (needInput) { /* Wait for some data to arrive (or for the channel to close) */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) break; } diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 7c2d0cb4e6c..c122c631060 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -465,10 +465,10 @@ pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending) * As long as it doesn't queue multiple events, we're OK because the caller * can't tell the difference. * - * The caller should say got_epipe = FALSE if it is certain that it + * The caller should say got_epipe = false if it is certain that it * didn't get an EPIPE error; in that case we'll skip the clear operation * and things are definitely OK, queuing or no. If it got one or might have - * gotten one, pass got_epipe = TRUE. + * gotten one, pass got_epipe = true. * * We do not want this to change errno, since if it did that could lose * the error code from a preceding send(). We essentially assume that if diff --git a/src/interfaces/libpq/libpq-events.c b/src/interfaces/libpq/libpq-events.c index e533017a032..883e2af8f41 100644 --- a/src/interfaces/libpq/libpq-events.c +++ b/src/interfaces/libpq/libpq-events.c @@ -44,12 +44,12 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, PGEventRegister regevt; if (!proc || !conn || !name || !*name) - return FALSE; /* bad arguments */ + return false; /* bad arguments */ for (i = 0; i < conn->nEvents; i++) { if (conn->events[i].proc == proc) - return FALSE; /* already registered */ + return false; /* already registered */ } if (conn->nEvents >= conn->eventArraySize) @@ -64,7 +64,7 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, e = (PGEvent *) malloc(newSize * sizeof(PGEvent)); if (!e) - return FALSE; + return false; conn->eventArraySize = newSize; conn->events = e; @@ -73,10 +73,10 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, conn->events[conn->nEvents].proc = proc; conn->events[conn->nEvents].name = strdup(name); if (!conn->events[conn->nEvents].name) - return FALSE; + return false; conn->events[conn->nEvents].passThrough = passThrough; conn->events[conn->nEvents].data = NULL; - conn->events[conn->nEvents].resultInitialized = FALSE; + conn->events[conn->nEvents].resultInitialized = false; conn->nEvents++; regevt.conn = conn; @@ -84,10 +84,10 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, { conn->nEvents--; free(conn->events[conn->nEvents].name); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -100,18 +100,18 @@ PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data) int i; if (!conn || !proc) - return FALSE; + return false; for (i = 0; i < conn->nEvents; i++) { if (conn->events[i].proc == proc) { conn->events[i].data = data; - return TRUE; + return true; } } - return FALSE; + return false; } /* @@ -144,18 +144,18 @@ PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *data) int i; if (!result || !proc) - return FALSE; + return false; for (i = 0; i < result->nEvents; i++) { if (result->events[i].proc == proc) { result->events[i].data = data; - return TRUE; + return true; } } - return FALSE; + return false; } /* @@ -187,7 +187,7 @@ PQfireResultCreateEvents(PGconn *conn, PGresult *res) int i; if (!res) - return FALSE; + return false; for (i = 0; i < res->nEvents; i++) { @@ -199,11 +199,11 @@ PQfireResultCreateEvents(PGconn *conn, PGresult *res) evt.result = res; if (!res->events[i].proc(PGEVT_RESULTCREATE, &evt, res->events[i].passThrough)) - return FALSE; + return false; - res->events[i].resultInitialized = TRUE; + res->events[i].resultInitialized = true; } } - return TRUE; + return true; } |
