~ubuntu-branches/ubuntu/vivid/postfix/vivid-proposed

« back to all changes in this revision

Viewing changes to src/util/skipblanks.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-02-27 09:33:07 UTC
  • Revision ID: james.westby@ubuntu.com-20050227093307-cn789t27ibnlh6tf
Tags: upstream-2.1.5
ImportĀ upstreamĀ versionĀ 2.1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*++
 
2
/* NAME
 
3
/*      skipblanks 3
 
4
/* SUMMARY
 
5
/*      skip leading whitespace
 
6
/* SYNOPSIS
 
7
/*      #include <stringops.h>
 
8
/*
 
9
/*      char    *skipblanks(string)
 
10
/*      const char *string;
 
11
/* DESCRIPTION
 
12
/*      skipblanks() returns a pointer to the first non-whitespace
 
13
/*      character in the specified string, or a pointer to the string
 
14
/*      terminator when the string contains all white-space characters.
 
15
/* LICENSE
 
16
/* .ad
 
17
/* .fi
 
18
/*      The Secure Mailer license must be distributed with this software.
 
19
/* AUTHOR(S)
 
20
/*      Wietse Venema
 
21
/*      IBM T.J. Watson Research
 
22
/*      P.O. Box 704
 
23
/*      Yorktown Heights, NY 10598, USA
 
24
/*--*/
 
25
 
 
26
/* System library. */
 
27
 
 
28
#include "sys_defs.h"
 
29
#include <ctype.h>
 
30
 
 
31
/* Utility library. */
 
32
 
 
33
#include "stringops.h"
 
34
 
 
35
char   *skipblanks(const char *string)
 
36
{
 
37
    const char *cp;
 
38
 
 
39
    for (cp = string; *cp != 0; cp++)
 
40
        if (!ISSPACE(*cp))
 
41
            break;
 
42
    return ((char *) cp);
 
43
}