mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.39 1997/08/06 05:38:35 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.40 1997/08/12 20:15:49 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@@ -300,7 +300,7 @@ SocketBackend(char *inBuf, bool multiplexedBackend)
|
||||
* get input from the frontend
|
||||
* ----------------
|
||||
*/
|
||||
(void) strcpy(qtype, "?");
|
||||
strcpy(qtype, "?");
|
||||
if (pq_getnchar(qtype,0,1) == EOF) {
|
||||
/* ------------
|
||||
* when front-end applications quits/dies
|
||||
@@ -865,7 +865,7 @@ PostgresMain(int argc, char *argv[])
|
||||
or 'localhost' */
|
||||
if (!(hostName = getenv("PGHOST"))) {
|
||||
if (gethostname(hostbuf, MAXHOSTNAMELEN) < 0)
|
||||
(void) strcpy(hostbuf, "localhost");
|
||||
strcpy(hostbuf, "localhost");
|
||||
hostName = hostbuf;
|
||||
}
|
||||
|
||||
@@ -1010,7 +1010,7 @@ PostgresMain(int argc, char *argv[])
|
||||
* o - send output (stdout and stderr) to the given file
|
||||
* ----------------
|
||||
*/
|
||||
(void) strncpy(OutputFileName, optarg, MAXPGPATH);
|
||||
strNcpy(OutputFileName, optarg, MAXPGPATH);
|
||||
break;
|
||||
|
||||
case 'p': /* started by postmaster */
|
||||
@@ -1292,7 +1292,7 @@ PostgresMain(int argc, char *argv[])
|
||||
*/
|
||||
if (IsUnderPostmaster == false) {
|
||||
puts("\nPOSTGRES backend interactive interface");
|
||||
puts("$Revision: 1.39 $ $Date: 1997/08/06 05:38:35 $");
|
||||
puts("$Revision: 1.40 $ $Date: 1997/08/12 20:15:49 $");
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
|
||||
* statements.
|
||||
*
|
||||
* $Id: variable.c,v 1.12 1997/06/20 17:17:03 thomas Exp $
|
||||
* $Id: variable.c,v 1.13 1997/08/12 20:15:50 momjian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -70,8 +70,7 @@ static const char *get_token(char **tok, char **val, const char *str)
|
||||
}
|
||||
|
||||
*tok = (char*) PALLOC(len + 1);
|
||||
strncpy (*tok, start, len);
|
||||
(*tok)[len] = '\0';
|
||||
strNcpy (*tok, start, len);
|
||||
|
||||
/* skip white spaces */
|
||||
while ( isspace(*str)) str++;
|
||||
@@ -110,8 +109,7 @@ static const char *get_token(char **tok, char **val, const char *str)
|
||||
}
|
||||
|
||||
*val = (char*) PALLOC(len + 1);
|
||||
strncpy (*val, start, len);
|
||||
(*val)[len] = '\0';
|
||||
strNcpy (*val, start, len);
|
||||
|
||||
/* skip white spaces */
|
||||
while ( isspace(*str)) str++;
|
||||
|
||||
Reference in New Issue
Block a user