hpstring.h

Go to the documentation of this file.
00001 //& ****************************************************************************
00002 //&
00003 //& Written by Maurin Benjamin, October 2004
00004 //&
00005 //& Copyright (C) 2004 The HP-GCC Development Team
00006 //&
00007 //& ****************************************************************************
00008 //&
00009 //&
00010 //& This file is part of HP-GCC.
00011 //&
00012 //& HP-GCC is free software; you can redistribute it and/or modify
00013 //& it under the terms of the GNU General Public License as published by
00014 //& the Free Software Foundation; either version 2, or (at your option)
00015 //& any later version.
00016 //& 
00017 //& HP-GCC is distributed in the hope that it will be useful,
00018 //& but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //& GNU General Public License for more details.
00021 //& 
00022 //& You should have received a copy of the GNU General Public License
00023 //& along with HP-GCC; see the file COPYING. 
00024 //&
00025 //& As a special exception, you may use this file as part of a free software
00026 //& library without restriction.  Specifically, if other files instantiate
00027 //& templates or use macros or inline functions from this file, or you compile
00028 //& this file and link it with other files to produce an executable, this
00029 //& file does not by itself cause the resulting executable to be covered by
00030 //& the GNU General Public License.  This exception does not however
00031 //& invalidate any other reasons why the executable file might be covered by
00032 //& the GNU General Public License.
00033 //&
00034 //& ****************************************************************************
00035 
00036 // $Header: /cvsroot/hpgcc/sources/hplib/hpstring.h,v 1.15 2005/07/09 16:06:32 iblank Exp $
00037 
00038 
00043 #ifndef _HPSTRING_H
00044 #define _HPSTRING_H
00045 
00046 // LONG TYPE DEFINITION, ADDED BY CLAUDIO 01/14/05
00047 #ifndef _LONGLONG_DEF
00048 typedef unsigned long long ULONGLONG;
00049 typedef long long LONGLONG;
00050 #define _LONGLONG_DEF
00051 #endif
00052 
00053 
00054 #include <hpctype.h>
00055 #include <kos.h>
00056 
00057 
00059 int    strlen(const char *s);
00060 
00062 char    *strcpy(char *dest, const char *src);
00063 
00065 char     *strncpy(char *dest, const char *src, size_t n);
00066 
00068 char    *strcat(char *dest, const char *src);
00069 
00071 int    strcmp(register const char *s1, register const char *s2);
00072 
00074 int strncmp ( const char *s1, const char *s2, int num);
00075 
00077 char     *itoa(int z, char * buff, int base);
00078 
00080 char     *utoa(unsigned z, char * buff, int base);
00081 
00083 char    *lltoa(LONGLONG, char *,int base);
00084 
00086 char    *ulltoa(ULONGLONG, char *, int base);
00087 
00094 char     *upper(char *t, const char *s);
00095 
00112 char *strset(char *s, int fill);
00113 
00114 char *str_unquote(char *s, char c);
00115 char *strdup(const char *s);
00116 
00117 char     *lower(char *t, const char *s);
00118 
00119 #ifndef DOXYGEN_SKIP
00120 
00121 
00122 char *__dtoa(double x, char *buf, char exp_sym);
00123 
00124 char     *xpad(char *t, char *s, int n, int left, char c);
00125 
00126 int        atoi_base(char *, int base);
00127 unsigned    atoui_base(char *, int base);
00128 LONGLONG    atoll_base(char *, int base);
00129 ULONGLONG    atoull_base(char *, int base);
00130 
00131 #endif
00132 
00133 int        atoi(char *);
00134 unsigned    atoui(char *);
00135 LONGLONG     atoll(char *);
00136 
00137 char *
00138 ints(int z, int base);
00139 
00140 char *
00141 uints(unsigned z, int base);
00142 
00143 
00144 ULONGLONG    atoull(char *);
00145 
00146 
00147 double        atof(const char *);
00148 
00149 void* memcpy(void *out, const void *in, int n);
00150 void memcpyw(void *dest,const void *source,int nwords);
00151 void * memset (char * dest, int C, int LENGTH);
00152 void memsetw(void *dest,int value, int nwords);
00153 void *memmove(void *_dest, const void *_source, size_t nbytes);
00154 //Additional string functions
00155 //Added by Al Borowski, 19th Nov, 2004
00156 //TODO: Add proper documentation?
00157 
00158 char * strchr(const char *s, int c);
00159 char * strncat(char *s1, const char * s2, size_t n);
00160 char *strrchr(const char *s, int c);
00161 size_t strcspn(const char *s1, const char *s2);
00162 char *strpbrk(const char *s1, const char *s2);
00163 char *strtok(char *s1, const char *s2);
00164 char *strstr(const char *s1, const char *s2);
00165 size_t strspn(const char *s1, const char *s2);
00166 
00167 
00168 #endif 

Generated on Sat Feb 17 00:05:26 2007 for HP-GCCLibrary by  doxygen 1.5.0