2 /* $NetBSD: rf_strutils.c,v 1.3 1999/02/05 00:06:18 oster Exp $ */
9 * Copyright (c) 1995 Carnegie-Mellon University.
10 * All rights reserved.
12 * Author: Mark Holland
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.
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.
24 * Carnegie Mellon requests users of this software to return to
26 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
27 * School of Computer Science
28 * Carnegie Mellon University
29 * Pittsburgh PA 15213-3890
31 * any improvements or extensions that they make and grant Carnegie the
32 * rights to redistribute these changes.
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.
41 #include <dev/raidframe/rf_utils.h>
43 /* finds a non-white character in the line */
45 rf_find_non_white(char *p)
47 for (; *p != '\0' && (*p == ' ' || *p == '\t'); p++);
50 /* finds a white character in the line */
52 rf_find_white(char *p)
54 for (; *p != '\0' && (*p != ' ' && *p != '\t'); p++);