]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/dev/raidframe/rf_strutils.c
This commit was generated by cvs2svn to compensate for changes in r106907,
[FreeBSD/FreeBSD.git] / sys / dev / raidframe / rf_strutils.c
1 /*      $FreeBSD$ */
2 /*      $NetBSD: rf_strutils.c,v 1.3 1999/02/05 00:06:18 oster Exp $    */
3 /*
4  * rf_strutils.c
5  *
6  * String-parsing funcs
7  */
8 /*
9  * Copyright (c) 1995 Carnegie-Mellon University.
10  * All rights reserved.
11  *
12  * Author: Mark Holland
13  *
14  * Permission to use, copy, modify and distribute this software and
15  * its documentation is hereby granted, provided that both the copyright
16  * notice and this permission notice appear in all copies of the
17  * software, derivative works or modified versions, and any portions
18  * thereof, and that both notices appear in supporting documentation.
19  *
20  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
21  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
22  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
23  *
24  * Carnegie Mellon requests users of this software to return to
25  *
26  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
27  *  School of Computer Science
28  *  Carnegie Mellon University
29  *  Pittsburgh PA 15213-3890
30  *
31  * any improvements or extensions that they make and grant Carnegie the
32  * rights to redistribute these changes.
33  */
34 /*
35  * rf_strutils.c -- some simple utilities for munging on strings.
36  * I put them in a file by themselves because they're needed in
37  * setconfig, in the user-level driver, and in the kernel.
38  *
39  */
40
41 #include <dev/raidframe/rf_utils.h>
42
43 /* finds a non-white character in the line */
44 char   *
45 rf_find_non_white(char *p)
46 {
47         for (; *p != '\0' && (*p == ' ' || *p == '\t'); p++);
48         return (p);
49 }
50 /* finds a white character in the line */
51 char   *
52 rf_find_white(char *p)
53 {
54         for (; *p != '\0' && (*p != ' ' && *p != '\t'); p++);
55         return (p);
56 }