From b00b32d853e90ca7bf42c2cee48676f866bfc760 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Tue, 30 May 1989 06:47:13 +0000 Subject: [PATCH] ING_DB --- WEGA/contrib/ingres/dbs/src/gutil/customer.c | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 WEGA/contrib/ingres/dbs/src/gutil/customer.c diff --git a/WEGA/contrib/ingres/dbs/src/gutil/customer.c b/WEGA/contrib/ingres/dbs/src/gutil/customer.c new file mode 100644 index 0000000..497ff28 --- /dev/null +++ b/WEGA/contrib/ingres/dbs/src/gutil/customer.c @@ -0,0 +1,24 @@ +# include +# include "gen.h" + +# define CUS_BUF 51 + +char *AAcustomer() +{ + register int fd; + register int i; + static char cbuf[CUS_BUF]; + extern char *AApath; + extern char *AAztack(); + + if (!(*cbuf)) + { + if ((fd = open(AAztack(AApath, "/sys/etc/customer"), 0)) < 0) + return ((char *) 0); + if ((i = read(fd, cbuf, CUS_BUF)) < 2) + return ((char *) 0); + close(fd); + cbuf[--i] = 0; + } + return (cbuf); +}