File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / rsync / itypes.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 07:51:14 2013 UTC (10 years, 8 months ago) by misho
Branches: rsync, MAIN
CVS tags: RSYNC3_1_0, HEAD
v 3.1.0

    1: /* Inline functions for rsync.
    2:  *
    3:  * Copyright (C) 2007-2013 Wayne Davison
    4:  *
    5:  * This program is free software; you can redistribute it and/or modify
    6:  * it under the terms of the GNU General Public License as published by
    7:  * the Free Software Foundation; either version 3 of the License, or
    8:  * (at your option) any later version.
    9:  *
   10:  * This program is distributed in the hope that it will be useful,
   11:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   12:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13:  * GNU General Public License for more details.
   14:  *
   15:  * You should have received a copy of the GNU General Public License along
   16:  * with this program; if not, visit the http://fsf.org website.
   17:  */
   18: 
   19: static inline int
   20: isDigit(const char *ptr)
   21: {
   22: 	return isdigit(*(unsigned char *)ptr);
   23: }
   24: 
   25: static inline int
   26: isPrint(const char *ptr)
   27: {
   28: 	return isprint(*(unsigned char *)ptr);
   29: }
   30: 
   31: static inline int
   32: isSpace(const char *ptr)
   33: {
   34: 	return isspace(*(unsigned char *)ptr);
   35: }
   36: 
   37: static inline int
   38: isLower(const char *ptr)
   39: {
   40: 	return islower(*(unsigned char *)ptr);
   41: }
   42: 
   43: static inline int
   44: isUpper(const char *ptr)
   45: {
   46: 	return isupper(*(unsigned char *)ptr);
   47: }
   48: 
   49: static inline int
   50: toLower(const char *ptr)
   51: {
   52: 	return tolower(*(unsigned char *)ptr);
   53: }
   54: 
   55: static inline int
   56: toUpper(const char *ptr)
   57: {
   58: 	return toupper(*(unsigned char *)ptr);
   59: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>