📄 util.h
字号:
/* * Copyright (C) 1998,1999,2000 Ross Combs (rocombs@cs.nmsu.edu) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *//*****/#ifndef JUST_NEED_TYPES#ifndef INCLUDED_UTIL_PROTOS#define INCLUDED_UTIL_PROTOS#define JUST_NEED_TYPES#include <stdio.h>#ifdef TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# ifdef HAVE_SYS_TIME_H# include <sys/time.h># else# include <time.h># endif#endif#undef JUST_NEED_TYPESextern int strstart(char const * full, char const * part) ;extern char * file_get_line(FILE * fp) ;extern char * strreverse(char * str);extern int str_to_uint(char const * str, unsigned int * num);extern int str_to_ushort(char const * str, unsigned short * num);extern int str_print_term(FILE * fp, char const * str, unsigned int len, int allow_nl);extern int str_get_bool(char const * str) ;extern char const * seconds_to_timestr(unsigned int totsecs); /* FIXME: can this be marked pure? */extern int clockstr_to_seconds(char const * clockstr, unsigned int * totsecs);extern char * escape_fs_chars(char const * in, unsigned int len) ;extern char * escape_chars(char const * in, unsigned int len) ;extern char * unescape_chars(char const * in) ;extern void str_to_hex(char * target, char * data, int datalen);extern int hex_to_str(char const * source, char * data, int datalen);extern char * buildpath(char const *root, const char *suffix);extern char *str_skip_space(char *str);extern char *str_skip_word(char *str);extern int timestr_to_time(char const * timestr, time_t* ptime);extern void strlower(char* str);#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -