[BACK]Return to rf_strutils.c CVS log [TXT][DIR] Up to [local] / sys / dev / raidframe

Annotation of sys/dev/raidframe/rf_strutils.c, Revision 1.1.1.1

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

CVSweb