1*a3746e00Slukem /* $NetBSD: rf_strutils.c,v 1.4 2001/11/13 07:11:17 lukem Exp $ */
238a3987bSoster /*
338a3987bSoster * rf_strutils.c
438a3987bSoster *
538a3987bSoster * String-parsing funcs
638a3987bSoster */
738a3987bSoster /*
838a3987bSoster * Copyright (c) 1995 Carnegie-Mellon University.
938a3987bSoster * All rights reserved.
1038a3987bSoster *
1138a3987bSoster * Author: Mark Holland
1238a3987bSoster *
1338a3987bSoster * Permission to use, copy, modify and distribute this software and
1438a3987bSoster * its documentation is hereby granted, provided that both the copyright
1538a3987bSoster * notice and this permission notice appear in all copies of the
1638a3987bSoster * software, derivative works or modified versions, and any portions
1738a3987bSoster * thereof, and that both notices appear in supporting documentation.
1838a3987bSoster *
1938a3987bSoster * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
2038a3987bSoster * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
2138a3987bSoster * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
2238a3987bSoster *
2338a3987bSoster * Carnegie Mellon requests users of this software to return to
2438a3987bSoster *
2538a3987bSoster * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
2638a3987bSoster * School of Computer Science
2738a3987bSoster * Carnegie Mellon University
2838a3987bSoster * Pittsburgh PA 15213-3890
2938a3987bSoster *
3038a3987bSoster * any improvements or extensions that they make and grant Carnegie the
3138a3987bSoster * rights to redistribute these changes.
3238a3987bSoster */
3338a3987bSoster /*
3438a3987bSoster * rf_strutils.c -- some simple utilities for munging on strings.
3538a3987bSoster * I put them in a file by themselves because they're needed in
3638a3987bSoster * setconfig, in the user-level driver, and in the kernel.
3738a3987bSoster *
3838a3987bSoster */
3938a3987bSoster
40*a3746e00Slukem #include <sys/cdefs.h>
41*a3746e00Slukem __KERNEL_RCSID(0, "$NetBSD: rf_strutils.c,v 1.4 2001/11/13 07:11:17 lukem Exp $");
42*a3746e00Slukem
4338a3987bSoster #include "rf_utils.h"
4438a3987bSoster
4538a3987bSoster /* finds a non-white character in the line */
4600145885Soster char *
rf_find_non_white(char * p)4700145885Soster rf_find_non_white(char *p)
4838a3987bSoster {
4938a3987bSoster for (; *p != '\0' && (*p == ' ' || *p == '\t'); p++);
5038a3987bSoster return (p);
5138a3987bSoster }
5238a3987bSoster /* finds a white character in the line */
5300145885Soster char *
rf_find_white(char * p)5400145885Soster rf_find_white(char *p)
5538a3987bSoster {
5638a3987bSoster for (; *p != '\0' && (*p != ' ' && *p != '\t'); p++);
5738a3987bSoster return (p);
5838a3987bSoster }
59