1 /* $NetBSD: rf_strutils.c,v 1.1 1998/11/13 04:20:35 oster Exp $ */ 2 /* 3 * rf_strutils.c 4 * 5 * String-parsing funcs 6 */ 7 /* 8 * Copyright (c) 1995 Carnegie-Mellon University. 9 * All rights reserved. 10 * 11 * Author: Mark Holland 12 * 13 * Permission to use, copy, modify and distribute this software and 14 * its documentation is hereby granted, provided that both the copyright 15 * notice and this permission notice appear in all copies of the 16 * software, derivative works or modified versions, and any portions 17 * thereof, and that both notices appear in supporting documentation. 18 * 19 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 20 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 21 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 22 * 23 * Carnegie Mellon requests users of this software to return to 24 * 25 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 26 * School of Computer Science 27 * Carnegie Mellon University 28 * Pittsburgh PA 15213-3890 29 * 30 * any improvements or extensions that they make and grant Carnegie the 31 * rights to redistribute these changes. 32 */ 33 /* 34 * rf_strutils.c -- some simple utilities for munging on strings. 35 * I put them in a file by themselves because they're needed in 36 * setconfig, in the user-level driver, and in the kernel. 37 * 38 * : 39 * Log: rf_strutils.c,v 40 * Revision 1.2 1996/06/02 17:31:48 jimz 41 * Moved a lot of global stuff into array structure, where it belongs. 42 * Fixed up paritylogging, pss modules in this manner. Some general 43 * code cleanup. Removed lots of dead code, some dead files. 44 * 45 */ 46 47 #include "rf_utils.h" 48 49 /* finds a non-white character in the line */ 50 char *rf_find_non_white(char *p) 51 { 52 for (; *p != '\0' && (*p == ' ' || *p == '\t'); p++); 53 return(p); 54 } 55 56 /* finds a white character in the line */ 57 char *rf_find_white(char *p) 58 { 59 for (; *p != '\0' && (*p != ' ' && *p != '\t'); p++); 60 return(p); 61 } 62