Back to index

radiance  4R0+20100331
Functions | Variables
savqstr.c File Reference
#include "copyright.h"
#include <stdlib.h>
#include "rtio.h"
#include "rterror.h"

Go to the source code of this file.

Functions

char * savqstr (char *s)
void freeqstr (char *s)

Variables

static const char RCSid [] = "$Id: savqstr.c,v 2.9 2003/07/30 10:11:06 schorsch Exp $"

Function Documentation

void freeqstr ( char *  s)

Definition at line 41 of file savqstr.c.

{
       if (s != NULL)
              free((void *)s);
}

Here is the caller graph for this function:

char* savqstr ( char *  s)

Definition at line 21 of file savqstr.c.

{
       register char  *cp;
       char  *newp;

       for (cp = s; *cp++; )                     /* compute strlen()+1 */
              ;
       newp = (char *)malloc(cp-s);
       if (newp == NULL) {
              eputs("out of memory in savqstr");
              quit(1);
       }
       for (cp = newp; (*cp++ = *s++); )         /* inline strcpy() */
              ;
       return(newp);                      /* return new location */
}

Here is the call graph for this function:


Variable Documentation

const char RCSid[] = "$Id: savqstr.c,v 2.9 2003/07/30 10:11:06 schorsch Exp $" [static]

Definition at line 2 of file savqstr.c.