|
rllib
1
|
00001 /*************************************************************************** 00002 rlcutil.cpp - description 00003 ------------------- 00004 begin : Wed Dec 11 2002 00005 copyright : (C) 2002 by Rainer Lehrig 00006 email : lehrig@t-online.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This library is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as * 00013 * published by the Free Software Foundation * 00014 * * 00015 ***************************************************************************/ 00019 #ifndef _RL_CUTIL_H_ 00020 #define _RL_CUTIL_H_ 00021 00022 #include <stdarg.h> 00023 #include <ctype.h> 00024 #include "rldefine.h" 00025 00029 int rlSetDebugPrintf(int state); 00030 int rlDebugPrintf(const char *format, ...); 00031 00035 int rlLastLinePrintf(const char *format, ...); 00036 00037 #ifdef RLUNIX 00038 00041 #ifndef SWIG 00042 int rlexec(const char *command); 00043 #endif 00044 #endif 00045 00049 const char *rlpass(const char *p); 00050 00054 char *rlstrncpy(char *dest, const char *source, int n); 00055 00059 #ifndef SWIG 00060 int rlvsnprintf(char *text, int len, const char *format, va_list ap); 00061 #endif 00062 00066 int rlsnprintf(char *text, int len, const char *format, ...); 00067 00071 void rlSetSigtermHandler(void (*handler)(void *arg), void *arg); 00072 00076 const char *rlFindFile(const char *pattern, int *context); 00077 00084 const char *rlGetInifile(const char *name); 00085 00089 int rlSwapShort(int val); 00090 00094 int rlEib1 (int command); 00095 int rlEib2 (int command); 00096 int rlLon1 (int command); 00097 int rlLon2 (int command); 00098 int rlProfibus1(int command); 00099 int rlProfibus2(int command); 00100 int rlCan1 (int command); 00101 int rlCan2 (int command); 00102 00106 int rlBrowser(const char *htmlfile); 00107 00111 int rlsystem(const char *command); 00112 00118 int rlSubmitPvserver(const char *env, const char *path, const char *pvs, const char *options=NULL); 00119 00125 int rlOption(const char *string, const char *option); 00126 00130 int rlIntOption(const char *string, const char *option, int _default); 00131 00135 float rlFloatOption(const char *string, const char *option, float _default); 00136 00140 const char *rlTextOption(const char *string, const char *option, const char *_default); 00141 00145 int rlCopyTextfile(const char *source, const char *destination); 00146 00150 int rlupper(char *str); 00151 00155 int rllower(char *str); 00156 00160 int rlStartsWith(const char *str, const char *startstr); 00161 00162 #endif
1.7.5.1