1: /*
   2:  * @(#)string.h	3.5 4/24/85
   3:  */
   4: 
   5: /*
   6:  * Copyright (c) 1983 Regents of the University of California,
   7:  * All rights reserved.  Redistribution permitted subject to
   8:  * the terms of the Berkeley Software License Agreement.
   9:  */
  10: 
  11: #define STR_DEBUG
  12: 
  13: char *str_cpy();
  14: char *str_ncpy();
  15: char *str_cat();
  16: char *str_itoa();
  17: 
  18: #define str_cmp(a, b)   strcmp(a, b)
  19: 
  20: #ifdef STR_DEBUG
  21: struct string {
  22:     struct string *s_forw;
  23:     struct string *s_back;
  24:     char s_data[1];
  25: };
  26: 
  27: struct string str_head;
  28: 
  29: #define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
  30: #define str_stos(s) ((struct string *)((unsigned)(s) - str_offset))
  31: 
  32: char *str_alloc();
  33: int str_free();
  34: #else
  35: #define str_free(s) free(s)
  36: #define str_alloc(s)    malloc(s)
  37: #endif

Defined variables

str_head defined in line 27; used 14 times

Defined struct's

string defined in line 21; used 14 times

Defined macros

STR_DEBUG defined in line 11; used 3 times
str_alloc defined in line 36; used 5 times
str_cmp defined in line 18; never used
str_offset defined in line 29; used 2 times
str_stos defined in line 30; never used

Usage of this include

Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 575
Valid CSS Valid XHTML 1.0 Strict