4.3BSD beta release manual page
[unix-history] / usr / src / usr.bin / window / string.h
CommitLineData
921f5a1c 1/*
60de5df9 2 * @(#)string.h 3.5 %G%
921f5a1c 3 */
60de5df9
EW
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
90ede912 11#define STR_DEBUG
921f5a1c
EW
12
13char *str_cpy();
0180c2d9 14char *str_ncpy();
921f5a1c
EW
15char *str_cat();
16char *str_itoa();
17
18#define str_cmp(a, b) strcmp(a, b)
90ede912
EW
19
20#ifdef STR_DEBUG
21struct string {
22 struct string *s_forw;
23 struct string *s_back;
24 char s_data[1];
25};
26
27struct 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
32char *str_alloc();
33int str_free();
34#else
35#define str_free(s) free(s)
36#define str_alloc(s) malloc(s)
37#endif