/usr/include/styx/sysbase1.h is in styx-dev 2.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | /* -------------------------------------------------------------------------- */
/* */
/* [sysbase1.h] Standard Definitions ( Part 1 ) */
/* */
/* Copyright (c) 1993 by D\olle, Manns */
/* -------------------------------------------------------------------------- */
/* File generated by 'ctoh'. Don't change manually. */
#ifndef sysbase1_INCL
#define sysbase1_INCL
#include "sysbase0.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ----------------- Byte/String & VarArg Handling -------------------------- */
#define CORE fprintf(STDOUT,"Objects = %ld\n", ObjCount())
#define BUG_CORE bug1(ObjCount() == 0,"%ld objects",ObjCount())
#define BUG_CORE_EX(c) bug1(ObjCount()+(c) == 0,"%ld objects",ObjCount()+(c))
#define New(TYPE) (TYPE)NewMem(SizeOf(TYPE))
StdCPtr BytCopy(StdCPtr bytes, long len)
/* copies 'len' bytes of byte array 'bytes';
allocs memory
*/
;
c_bstring BytToBStrCopy(StdCPtr bytes, long len)
/* constructs a binary string
from 'len' bytes of byte array 'bytes';
allocs memory
*/
;
c_string BytToHStrCopy(StdCPtr bytes, long len)
/* creates a hex string from 'len' bytes of byte array 'bytes';
allocs memory
*/
;
c_string BStrToHStrCopy(c_bstring bstr)
/* creates a hex string from binary string 'bstr';
allocs memory
*/
;
c_bool IsSpaceStr(c_string s)
/* whether string 's' is empty or
only contains space characters
*/
;
size_t WCStrLen(wc_string ws)
/* number of wide characters in string 'ws'
( without the termination character )
*/
;
wc_string SubWCStrCopy(wc_string str, long len)
/* copies 'len' wide characters of string 'str';
appends 0, allocs memory
*/
;
wc_string WCStrCopy(wc_string Str)
/* copies wide character string 'Str'; allocs memory */
;
c_string WCToStrCopy(wc_string wc)
/* copies wide character string 'wc' into a string;
without conversion, allocs memory
*/
;
wc_string WCStrToLower(wc_string st)
/* converts all letters in wide character string 'st' to lower case */
;
wc_string WCStrToUpper(wc_string st)
/* converts all letters in wide character string 'st' to upper case */
;
c_string SubStrCopy(c_string str, long len)
/* copies 'len' characters of string 'str';
appends 0, allocs memory
*/
;
c_string StrCopy(c_string Str); /* copies string 'Str'; allocs memory */
c_string StrToLower(c_string st)
/* converts all letters in string 'st' to lower case */
;
c_string StrToUpper(c_string st)
/* converts all letters in string 'st' to upper case */
;
Any_T* MakeArgLst(va_list args, int fixed_cnt, ...)
/* MakeArgLst is a portable replacement for GetArgLst coping with the
* idiosyncracies of different va_list implementations. Since there is
* no portable way to pass a va_list (caller's variable arguments)
* through '...', it has to be moved before the caller's fixed args.
* fixed_cnt is the count of the caller's fixed arguments.
*
* Sample usage:
* variadic_func(int argcnt, TYPEA a, TYPEB b, TYPEC c, ...)
* {
* va_list va;
* Any_T *argl;
* va_start(va,c); // Must use the *last* fixed argument here
* argl = MakeArgLst(va, 4, argcnt, a, b, c);
* va_end(va);
* // make use of argl
* FreeMem(argl);
* }
*
* For an in depth discussion of variadic functions including
* portability, see libc.info Node: Variadic Functions.
*/
;
/* ------------- Workaround for missing C library functions ----------------- */
wc_string wcsstr_aux(wc_string s1, wc_string s2)
/* workaround for 'wcsstr' */
;
c_string strstr_aux(c_string s1, c_string s2); /* workaround for 'strstr' */
wc_string wcschr_aux(wc_string s, wc_char c); /* workaround for 'wcschr' */
c_string strchr_aux(c_string s, int c); /* workaround for 'strchr' */
wc_string wcsrchr_aux(wc_string s, wc_char c); /* workaround for 'wcsrchr' */
c_string strrchr_aux(c_string s, int c); /* workaround for 'strrchr' */
int strcspn_aux(c_string s, c_string reject); /* workaround for 'strcspn' */
StdCPtr memcpy_aux(StdCPtr dst, StdCPtr src, int n)
/* workaround for 'memcpy' */
;
int memcmp_aux(StdCPtr dst, StdCPtr src, int n); /* workaround for 'memcmp' */
c_string getcwd_aux(c_string buffer, int bufsize)
/* workaround for 'getcwd'; evaluates $PWD */
;
/* -------------------------- System Error ---------------------------------- */
c_string GetSystemError(void); /* system error message; allocs memory */
c_string GetSystemError_noalloc(c_string buffer, int bufsize)
/* system error message */
;
/* -------------------------- Program Execution ----------------------------- */
#define STD_CMD_NOWAIT 0
#define STD_CMD_WAIT_INIT 1
#define STD_CMD_WAIT 2
int runprg(c_string cmd, int cmdflg)
/* executes program 'cmd'
cmdflg=STD_CMD_NOWAIT --> asynchron, non-blocking
cmdflg=STD_CMD_WAIT_INIT --> waits for initialisation
cmdflg=STD_CMD_WAIT --> synchron, blocking
*/
;
/* ----------------- DLL & dynamic Function Call Support -------------------- */
typedef StdCPtr (*PCFUN)();
StdCPtr apply_fun_portable(PCFUN f, int cnt, StdCPtr* args)
/* portable dynamic call of C-function 'f'
with 'cnt' parameters in 'args'
( upto 9 parameters )
*/
;
StdCPtr apply_fun(PCFUN f, int cnt, StdCPtr* args)
/* dynamic call of C-function 'f'
with 'cnt' parameters in 'args'
( restricted to intel )
*/
;
AbstractType( DL_Hdl ); /* Abstract handle type */
#define DL_LOAD_LAZY 0
#if !defined(STYX_CONFIG_OSMS) && (!defined(HAVE_CONFIG_H) || (defined(HAVE_LIBDL) && defined(HAVE_DLFCN_H)))
#define DL_LAZY RTLD_LAZY
#define DL_NOW RTLD_NOW
#define DL_BINDING_MASK RTLD_BINDING_MASK
#define DL_GLOBAL RTLD_GLOBAL
#define DL_LOCAL RTLD_LOCAL
#else
#define DL_LAZY 0
#define DL_NOW 0
#define DL_BINDING_MASK 0
#define DL_GLOBAL 0
#define DL_LOCAL 0
#endif
DL_Hdl DL_open(c_string dlname, int flag)
/* loads dll 'dlname' in mode 'flag' ( ERROR: NULL )
LINUX: flag=RTLD_LAZY|RTLD_NOW|-1=RTLD_NOW, MS: not used
*/
;
int DL_close(DL_Hdl dlhdl)
/* detaches dll 'dlhdl' ( SUCCESS: 0, ERROR: > 0 ) */
;
StdCPtr DL_symbol(DL_Hdl dlhdl, c_string symname)
/* address of symbol 'symname' within dll 'dlhdl' ( ERROR: NULL )
LINUX: function|data, MS: function
*/
;
c_string DL_error(void); /* dll load error; allocs memory */
c_string DL_error_noalloc(c_string buffer, int bufsize); /* dll load error */
/* ---------------------- Network Support ----------------------------------- */
c_string UserName(void); /* login name; allocs memory */
#ifdef __cplusplus
}
#endif
#endif
|