fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
at master 53 lines 2.8 kB view raw
1/***************************************************************************** 2 * pce * 3 *****************************************************************************/ 4 5/***************************************************************************** 6 * File name: src/lib/msg.h * 7 * Created: 2005-12-08 by Hampa Hug <hampa@hampa.ch> * 8 * Copyright: (C) 2005-2020 Hampa Hug <hampa@hampa.ch> * 9 *****************************************************************************/ 10 11/***************************************************************************** 12 * This program is free software. You can redistribute it and / or modify it * 13 * under the terms of the GNU General Public License version 2 as published * 14 * by the Free Software Foundation. * 15 * * 16 * This program is distributed in the hope that it will be useful, but * 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 * Public License for more details. * 20 *****************************************************************************/ 21 22 23#ifndef PCE_LIB_MSG_H 24#define PCE_LIB_MSG_H 1 25 26 27/*!*************************************************************************** 28 * @short Check a message 29 * @return True if val is of the form "[rest.]msg" 30 *****************************************************************************/ 31int msg_is_message (const char *msg, const char *val); 32 33/*!*************************************************************************** 34 * @short Check a message for a prefix 35 * @return True if val is of the form "pre.rest". 36 *****************************************************************************/ 37int msg_is_prefix (const char *pre, const char *val); 38 39int msg_get_ulng (const char *str, unsigned long *val); 40int msg_get_slng (const char *str, long *val); 41int msg_get_uint (const char *str, unsigned *val); 42int msg_get_sint (const char *str, int *val); 43int msg_get_double (const char *str, double *val); 44int msg_get_bool (const char *str, int *val); 45 46int msg_get_prefix_ulng (const char **str, unsigned long *val, const char *sep, const char *trim); 47int msg_get_prefix_uint (const char **str, unsigned *val, const char *sep, const char *trim); 48int msg_get_prefix_slng (const char **str, long *val, const char *sep, const char *trim); 49int msg_get_prefix_sint (const char **str, int *val, const char *sep, const char *trim); 50int msg_get_prefix_bool (const char **str, int *val, const char *sep, const char *trim); 51 52 53#endif