From f2bb944967fc0f1efc4e5928d492ddc64768b688 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Mon, 3 Apr 1989 16:46:43 +0000 Subject: [PATCH] ING_DB --- WEGA/contrib/ingres/dbs/src/iutil/dbsname.c | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 WEGA/contrib/ingres/dbs/src/iutil/dbsname.c diff --git a/WEGA/contrib/ingres/dbs/src/iutil/dbsname.c b/WEGA/contrib/ingres/dbs/src/iutil/dbsname.c new file mode 100644 index 0000000..86de804 --- /dev/null +++ b/WEGA/contrib/ingres/dbs/src/iutil/dbsname.c @@ -0,0 +1,29 @@ +# include "gen.h" +# include "../h/dbs.h" + +/* +** MAKE DBS FILE NAME +** +** The null-terminated string 'iname' is converted to a +** file name as used by the dbs relations. The name +** of the relation is padded out to be MAXNAME bytes long, +** and the two-character id 'id' is appended. The whole +** thing will be null-terminated and put into 'outname'. +** +** 'Outname' must be at least MAXNAME + 3 bytes long. +*/ +AAdbname(iname, id, p) +register char *iname; +register char *id; +register char *p; +{ + extern char *AApmove(); + +# ifdef VENIX + p = AApmove(iname, p, MAXNAME, '#'); +# else + p = AApmove(iname, p, MAXNAME, ' '); +# endif + AAbmove(id, p, 2); + p[2] = '\0'; +}