From: Szasz P. <sp...@us...> - 2004-03-17 19:46:40
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23068/rtk Modified Files: rchar.h Log Message: Some fixes to work in symbian Index: rchar.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/rchar.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** rchar.h 10 Mar 2004 12:01:12 -0000 1.13 --- rchar.h 17 Mar 2004 19:37:09 -0000 1.14 *************** *** 1,2 **** --- 1,43 ---- + /** + * + * RTK + * Fast and easy cross-platform GUI ToolKit. + * + * Copyright (C) 2001-200x RTK Development Team + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the slightly modified (see the "EXCEPTION NOTICE" part + * of RTK Library License) GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * and along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA . + * + * Also you should have received a copy of RTK Library License, if not please + * write an e-mail to some of RTK authors (listed in file AUTHORS). + * + * Bug reports: bu...@rt... + * Suggestions: rf...@rt... + ***************************************************************************/ + + /** + * $Source$ + ***** + * Authors (chronological order): + * $fname $lname, $email + * Contributors (chronological order): + * $fname $lname, $email + ***** + * T0D0 List: + * - + ***************************************************************************/ + #ifndef _RTK_RCHAR_H_ #define _RTK_RCHAR_H_ 1 *************** *** 28,31 **** --- 69,81 ---- #undef INCLUDED_FROM_RCHAR + //////////////////////////////////////////////////////////////////////////////// + // IMHO we should add the definition of each function here. + // This way the files which includes this header wouldn't depend on + // any system header and wouldn't contain any unnecesary stuff + // Also if on some system (like Symbian) some function is missing (like + // iswupper) it will give error only in linking. So if an app doesn't use + // it, there will be no problems. If it uses, we will implement it. + //////////////////////////////////////////////////////////////////////////////// + /** Convert a string to lowercase. * Replaces the string 'str' with lowercase characters, *************** *** 42,47 **** RTK_API RCHAR* rstrupr(RCHAR* str); ! ! /** Breaks the string 'str' into a sequence of tokens, * each of which is delimited by a character from the string pointed to by 'delim'. * @param str NULL, or the string that you want to break into tokens. --- 92,96 ---- RTK_API RCHAR* rstrupr(RCHAR* str); ! /** Breaks the string 'str' into a sequence of tokens, * each of which is delimited by a character from the string pointed to by 'delim'. * @param str NULL, or the string that you want to break into tokens. *************** *** 52,56 **** --- 101,193 ---- RTK_API RCHAR *rstrtok_r (RCHAR *str, const RCHAR *delim, RCHAR **save_ptr); + + #if 0 + /* + I tought maybe it would be a good idea to include all the r* function + definitons here. But because I don't want to brake other code, I commented + this out for now. + */ + extern "C" { + + + /** Returns true if the character is lowercase. */ + int rislower(unsigned int ch); + + /** Returns true if the character is uppercase. */ + int risupper(unsigned int ch); + + /** Converts the given character to uppercase. */ + unsigned int rtoupper(unsigned int ch); + + /** Converts the given character to lowercase. */ + unsigned int rtolower(unsigned int ch); + + /** Calculates the length of the initial segment of s which consists + entirely of characters in accept. + */ + size_t rstrspn(const RCHAR* s, const RCHAR* accept); + + /** Locates the first occurrence in the string s of any of the characters + in the string accept. + */ + RCHAR* rstrpbrk(const RCHAR* s, const RCHAR* accept); + + /** Returns a pointer to the first occurrence of the character c in the + string s. + */ + RCHAR* rstrchr(const RCHAR* s, RCHAR c); + + /** Returns a pointer to the first occurrence of the string s2 in the + string s. + */ + RCHAR* rstrstr(const RCHAR* s, const RCHAR* s2); + + /** Compares two strings with (case sensitive) */ + int rstrcmp(const RCHAR* s1, const RCHAR* s2); + + /** Compares the first n characters of two strings with (case sensitive) */ + int rstrncmp(const RCHAR* s1, const RCHAR* s2, unsigned int n); + + /** Compares two strings with (case insensitive) */ + int rstrcasecmp(const RCHAR* s1, const RCHAR* s2); + + /** Compares the first n characters of two strings with (case insensitive) */ + int rstrncasecmp(const RCHAR* s1, const RCHAR* s2, unsigned int n); + + /** Returns the initial part of a string to an integer value. */ + int rstrtoi(const RCHAR* s, RCHAR** tailptr, int base); + + /** Returns the initial part of a string to a long value. */ + long rstrtol(const RCHAR* s, RCHAR** tailptr, int base); + + /** Returns the initial part of a string to a floating point value. */ + double rstrtod(const RCHAR* s, RCHAR** tailptr); + + + int rprintf(const RCHAR* fmt, ...); + int rfprintf(FILE* f, const RCHAR* fmt, ...); + int rvprintf(const RCHAR* fmt, va_list args); + int rvfprintf(FILE* f, const RCHAR* fmt, va_list args); + #ifndef __EPOC32__ + int rsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, ...); + int rvsnprintf(RCHAR* dst, int max_len, const RCHAR* fmt, va_list args); + #endif + + int rscanf(const RCHAR* fmt, ...); + int rsscanf(const RCHAR* src, const RCHAR* fmt, ...); + int rfscanf(FILE* f, const RCHAR* fmt, ...); + + FILE *rfopen(const RCHAR *path, const RCHAR *mode); + FILE *rfdopen(int fildes, const RCHAR *mode); + FILE *rfreopen(const RCHAR *path, const RCHAR *mode, FILE *stream); + + } // extern "C" + #endif // COMMENT + } // namespace Rtk #endif /* _RTK_RCHAR_H_ */ + + /** + * $Id$ + ***************************************************************************/ |