mystring.c (89730b290a5b2a1506fc7b4a1e604d01e16395ad) | mystring.c (069428af6d6abb894be0ac02ee843262ccc35282) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. |
35 * 36 * $Id$ | |
37 */ 38 39#ifndef lint | 35 */ 36 37#ifndef lint |
40static char sccsid[] = "@(#)mystring.c 8.1 (Berkeley) 5/31/93"; | 38static char sccsid[] = "@(#)mystring.c 8.2 (Berkeley) 5/4/95"; |
41#endif /* not lint */ 42 43/* 44 * String functions. 45 * 46 * equal(s1, s2) Return true if strings are equal. 47 * scopy(from, to) Copy a string. 48 * scopyn(from, to, n) Like scopy, but checks for overflow. 49 * number(s) Convert a string of digits to an integer. 50 * is_number(s) Return true if s is a string of digits. 51 */ 52 | 39#endif /* not lint */ 40 41/* 42 * String functions. 43 * 44 * equal(s1, s2) Return true if strings are equal. 45 * scopy(from, to) Copy a string. 46 * scopyn(from, to, n) Like scopy, but checks for overflow. 47 * number(s) Convert a string of digits to an integer. 48 * is_number(s) Return true if s is a string of digits. 49 */ 50 |
51#include <stdlib.h> |
|
53#include "shell.h" 54#include "syntax.h" 55#include "error.h" 56#include "mystring.h" 57 58 59char nullstr[1]; /* zero length string */ 60 --- 78 unchanged lines hidden --- | 52#include "shell.h" 53#include "syntax.h" 54#include "error.h" 55#include "mystring.h" 56 57 58char nullstr[1]; /* zero length string */ 59 --- 78 unchanged lines hidden --- |