# 2.11BSD#431 - /usr/ingres/source/iutil/trim_relname.c

##### Functions

    trim_relname      X

       1: # include   "../ingres.h"
       2:
       3: /*
       4: **  TRIM_RELNAME -- trim blanks from relation name for printing
       5: **
       6: **	A relation name (presumably in 'ingresname' format: MAXNAME
       7: **	characters long with no terminating null byte) has the
       8: **	trailing blanks trimmed off of it into a local buffer, so
       9: **	that it can be printed neatly.
      10: **
      11: **	Parameters:
      12: **		name -- a pointer to the relation name
      13: **
      14: **	Returns:
      15: **		a pointer to the trimmed relation name.
      16: **
      17: **	Side Effects:
      18: **		none
      19: **
      20: **	Files:
      21: **		none
      22: **
      23: **	Compilation Flags:
      24: **		none
      25: **
      26: **	Trace Flags:
      27: **		none
      28: **
      29: **	Diagnostics:
      30: **		none
      31: **
      32: **	Syserrs:
      33: **		none
      34: **
      35: **	History:
      36: **		3/22/78 (eric) -- stripped off from 'help'
      37: */
      38:
      39: char *trim_relname(name)
      40: char    *name;
      41: {
      42:     register char   *old, *new;
      43:     register int    i;
      44:     static char trimname[MAXNAME + 1];
      45:
      46:     old = name;
      47:     new = trimname;
      48:     i = MAXNAME;
      49:
      50:     while (i--)
      51:         if ((*new++ = *old++) == ' ')
      52:         {
      53:             new--;
      54:             break;
      55:         }
      56:
      57:     *new = '\0';
      58:
      59:     return (trimname);
      60: }

#### Defined functions

trim_relname defined in line 39; used 8 times

- in /usr/ingres/source/dbu/help.c line 256-259(2), 323, 349
- in /usr/ingres/source/dbu/modupdate.c line 34, 163
- in /usr/ingres/source/qrymod/util.c line 259, 273

Last modified: 1980-12-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 404 |