C Standard Library Extensions
1.1
|
00001 /* $Id: cxutils.h,v 1.6 2011/02/21 14:15:31 rpalsa Exp $ 00002 * 00003 * This file is part of the ESO C Extension Library 00004 * Copyright (C) 2001-2011 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 /* 00022 * $Author: rpalsa $ 00023 * $Date: 2011/02/21 14:15:31 $ 00024 * $Revision: 1.6 $ 00025 * $Name: cpl-6_0 $ 00026 */ 00027 00028 #ifndef CX_UTILS_H 00029 #define CX_UTILS_H 00030 00031 #include <stdarg.h> 00032 #include <cxtypes.h> 00033 00034 00035 CX_BEGIN_DECLS 00036 00037 /* 00038 * Static information retrieval 00039 */ 00040 00041 const cxchar *cx_program_get_name(void); 00042 void cx_program_set_name(const cxchar *); 00043 00044 cxlong cx_line_max(void); 00045 00046 00047 /* 00048 * Bit tests 00049 */ 00050 00051 cxint cx_bits_find(cxuint32, cxint); 00052 cxint cx_bits_rfind(cxuint32, cxint); 00053 00054 00055 /* 00056 * Miscellaneous utility functions 00057 */ 00058 00059 cxint cx_snprintf(cxchar *, cxsize, 00060 const cxchar *, ...) CX_GNUC_PRINTF(3, 4); 00061 cxint cx_vsnprintf(cxchar *, cxsize, 00062 const cxchar *, va_list) CX_GNUC_PRINTF(3, 0); 00063 cxint cx_asprintf(cxchar **, const cxchar *, ...) CX_GNUC_PRINTF(2, 3); 00064 cxint cx_vasprintf(cxchar **, const cxchar *, va_list) CX_GNUC_PRINTF(2, 0); 00065 00066 cxchar *cx_line_alloc(void); 00067 00068 CX_END_DECLS 00069 00070 #endif /* CX_UTILS_H */