ReactOS 0.4.15-dev-7711-g5627da4
schily.h
Go to the documentation of this file.
1/* @(#)schily.h 1.123 17/08/03 Copyright 1985-2016 J. Schilling */
2/*
3 * Definitions for libschily
4 *
5 * This file should be included past:
6 *
7 * schily/mconfig.h / config.h
8 * schily/standard.h
9 * stdio.h
10 * stdlib.h (better use schily/stdlib.h)
11 * unistd.h (better use schily/unistd.h) needed f. LARGEFILE support
12 * schily/string.h
13 * sys/types.h
14 *
15 * If you need stdio.h, you must include it before schily/schily.h
16 *
17 * NOTE: If you need ctype.h and did not include stdio.h you need to
18 * include ctype.h past schily/schily.h as OpenBSD does not follow POSIX
19 * and defines EOF in ctype.h
20 *
21 * Copyright (c) 1985-2016 J. Schilling
22 */
23/*
24 * The contents of this file are subject to the terms of the
25 * Common Development and Distribution License, Version 1.0 only
26 * (the "License"). You may not use this file except in compliance
27 * with the License.
28 *
29 * See the file CDDL.Schily.txt in this distribution for details.
30 * A copy of the CDDL is also available via the Internet at
31 * http://www.opensource.org/licenses/cddl1.txt
32 *
33 * When distributing Covered Code, include this CDDL HEADER in each
34 * file and include the License file CDDL.Schily.txt from this distribution.
35 */
36
37#ifndef _SCHILY_SCHILY_H
38#define _SCHILY_SCHILY_H
39
40#ifndef _SCHILY_MCONFIG_H
41#include <schily/mconfig.h>
42#endif
43
44#ifndef _SCHILY_STANDARD_H
45#include <schily/standard.h>
46#endif
47#ifndef _SCHILY_CCOMDEFS_H
48#include <schily/ccomdefs.h>
49#endif
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(off_t)
56# ifndef FOUND_OFF_T
57# define FOUND_OFF_T
58# endif
59#endif
60#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(size_t)
61# ifndef FOUND_SIZE_T
62# define FOUND_SIZE_T
63# endif
64#endif
65#if defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
66# undef FOUND_SIZE_T
67#endif
68
69#ifdef __never_def__
70/*
71 * It turns out that we cannot use the folloginw definition because there are
72 * some platforms that do not behave application friendly. These are mainly
73 * BSD-4.4 based systems (which #undef a definition when size_t is available.
74 * We actually removed this code because of a problem with QNX Neutrino.
75 * For this reason, it is important not to include <sys/types.h> directly but
76 * via the Schily SING include files so we know whether it has been included
77 * before we come here.
78 */
79#if defined(_SIZE_T) || defined(_T_SIZE_) || defined(_T_SIZE) || \
80 defined(__SIZE_T) || defined(_SIZE_T_) || \
81 defined(_GCC_SIZE_T) || defined(_SIZET_) || \
82 defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
83
84#ifndef FOUND_SIZE_T
85# define FOUND_SIZE_T /* We already included a size_t definition */
86#endif
87#endif
88#endif /* __never_def__ */
89
90#if defined(HAVE_LARGEFILES)
91# define _fcons _fcons64
92# define fdup fdup64
93# define fileluopen fileluopen64
94# define fileopen fileopen64
95# define filemopen filemopen64
96# define filepos filepos64
97# define filereopen filereopen64
98# define fileseek fileseek64
99# define filesize filesize64
100# define filestat filestat64
101# define _openfd _openfd64
102#endif
103
104/*
105 * The official POSIX rule is not to define "new" interfaces that
106 * are in conflict with older interfaces of the same name.
107 * Our interfaces fexec*() have been defined and published in 1982.
108 * The new POSIX interfaces define a different interface and the
109 * new POSIX interfaces even use names that are not compatible with
110 * POSIX rules. The new POSIX interfaces in question should be called
111 * fdexec*() to follow the rules of other similar POSIX functions.
112 * Simiar problems exist with getline()/fgetline().
113 */
114#if defined(HAVE_RAW_FEXECL) || defined(HAVE_RAW_FEXECLE) || \
115 defined(HAVE_RAW_FEXECV) || defined(HAVE_RAW_FEXECVE)
116#define RENAME_FEXEC
117#endif
118#if defined(HAVE_RAW_FSPAWNV) || defined(HAVE_RAW_FSPAWNL) || \
119 defined(HAVE_RAW_FSPAWNV_NOWAIT)
120#define RENAME_FSPAWN
121#endif
122#if defined(HAVE_RAW_GETLINE) || defined(HAVE_RAW_FGETLINE)
123#define RENAME_GETLINE
124#endif
125
126#ifdef __needed__
127#define RENAME_FEXEC
128#define RENAME_FSPAWN
129#define RENAME_GETLINE
130#endif
131
132#if defined(RENAME_FEXEC) || defined(RENAME_FSPAWN)
133#ifndef _SCHILY_UNISTD_H
134#include <schily/unistd.h> /* Need to incl. before fexec*() protoypes */
135#endif
136#endif
137
138#if defined(RENAME_GETLINE)
139#ifndef _SCHILY_STDIO_H
140#include <schily/stdio.h> /* Need to incl. before *getline() protoypes */
141#endif
142
143#endif
144
145#ifdef EOF /* stdio.h has been included */
146
147extern int _cvmod __PR((const char *, int *, int *));
148extern FILE *_fcons __PR((FILE *, int, int));
149extern FILE *fdup __PR((FILE *));
150#if !defined(fdown) || defined(PROTOTYPES)
151/*
152 * We cannot declare fdown() with K&R in case that fdown() has been #define'd
153 */
154extern int fdown __PR((FILE *));
155#endif
156extern int js_fexecl __PR((const char *, FILE *, FILE *, FILE *,
157 const char *, ...));
158extern int js_fexecle __PR((const char *, FILE *, FILE *, FILE *,
159 const char *, ...));
160 /* 6th arg not const, fexecv forces av[ac] = NULL */
161extern int js_fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
162 char **));
163extern int js_fexecve __PR((const char *, FILE *, FILE *, FILE *,
164 char * const *, char * const *));
165extern int js_fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
166extern int js_fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
167extern int js_fspawnv_nowait __PR((FILE *, FILE *, FILE *,
168 const char *, int, char *const*));
169extern int js_fgetline __PR((FILE *, char *, int));
170#ifdef FOUND_SIZE_T
171extern ssize_t fgetaline __PR((FILE *, char **, size_t *));
172extern ssize_t getaline __PR((char **, size_t *));
173#endif
174extern int fgetstr __PR((FILE *, char *, int));
175extern int file_getraise __PR((FILE *));
176extern void file_raise __PR((FILE *, int));
177extern int fileclose __PR((FILE *));
178extern FILE *fileluopen __PR((int, const char *));
179extern FILE *fileopen __PR((const char *, const char *));
180#ifdef _SCHILY_TYPES_H
181extern FILE *filemopen __PR((const char *, const char *, mode_t));
182#endif
183#ifdef FOUND_OFF_T
184extern off_t filepos __PR((FILE *));
185#endif
186#ifdef FOUND_SIZE_T
187extern ssize_t fileread __PR((FILE *, void *, size_t));
188extern ssize_t ffileread __PR((FILE *, void *, size_t));
189#endif
190extern FILE *filereopen __PR((const char *, const char *, FILE *));
191#ifdef FOUND_OFF_T
192extern int fileseek __PR((FILE *, off_t));
193extern off_t filesize __PR((FILE *));
194#endif
195#ifdef S_IFMT
196extern int filestat __PR((FILE *, struct stat *));
197#endif
198#ifdef FOUND_SIZE_T
199extern ssize_t filewrite __PR((FILE *, void *, size_t));
200extern ssize_t ffilewrite __PR((FILE *, void *, size_t));
201#endif
202extern int flush __PR((void));
203extern int fpipe __PR((FILE **));
204#ifdef __never__
205extern int fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3);
206#endif
207extern int getbroken __PR((FILE *, char *, char, char **, int));
208extern int ofindline __PR((FILE *, char, const char *, int,
209 char **, int));
210extern int peekc __PR((FILE *));
211
212#ifdef __never_def__
213/*
214 * We cannot define this or we may get into problems with DOS based systems.
215 */
216extern int spawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
217extern int spawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
218extern int spawnv_nowait __PR((FILE *, FILE *, FILE *,
219 const char *, int, char *const*));
220#endif /* __never_def__ */
221#endif /* EOF */
222
223/*
224 * Flags for absfpath() and resolvefpath():
225 */
226#define RSPF_EXIST 0x01 /* All path components must exist */
227#define RSPF_NOFOLLOW_LAST 0x02 /* Don't follow link in last pathcomp */
228
229#ifdef FOUND_SIZE_T
230extern char *abspath __PR((const char *relp, char *absp, size_t asize));
231extern char *absnpath __PR((const char *relp, char *absp, size_t asize));
232extern char *absfpath __PR((const char *relp, char *absp, size_t asize,
233 int __flags));
234#ifndef HAVE_RESOLVEPATH
235extern int resolvepath __PR((const char *__path,
236 char *__buf, size_t __bufsiz));
237#endif
238extern int resolvenpath __PR((const char *__path,
239 char *__buf, size_t __bufsiz));
240extern int resolvefpath __PR((const char *__path,
241 char *__buf, size_t __bufsiz, int __flags));
242#endif
243
244#ifdef _SCHILY_TYPES_H
245extern int mkdirs __PR((char *, mode_t));
246extern int makedirs __PR((char *, mode_t, int __striplast));
247#endif
248
249extern int lxchdir __PR((char *));
250#ifdef HAVE_FCHDIR
251#define fdsetname(fd, name) (0)
252#define fdclosename(fd) (0)
253#else
254extern int fdsetname __PR((int fd, const char *name));
255extern int fdclosename __PR((int fd));
256#endif
257extern int diropen __PR((const char *));
258extern int dirrdopen __PR((const char *));
259extern int dirclose __PR((int));
260
261struct save_wd {
262 int fd;
263 char *name;
264};
265
266extern int savewd __PR((struct save_wd *sp));
267extern void closewd __PR((struct save_wd *sp));
268extern int restorewd __PR((struct save_wd *sp));
269
270
271#ifdef _SCHILY_UTYPES_H
272typedef struct gnmult {
273 char key;
274 Llong mult;
275} gnmult_t;
276
277extern int getllnum __PR((char *arg, Llong *lvalp));
278extern int getxnum __PR((char *arg, long *valp, gnmult_t *mult));
279extern int getllxnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
280
281extern int getlltnum __PR((char *arg, Llong *lvalp));
282extern int getxtnum __PR((char *arg, time_t *valp, gnmult_t *mult));
283extern int getllxtnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
284#endif
285extern int getnum __PR((char *arg, long *valp));
286#ifdef _SCHILY_TIME_H
287extern int gettnum __PR((char *arg, time_t *valp));
288#endif
289
290#ifdef _SCHILY_TIME_H
291
292extern int getnstimeofday __PR((struct timespec *__tp));
293extern int setnstimeofday __PR((struct timespec *__tp));
294
295#ifdef _SCHILY_UTYPES_H
296extern Llong mklgmtime __PR((struct tm *));
297#endif
298extern time_t mkgmtime __PR((struct tm *));
299#endif
300
301
302#ifdef EOF /* stdio.h has been included */
303#ifdef _SCHILY_TYPES_H
304/*
305 * getperm() flags:
306 */
307#define GP_NOX 0 /* This is not a dir and 'X' is not valid */
308#define GP_DOX 1 /* 'X' perm character is valid */
309#define GP_XERR 2 /* 'X' perm characters are invalid */
310#define GP_FPERM 4 /* TRUE if we implement find -perm */
311#define GP_UMASK 8 /* TRUE if we implement umask */
312
313extern int getperm __PR((FILE *f, char *perm, char *opname, \
314 mode_t *modep, int smode, int flag));
315extern void permtostr __PR((mode_t mode, char *));
316#endif
317#endif
318
319#ifdef FOUND_SIZE_T
320extern ssize_t _niread __PR((int, void *, size_t));
321extern ssize_t _niwrite __PR((int, void *, size_t));
322extern ssize_t _nixread __PR((int, void *, size_t));
323extern ssize_t _nixwrite __PR((int, void *, size_t));
324#endif
325extern int _openfd __PR((const char *, int));
326extern int on_comerr __PR((void (*fun)(int, void *), void *arg));
327/*PRINTFLIKE1*/
328extern void comerr __PR((const char *, ...)) __printflike__(1, 2);
329/*PRINTFLIKE2*/
330extern void xcomerr __PR((int, const char *, ...)) __printflike__(2, 3);
331/*PRINTFLIKE2*/
332extern void comerrno __PR((int, const char *, ...)) __printflike__(2, 3);
333/*PRINTFLIKE3*/
334extern void xcomerrno __PR((int, int, const char *, ...)) __printflike__(3, 4);
335/*PRINTFLIKE1*/
336extern int errmsg __PR((const char *, ...)) __printflike__(1, 2);
337/*PRINTFLIKE2*/
338extern int errmsgno __PR((int, const char *, ...)) __printflike__(2, 3);
339#ifdef FOUND_SIZE_T
340/*PRINTFLIKE3*/
341extern int serrmsg __PR((char *, size_t, const char *, ...))
342 __printflike__(3, 4);
343/*PRINTFLIKE4*/
344extern int serrmsgno __PR((int, char *, size_t, const char *, ...))
345 __printflike__(4, 5);
346#endif
347extern void comexit __PR((int));
348extern char *errmsgstr __PR((int));
349
350#ifdef EOF /* stdio.h has been included */
351/*PRINTFLIKE2*/
352extern void fcomerr __PR((FILE *, const char *, ...))
353 __printflike__(2, 3);
354/*PRINTFLIKE3*/
355extern void fxcomerr __PR((FILE *, int, const char *, ...))
356 __printflike__(3, 4);
357/*PRINTFLIKE3*/
358extern void fcomerrno __PR((FILE *, int, const char *, ...))
359 __printflike__(3, 4);
360/*PRINTFLIKE4*/
361extern void fxcomerrno __PR((FILE *, int, int, const char *, ...))
362 __printflike__(4, 5);
363/*PRINTFLIKE2*/
364extern int ferrmsg __PR((FILE *, const char *, ...))
365 __printflike__(2, 3);
366/*PRINTFLIKE3*/
367extern int ferrmsgno __PR((FILE *, int, const char *, ...))
368 __printflike__(3, 4);
369#ifdef _SCHILY_VARARGS_H
370#define COMERR_RETURN 0
371#define COMERR_EXIT 1
372#define COMERR_EXCODE 2
373/*PRINTFLIKE5*/
374extern int _comerr __PR((FILE *, int, int, int,
375 const char *, va_list));
376#endif
377#endif
378
379/*PRINTFLIKE1*/
380extern int error __PR((const char *, ...)) __printflike__(1, 2);
381#ifdef FOUND_SIZE_T
382extern char *fillbytes __PR((void *, ssize_t, char));
383extern char *zerobytes __PR((void *, ssize_t));
384extern char *findbytes __PR((const void *, ssize_t, char));
385#endif
386extern char *findinpath __PR((char *__name, int __mode,
387 BOOL __plain_file, char *__path));
388extern int findline __PR((const char *, char, const char *,
389 int, char **, int));
390extern int js_getline __PR((char *, int));
391extern int getstr __PR((char *, int));
392extern int breakline __PR((char *, char, char **, int));
393extern int getallargs __PR((int *, char * const**, const char *, ...));
394extern int getargs __PR((int *, char * const**, const char *, ...));
395extern int getfiles __PR((int *, char * const**, const char *));
396extern char *astoi __PR((const char *, int *));
397extern char *astol __PR((const char *, long *));
398extern char *astolb __PR((const char *, long *, int base));
399#ifdef _SCHILY_UTYPES_H
400extern char *astoll __PR((const char *, Llong *));
401extern char *astollb __PR((const char *, Llong *, int));
402extern char *astoull __PR((const char *, Ullong *));
403extern char *astoullb __PR((const char *, Ullong *, int));
404#endif
405
406extern int patcompile __PR((const unsigned char *, int, int *));
407extern unsigned char *patmatch __PR((const unsigned char *, const int *,
408 const unsigned char *,
409 int, int, int, int[]));
410extern unsigned char *patlmatch __PR((const unsigned char *, const int *,
411 const unsigned char *,
412 int, int, int, int[]));
413
414#ifdef __never__
415extern int printf __PR((const char *, ...)) __printflike__(1, 2);
416#endif
417#ifdef FOUND_SIZE_T
418extern char *movebytes __PR((const void *, void *, ssize_t));
419extern char *movecbytes __PR((const void *, void *, int, size_t));
420#endif
421
422extern void save_args __PR((int, char **));
423extern int saved_ac __PR((void));
424extern char **saved_av __PR((void));
425extern char *saved_av0 __PR((void));
426extern char *searchfileinpath __PR((char *__name, int __mode,
427 int __file_mode, char *__path));
428#define SIP_ANY_FILE 0x00 /* Search for any file type */
429#define SIP_PLAIN_FILE 0x01 /* Search for plain files - not dirs */
430#define SIP_NO_PATH 0x10 /* Do not do PATH search */
431#define SIP_ONLY_PATH 0x20 /* Do only PATH search */
432#define SIP_NO_STRIPBIN 0x40 /* Do not strip "/bin" from PATH elem. */
433#define SIP_TYPE_MASK 0x0F /* Mask file type related bits */
434
435#ifndef seterrno
436extern int seterrno __PR((int));
437#endif
438extern void set_progname __PR((const char *));
439extern char *get_progname __PR((void));
440extern char *get_progpath __PR((void));
441extern char *getexecpath __PR((void));
442
443extern void setfp __PR((void * const *));
444extern int wait_chld __PR((int)); /* for fspawnv_nowait() */
445extern int geterrno __PR((void));
446extern void raisecond __PR((const char *, long));
447#ifdef __never__
448/*
449 * sprintf() may be declared incorrectly somewhere else
450 * e.g. in old BSD include files
451 */
452extern int sprintf __PR((char *, const char *, ...));
453#endif
454extern char *strcatl __PR((char *, ...));
455#ifdef FOUND_SIZE_T
456extern size_t strlcatl __PR((char *, size_t, ...));
457#endif
458extern int streql __PR((const char *, const char *));
459#ifdef _SCHILY_WCHAR_H
460extern wchar_t *wcscatl __PR((wchar_t *, ...));
461#ifdef FOUND_SIZE_T
462extern size_t wcslcatl __PR((wchar_t *, size_t, ...));
463#endif
464extern int wcseql __PR((const wchar_t *, const wchar_t *));
465#endif
466#ifdef va_arg
467extern int format __PR((void (*)(char, void *), void *, const char *,
468 va_list));
469extern int fprformat __PR((void *, const char *, va_list));
470#else
471extern int format __PR((void (*)(char, void *), void *, const char *, void *));
472extern int fprformat __PR((void *, const char *, void *));
473#endif
474
475extern int ftoes __PR((char *, double, int, int));
476extern int ftofs __PR((char *, double, int, int));
477#ifdef HAVE_LONGDOUBLE
478extern int qftoes __PR((char *, long double, int, int));
479extern int qftofs __PR((char *, long double, int, int));
480#endif
481
482/*PRINTFLIKE1*/
483extern int js_error __PR((const char *, ...)) __printflike__(1, 2);
484/*PRINTFLIKE2*/
485extern int js_dprintf __PR((int, const char *, ...))
486 __printflike__(2, 3);
487#ifdef EOF /* stdio.h has been included */
488/*PRINTFLIKE2*/
489extern int js_fprintf __PR((FILE *, const char *, ...))
490 __printflike__(2, 3);
491#endif /* EOF */
492/*PRINTFLIKE1*/
493extern int js_printf __PR((const char *, ...)) __printflike__(1, 2);
494#ifdef FOUND_SIZE_T
495/*PRINTFLIKE3*/
496extern int js_snprintf __PR((char *, size_t, const char *, ...))
497 __printflike__(3, 4);
498#endif
499/*PRINTFLIKE2*/
500extern int js_sprintf __PR((char *, const char *, ...))
501 __printflike__(2, 3);
502
503#ifdef FOUND_SIZE_T
504extern void swabbytes __PR((void *, ssize_t));
505#endif
506extern char **getmainfp __PR((void));
507extern char **getavp __PR((void));
508extern char *getav0 __PR((void));
509extern void **getfp __PR((void));
510extern int flush_reg_windows __PR((int));
511#ifdef FOUND_SIZE_T
512extern ssize_t cmpbytes __PR((const void *, const void *, ssize_t));
513extern int cmpmbytes __PR((const void *, const void *, ssize_t));
514extern ssize_t cmpnullbytes __PR((const void *, ssize_t));
515#endif
516
517#ifdef nonono
518#if defined(HAVE_LARGEFILES)
519/*
520 * To allow this, we need to figure out how to do autoconfiguration for off64_t
521 */
522extern FILE *_fcons64 __PR((FILE *, int, int));
523extern FILE *fdup64 __PR((FILE *));
524extern FILE *fileluopen64 __PR((int, const char *));
525extern FILE *fileopen64 __PR((const char *, const char *));
526#ifdef FOUND_OFF_T
527extern off64_t filepos64 __PR((FILE *));
528#endif
529extern FILE *filereopen64 __PR((const char *, const char *, FILE *));
530#ifdef FOUND_OFF_T
531extern int fileseek64 __PR((FILE *, off64_t));
532extern off64_t filesize64 __PR((FILE *));
533#endif
534#ifdef S_IFMT
535extern int filestat64 __PR((FILE *, struct stat *));
536#endif
537extern int _openfd64 __PR((const char *, int));
538#endif
539#endif
540
541#ifndef NO_SCHILY_PRINT /* Define to disable *printf() redirects */
542#ifdef SCHILY_PRINT
543#ifdef __never__
544#undef error
545#define error js_error
546#endif /* __never__ */
547#undef dprintf
548#define dprintf js_dprintf
549#undef fprintf
550#define fprintf js_fprintf
551#undef printf
552#define printf js_printf
553#undef snprintf
554#define snprintf js_snprintf
555#undef sprintf
556#define sprintf js_sprintf
557#else
558#ifndef HAVE_SNPRINTF
559#undef snprintf
560#define snprintf js_snprintf
561#endif /* HAVE_SNPRINTF */
562#endif /* SCHILY_PRINT */
563#endif /* NO_SCHILY_PRINT */
564
565#ifndef NO_SCHILY_GETLINE /* Define to disable *getline() redirect */
566#undef getline
567#define getline js_getline
568#undef fgetline
569#define fgetline js_fgetline
570#endif
571
572#ifndef NO_SCHILY_FEXEC /* Define to disable fexec*() redirect */
573#undef fexecl
574#define fexecl js_fexecl
575#undef fexecle
576#define fexecle js_fexecle
577#undef fexecv
578#define fexecv js_fexecv
579#undef fexecve
580#define fexecve js_fexecve
581#endif
582
583#ifndef NO_SCHILY_FSPAWN /* Define to disable fspawn*() redirect */
584#undef fspawnv
585#define fspawnv js_fspawnv
586#undef fspawnv_nowait
587#define fspawnv_nowait js_fspawnv_nowait
588#undef fspawnl
589#define fspawnl js_fspawnl
590#endif
591
592extern int js_mexval __PR((int exval));
593#ifdef FOUND_SIZE_T
594extern void *js_malloc __PR((size_t size, char *msg));
595extern void *js_realloc __PR((void *ptr, size_t size, char *msg));
596#endif
597extern char *js_savestr __PR((const char *s));
598
599#ifdef _SCHILY_JMPDEFS_H
600
601/*
602 * Special values for the "jmp" parameter.
603 *
604 * Control how the siglongjmp() should be handled:
605 */
606#define JM_EXIT ((sigjmps_t *)-1) /* Call comexit(errno) instead */
607#define JM_RETURN ((sigjmps_t *)0) /* Return instead */
608
609extern int js_jmexval __PR((int exval));
610#ifdef FOUND_SIZE_T
611extern void *js_jmalloc __PR((size_t size, char *msg, sigjmps_t *jmp));
612extern void *js_jrealloc __PR((void *ptr, size_t size, char *msg,
613 sigjmps_t *jmp));
614#endif
615extern char *js_jsavestr __PR((const char *s, sigjmps_t *jmp));
616
617extern int js_fjmexval __PR((int exval));
618#ifdef EOF /* stdio.h has been included */
619#ifdef FOUND_SIZE_T
620extern void *js_fjmalloc __PR((FILE *f, size_t size, char *msg,
621 sigjmps_t *jmp));
622extern void *js_fjrealloc __PR((FILE *f, void *ptr, size_t size,
623 char *msg, sigjmps_t *jmp));
624#endif
625extern char *js_fjsavestr __PR((FILE *f, const char *s, sigjmps_t *jmp));
626#endif /* EOF */
627#endif /* _SCHILY_JMPDEFS_H */
628
629#define ___mexval js_mexval
630#define ___malloc js_malloc
631#define ___realloc js_realloc
632#define ___savestr js_savestr
633#define __jmexval js_jmexval
634#define __jmalloc js_jmalloc
635#define __jrealloc js_jrealloc
636#define __jsavestr js_jsavestr
637#define __fjmalloc js_fjmalloc
638#define __fjmexval js_fjmexval
639#define __fjrealloc js_fjrealloc
640#define __fjsavestr js_fjsavestr
641
642#ifdef __cplusplus
643}
644#endif
645
646#if defined(_JOS) || defined(JOS)
647# ifndef _SCHILY_JOS_IO_H
648# include <schily/jos_io.h>
649# endif
650#endif
651
652#if !defined(_SCHILY_LIBPORT_H) && !defined(NO_LIBPORT_H)
653#include <schily/libport.h>
654#endif
655#if !defined(_SCHILY_HOSTNAME_H) && defined(USE_HOSTNAME_H)
656#include <schily/hostname.h>
657#endif
658
659#endif /* _SCHILY_SCHILY_H */
char * va_list
Definition: acmsvcex.h:78
char * astollb(const char *s, Llong *l, int base)
Definition: astoll.c:64
char * astoll(const char *s, Llong *l)
Definition: astoll.c:56
#define msg(x)
Definition: auth_time.c:54
#define __printflike__(fmtarg, firstvararg)
Definition: ccomdefs.h:39
EXPORT int _comerr(FILE *f, int exflg, int exc, int err, const char *msg, va_list args)
Definition: comerr.c:259
EXPORT char * errmsgstr(int err)
Definition: comerr.c:352
EXPORT void xcomerr(int exc, char *msg, va_alist)
Definition: comerr.c:110
EXPORT void comerrno(int err, char *msg, va_alist)
Definition: comerr.c:137
EXPORT void xcomerrno(int exc, int err, char *msg, va_alist)
Definition: comerr.c:164
EXPORT int errmsgno(int err, char *msg, va_alist)
Definition: comerr.c:219
EXPORT int on_comerr(void *func, void *arg)
Definition: comerr.c:58
EXPORT void comexit(int err)
Definition: comerr.c:331
EXPORT void comerr(char *msg, va_alist)
Definition: comerr.c:84
EXPORT int errmsg(char *msg, va_alist)
Definition: comerr.c:192
EXPORT int _cvmod(char *mode, int *omode, int *flag) const
Definition: cvmod.c:27
__kernel_time_t time_t
Definition: linux.h:252
__kernel_mode_t mode_t
Definition: linux.h:199
__kernel_off_t off_t
Definition: linux.h:201
EXPORT FILE * _fcons(FILE *fd, int f, int flag)
Definition: fcons.c:53
EXPORT int ftoes(register char *s, MDOUBLE val, register int fieldwidth, register int ndigits)
Definition: fconv.c:209
EXPORT int ftofs(register char *s, MDOUBLE val, register int fieldwidth, register int ndigits)
Definition: fconv.c:290
EXPORT ssize_t ffileread(FILE *f, void *buf, size_t len)
Definition: ffileread.c:20
EXPORT int js_getline(char *buf, int len)
Definition: fgetline.c:178
EXPORT int js_fgetline(register FILE *f, char *buf, register int len)
Definition: fgetline.c:94
EXPORT FILE * fileopen(char *name, const char *mode) const
Definition: fileopen.c:20
unsigned int BOOL
Definition: ntddk_ex.h:94
EXPORT ssize_t filewrite(FILE *f, void *vbuf, size_t len)
Definition: filewrite.c:71
EXPORT char * fillbytes(void *tov, ssize_t cnt, char val)
Definition: fillbytes.c:36
#define printf
Definition: freeldr.h:94
EXPORT int geterrno()
Definition: geterrno.c:34
EXPORT char * getexecpath()
Definition: getexecpath.c:55
GLdouble s
Definition: gl.h:2039
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
GLfloat f
Definition: glext.h:7540
GLenum mode
Definition: glext.h:6217
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
__MINGW_EXTENSION typedef long long off64_t
Definition: stdio.h:84
EXPORT int js_printf(char *form, va_alist)
Definition: jsprintf.c:47
EXPORT int js_fprintf(FILE *file, char *form, va_alist)
Definition: jsprintf.c:71
EXPORT int js_snprintf(char *buf, unsigned maxcnt, char *form, va_alist)
Definition: jssnprintf.c:62
#define error(str)
Definition: mkdosfs.c:1605
EXPORT CHAR * patmatch(PCHAR *pat, const int *aux, const CHAR *str, int soff, int slen, int alt, state) const
Definition: match.c:230
EXPORT int patcompile(PCHAR *pat, int len, int *aux) const
Definition: match.c:584
static PVOID ptr
Definition: dispmode.c:27
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static const WCHAR sp[]
Definition: suminfo.c:287
EXPORT char * movebytes(void *fromv, void *tov, ssize_t cnt) const
Definition: movebytes.c:30
EXPORT ssize_t _niwrite(int f, void *buf, size_t count)
Definition: niwrite.c:22
#define __PR(a)
Definition: prototyp.h:106
EXPORT void raisecond(char *signame, long arg2) const
Definition: raisecond.c:100
int ssize_t
Definition: rosdhcp.h:48
EXPORT int saved_ac()
Definition: saveargs.c:96
EXPORT void set_progname(char *name) const
Definition: saveargs.c:123
EXPORT void save_args(int ac, av)
Definition: saveargs.c:58
EXPORT char * get_progname()
Definition: saveargs.c:151
EXPORT char ** saved_av()
Definition: saveargs.c:105
EXPORT char * saved_av0()
Definition: saveargs.c:114
EXPORT char * get_progpath()
Definition: saveargs.c:163
#define _openfd(name, omode)
Definition: schilyio.h:75
_CRTIMP intptr_t __cdecl spawnv(_In_ int, _In_z_ const char *_Filename, _In_z_ char *const _ArgList[])
_CRTIMP intptr_t __cdecl spawnl(_In_ int, _In_z_ const char *_Filename, _In_z_ const char *_ArgList,...)
int flush
Definition: zlib.h:309
static int fd
Definition: io.c:51
EXPORT int js_error(char *fmt, va_alist)
Definition: error.c:72
EXPORT char * searchfileinpath(char *name, int mode, int file_mode, char *path)
Definition: searchinpath.c:68
EXPORT int seterrno(int err)
Definition: seterrno.c:34
EXPORT int streql(char *a, const char *b) const
Definition: streql.c:23
Definition: copy.c:22
Definition: name.c:39
char * name
Definition: schily.h:263
int fd
Definition: schily.h:262
Definition: stat.h:55
Definition: time.h:88
Definition: time.h:68
long Llong
Definition: stdint.h:152
unsigned long Ullong
Definition: stdint.h:153
EXPORT int getfiles(int *pac, pav, const char *fmt)
Definition: getargs.c:342
EXPORT int getargs(int *pac, pav, char *fmt, va_alist)
Definition: getargs.c:170
EXPORT int getallargs(int *pac, pav, char *fmt, va_alist)
Definition: getargs.c:245
#define const
Definition: zconf.h:233
EXPORT char * zerobytes(void *tov, ssize_t cnt)
Definition: zerobytes.c:30