Debian Codegraph @

src/common/util.h

raw symbols SCIP
1 /*
2 * Copyright (C) 1998,1999,2000 Ross Combs ([email protected])
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19
20 /*****/
21 #ifndef JUST_NEED_TYPES
22 #ifndef INCLUDED_UTIL_PROTOS
23 #define INCLUDED_UTIL_PROTOScxx . . $ `src/common/util.h:23:9`!
24
25 #include <cstdio>
26 #include <ctime>
27
28 namespace pvpgncxx . . $ pvpgn/
29 {
30
31 extern int strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(char const * full, char const * part);
32 extern char * file_get_linecxx . . $ pvpgn/file_get_line(e31226b218f63160).(stdcxx . . $ std/::FILEcxx . . $ std/FILE# * fp);
33 extern char * strreversecxx . . $ pvpgn/strreverse(7a9722d75b371431).(char * str);
34 extern int str_to_uintcxx . . $ pvpgn/str_to_uint(6974107818eeb505).(char const * str, unsigned int * num);
35 extern int str_to_ushortcxx . . $ pvpgn/str_to_ushort(c9bce2f4bcd31d4).(char const * str, unsigned short * num);
36 extern int str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdcxx . . $ std/::FILEcxx . . $ std/FILE# * fp, char const * str, unsigned int len, int allow_nl);
37 extern int str_get_boolcxx . . $ pvpgn/str_get_bool(5c4306d8553b3696).(char const * str);
38 extern char const * seconds_to_timestrcxx . . $ pvpgn/seconds_to_timestr(81a3ae90da26a711).(unsigned int totsecs); /* FIXME: can this be marked pure? */
39 extern int clockstr_to_secondscxx . . $ pvpgn/clockstr_to_seconds(6974107818eeb505).(char const * clockstr, unsigned int * totsecs);
40 extern char * escape_fs_charscxx . . $ pvpgn/escape_fs_chars(cf893fee19605dd5).(char const * in, unsigned int len);
41 extern char * escape_charscxx . . $ pvpgn/escape_chars(cf893fee19605dd5).(char const * in, unsigned int len);
42 extern char * unescape_charscxx . . $ pvpgn/unescape_chars(a8b8e32347182212).(char const * in);
43 extern void str_to_hexcxx . . $ pvpgn/str_to_hex(3366d352079c3ed6).(char * target, char const * data, int datalen);
44 extern int hex_to_strcxx . . $ pvpgn/hex_to_str(89c8e27db0bdb94e).(char const * source, char * data, int datalen);
45 extern int timestr_to_timecxx . . $ pvpgn/timestr_to_time(ef3eecfa0254c586).(char const * timestr, stdcxx . . $ std/::time_tcxx . . $ std/time_t#* ptime);
46
47 static inline char * str_skip_spacecxx . . $ pvpgn/str_skip_space(7a9722d75b371431).(char *str)
48 {
49 for (; *str == ' ' || *str == '\t'; str++);
50 return str;
51 }
52
53 static inline char * str_skip_wordcxx . . $ pvpgn/str_skip_word(7a9722d75b371431).(char *str)
54 {
55 for (; *str != ' ' && *str != '\t' && *str; str++);
56 return str;
57 }
58
59 }
60
61 #endif
62 #endif