1 /* 2 * Copyright (C) 2014 haru <uobikiemukot at gmail dot com> 3 * Copyright (C) 2014 Hayaki Saito <user@zuse.jp> 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 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 /* error functions */ 20 void error(char *str); 21 void fatal(char *str); 22 23 /* wrapper of C functions */ 24 void *ecalloc(size_t nmemb, size_t size); 25 void *erealloc(void *ptr, size_t size); 26 void ewrite(int fd, const void *buf, int size); 27 28 /* parse_arg functions */ 29 void reset_parm(struct parm_t *pt); 30 void add_parm(struct parm_t *pt, char *cp); 31 void parse_arg(char *buf, struct parm_t *pt, int delim, int (is_valid)(int c)); 32 33 /* other functions */ 34 int my_ceil(int val, int div); 35 int dec2num(char *str); 36 int hex2num(char *str); 37 38 /* emacs, -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ 39 /* vim: set expandtab ts=4 : */ 40 /* EOF */ 41