rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
rlcutil.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlcutil.cpp - description
3  -------------------
4  begin : Wed Dec 11 2002
5  copyright : (C) 2002 by R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
19 #ifndef _RL_CUTIL_H_
20 #define _RL_CUTIL_H_
21 
22 #include <stdarg.h>
23 #include <ctype.h>
24 #include <sys/types.h>
25 #include <sys/stat.h>
26 #include "rldefine.h"
27 
31 int rlSetDebugPrintf(int state);
32 int rlDebugPrintf(const char *format, ...);
33 
37 int rlLastLinePrintf(const char *format, ...);
38 
39 #ifdef RLUNIX
40 
43 #ifndef SWIG
44 int rlexec(const char *command);
45 #endif
46 #endif
47 
51 const char *rlpass(const char *p);
52 
56 char *rlstrncpy(char *dest, const char *source, int n);
57 
61 #ifndef SWIG
62 int rlvsnprintf(char *text, int len, const char *format, va_list ap);
63 #endif
64 
68 int rlsnprintf(char *text, int len, const char *format, ...);
69 
73 void rlSetSigtermHandler(void (*handler)(void *arg), void *arg);
74 
78 const char *rlFindFile(const char *pattern, int *context);
79 
86 const char *rlGetInifile(const char *name);
87 
91 int rlSwapShort(int val);
92 
96 int rlEib1 (int command);
97 int rlEib2 (int command);
98 int rlLon1 (int command);
99 int rlLon2 (int command);
100 int rlProfibus1(int command);
101 int rlProfibus2(int command);
102 int rlCan1 (int command);
103 int rlCan2 (int command);
104 
108 int rlBrowser(const char *htmlfile);
109 
113 int rlsystem(const char *command);
114 
120 int rlSubmitPvserver(const char *env, const char *path, const char *pvs, const char *options=NULL);
121 
127 int rlOption(const char *string, const char *option);
128 
132 int rlIntOption(const char *string, const char *option, int _default);
133 
137 float rlFloatOption(const char *string, const char *option, float _default);
138 
142 const char *rlTextOption(const char *string, const char *option, const char *_default);
143 
147 int rlCopyTextfile(const char *source, const char *destination);
148 
152 int rlupper(char *str);
153 
157 int rllower(char *str);
158 
162 int rlStartsWith(const char *str, const char *startstr);
163 
167 int rlStrMatch(const char *str, const char *wild);
168 
172 #ifndef SWIG
173 int rlStat(const char *filepath, struct stat *buf);
174 #endif
175 
179 int rlMkdir(const char *dir, int mode=0744);
180 
185 int rlBitSet(int bitnumber, int *value);
186 
191 int rlBitClear(int bitnumber, int *value);
192 
197 int rlBitChange(int bitnumber, int *value);
198 
203 int rlBitTest(int bitnumber, int *value);
204 
205 #endif