home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / linux / backup / star-1.3.1.tar.gz / star-1.3.1.tar / star-1.3.1 / include / schily.h < prev    next >
C/C++ Source or Header  |  2001-02-23  |  9KB  |  269 lines

  1. /* @(#)schily.h    1.39 01/02/23 Copyright 1985 J. Schilling */
  2. /*
  3.  *    Definitions for libschily
  4.  *
  5.  *    This file should be included past:
  6.  *
  7.  *    mconfig.h / config.h
  8.  *    standard.h
  9.  *    stdio.h
  10.  *    stdlib.h    (better use stdxlib.h)
  11.  *    unistd.h    (better use unixstd.h) needed LARGEFILE support
  12.  *    string.h
  13.  *    sys/types.h
  14.  *
  15.  *    Copyright (c) 1985 J. Schilling
  16.  */
  17. /*
  18.  * This program is free software; you can redistribute it and/or modify
  19.  * it under the terms of the GNU General Public License as published by
  20.  * the Free Software Foundation; either version 2, or (at your option)
  21.  * any later version.
  22.  *
  23.  * This program is distributed in the hope that it will be useful,
  24.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  25.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  26.  * GNU General Public License for more details.
  27.  *
  28.  * You should have received a copy of the GNU General Public License
  29.  * along with this program; see the file COPYING.  If not, write to
  30.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  31.  */
  32.  
  33. #ifndef _SCHILY_H
  34. #define _SCHILY_H
  35.  
  36. #ifndef _STANDARD_H
  37. #include <standard.h>
  38. #endif
  39. #ifndef _CCOMDEFS_H
  40. #include <ccomdefs.h>
  41. #endif
  42.  
  43. #ifdef    __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if    defined(_INCL_SYS_TYPES_H) || defined(off_t)
  48. #    ifndef    FOUND_OFF_T
  49. #    define    FOUND_OFF_T
  50. #    endif
  51. #endif
  52. #if    defined(_INCL_SYS_TYPES_H) || defined(size_t)
  53. #    ifndef    FOUND_SIZE_T
  54. #    define    FOUND_SIZE_T
  55. #    endif
  56. #endif
  57.  
  58. #if    defined(_SIZE_T)     || defined(_T_SIZE_) || defined(_T_SIZE) || \
  59.     defined(__SIZE_T)    || defined(_SIZE_T_) || \
  60.     defined(_GCC_SIZE_T) || defined(_SIZET_)  || \
  61.     defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
  62.  
  63. #ifndef    FOUND_SIZE_T
  64. #    define    FOUND_SIZE_T    /* We already included a size_t definition */
  65. #endif
  66. #endif
  67.  
  68. #if    defined(HAVE_LARGEFILES)
  69. #    define    _fcons        _fcons64
  70. #    define    fdup        fdup64
  71. #    define    fileluopen    fileluopen64
  72. #    define    fileopen    fileopen64
  73. #    define    filepos        filepos64
  74. #    define    filereopen    filereopen64
  75. #    define    fileseek    fileseek64
  76. #    define    filesize    filesize64
  77. #    define    filestat    filestat64
  78. #    define    _openfd        _openfd64
  79. #endif
  80.  
  81. #ifdef    EOF    /* stdio.h has been included */
  82. extern    int    _cvmod __PR((const char *, int *, int *));
  83. extern    FILE    *_fcons __PR((FILE *, int, int));
  84. extern    FILE    *fdup __PR((FILE *));
  85. extern    int    fdown __PR((FILE *));
  86. extern    int    fexecl __PR((const char *, FILE *, FILE *, FILE *,
  87.                             const char *, ...));
  88. extern    int    fexecle __PR((const char *, FILE *, FILE *, FILE *,
  89.                             const char *, ...));
  90.         /* 6th arg not const, fexecv forces av[ac] = NULL */
  91. extern    int    fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
  92.                             char **));
  93. extern    int    fexecve __PR((const char *, FILE *, FILE *, FILE *,
  94.                     char * const *, char * const *));
  95. extern    int    fgetline __PR((FILE *, char *, int));
  96. extern    int    fgetstr __PR((FILE *, char *, int));
  97. extern    void    file_raise __PR((FILE *, int));
  98. extern    int    fileclose __PR((FILE *));
  99. extern    FILE    *fileluopen __PR((int, const char *));
  100. extern    FILE    *fileopen __PR((const char *, const char *));
  101. #ifdef    FOUND_OFF_T
  102. extern    off_t    filepos __PR((FILE *));
  103. #endif
  104. extern    int    fileread __PR((FILE *, void *, int));
  105. extern    int    ffileread __PR((FILE *, void *, int));
  106. extern    FILE    *filereopen __PR((const char *, const char *, FILE *));
  107. #ifdef    FOUND_OFF_T
  108. extern    int    fileseek __PR((FILE *, off_t));
  109. extern    off_t    filesize __PR((FILE *));
  110. #endif
  111. #ifdef    S_IFMT
  112. extern    int    filestat __PR((FILE *, struct stat *));
  113. #endif
  114. extern    int    filewrite __PR((FILE *, void *, int));
  115. extern    int    ffilewrite __PR((FILE *, void *, int));
  116. extern    int    flush __PR((void));
  117. extern    int    fpipe __PR((FILE **));
  118. extern    int    fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3);
  119. extern    int    getbroken __PR((FILE *, char *, char, char **, int));
  120. extern    int    ofindline __PR((FILE *, char, const char *, int,
  121.                             char **, int));
  122. extern    int    peekc __PR((FILE *));
  123.  
  124. extern    int    spawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
  125. extern    int    spawnl __PR((FILE *, FILE *, FILE *,
  126.                     const char *, const char *, ...));
  127. extern    int    spawnv_nowait __PR((FILE *, FILE *, FILE *,
  128.                     const char *, int, char *const*));
  129. #endif    /* EOF */
  130.  
  131. extern    int    _niread __PR((int, void *, int));
  132. extern    int    _openfd __PR((const char *, int));
  133. extern    int    on_comerr __PR((void (*fun)(int, void *), void *arg));
  134. /*PRINTFLIKE1*/
  135. extern    void    comerr __PR((const char *, ...)) __printflike__(1, 2);
  136. /*PRINTFLIKE2*/
  137. extern    void    comerrno __PR((int, const char *, ...)) __printflike__(2, 3);
  138. /*PRINTFLIKE1*/
  139. extern    int    errmsg __PR((const char *, ...)) __printflike__(1, 2);
  140. /*PRINTFLIKE2*/
  141. extern    int    errmsgno __PR((int, const char *, ...)) __printflike__(2, 3);
  142. #ifdef    FOUND_SIZE_T
  143. /*PRINTFLIKE3*/
  144. extern    int    serrmsg __PR((char *, size_t, const char *, ...)) __printflike__(3, 4);
  145. /*PRINTFLIKE4*/
  146. extern    int    serrmsgno __PR((int, char *, size_t, const char *, ...)) __printflike__(4, 5);
  147. #endif
  148. extern    void    comexit    __PR((int));
  149. extern    char    *errmsgstr __PR((int));
  150. /*PRINTFLIKE1*/
  151. extern    int    error __PR((const char *, ...)) __printflike__(1, 2);
  152. extern    char    *fillbytes __PR((void *, int, char));
  153. extern    char    *findbytes __PR((const void *, int, char));
  154. extern    int    findline __PR((const char *, char, const char *,
  155.                             int, char **, int));
  156. extern    int    getline __PR((char *, int));
  157. extern    int    getstr __PR((char *, int));
  158. extern    int    breakline __PR((char *, char, char **, int));
  159. extern    int    getallargs __PR((int *, char * const**, const char *, ...));
  160. extern    int    getargs __PR((int *, char * const**, const char *, ...));
  161. extern    int    getfiles __PR((int *, char * const**, const char *));
  162. extern    char    *astoi __PR((const char *, int *));
  163. extern    char    *astol __PR((const char *, long *));
  164. #ifdef    _UTYPES_H
  165. extern    char    *astoll __PR((const char *, Llong *));
  166. #endif
  167.  
  168. /*extern    void    handlecond __PR((const char *, SIGBLK *, int(*)(const char *, long, long), long));*/
  169. extern    void    unhandlecond __PR((void));
  170.  
  171. extern    int        patcompile __PR((const unsigned char *, int, int *));
  172. extern    unsigned char    *patmatch __PR((const unsigned char *, const int *,
  173.                     const unsigned char *, int, int, int, int[]));
  174. extern    unsigned char    *patlmatch __PR((const unsigned char *, const int *,
  175.                     const unsigned char *, int, int, int, int[]));
  176.  
  177. extern    int    printf __PR((const char *, ...)) __printflike__(1, 2);
  178. extern    char    *movebytes __PR((const void *, void *, int));
  179.  
  180. extern    void    save_args __PR((int, char**));
  181. extern    int    saved_ac __PR((void));
  182. extern    char    **saved_av __PR((void));
  183. extern    char    *saved_av0 __PR((void));
  184. #ifndef    seterrno
  185. extern    int    seterrno __PR((int));
  186. #endif
  187. extern    void    set_progname __PR((const char *));
  188. extern    char    *get_progname __PR((void));
  189.  
  190. extern    void    setfp __PR((void * const *));
  191. extern    int    wait_chld __PR((int));
  192. extern    int    geterrno __PR((void));
  193. extern    void    raisecond __PR((const char *, long));
  194. #ifdef    FOUND_SIZE_T
  195. /*
  196.  * We currently cannot define this here because there IXIX has a definition
  197.  * than violates the standard.
  198.  */
  199. #ifndef    HAVE_SNPRINTF
  200. /*PRINTFLIKE3*/
  201. extern    int    snprintf __PR((char *, size_t, const char *, ...)) __printflike__(3, 4);
  202. #endif
  203. #endif
  204. /*extern    int    sprintf __PR((char *, const char *, ...)); ist woanders falsch deklariert !!!*/
  205. extern    char    *strcatl __PR((char *, ...));
  206. extern    int    streql __PR((const char *, const char *));
  207. #ifdef    va_arg
  208. extern    int    format __PR((void (*)(char, long), long, const char *, va_list));
  209. #else
  210. extern    int    format __PR((void (*)(char, long), long, const char *, void *));
  211. #endif
  212.  
  213. extern    int    ftoes __PR((char *, double, int, int));
  214. extern    int    ftofs __PR((char *, double, int, int));
  215.  
  216. #ifdef    EOF    /* stdio.h has been included */
  217. /*PRINTFLIKE2*/
  218. extern    int    js_fprintf    __PR((FILE *, const char *, ...)) __printflike__(2, 3);
  219. /*PRINTFLIKE1*/
  220. extern    int    js_printf    __PR((const char *, ...)) __printflike__(1, 2);
  221. #ifdef    FOUND_SIZE_T
  222. /*PRINTFLIKE3*/
  223. extern    int    js_snprintf    __PR((char *, size_t, const char *, ...)) __printflike__(3, 4);
  224. #endif
  225. /*PRINTFLIKE2*/
  226. extern    int    js_sprintf    __PR((char *, const char *, ...)) __printflike__(2, 3);
  227. #endif    /* EOF */
  228.  
  229. extern    void    swabbytes __PR((void *, int));
  230. extern    char    *getav0 __PR((void));
  231. extern    char    **getavp __PR((void));
  232. extern    void    **getfp __PR((void));
  233. extern    int    flush_reg_windows __PR((int));
  234. extern    int    cmpbytes __PR((const void *, const void *, int));
  235.  
  236. #ifdef    nonono
  237. #if    defined(HAVE_LARGEFILES)
  238. /*
  239.  * To allow this, we need to figure out how to do autoconfiguration for off64_t
  240.  */
  241. extern    FILE    *_fcons64    __PR((FILE *, int, int));
  242. extern    FILE    *fdup64        __PR((FILE *));
  243. extern    FILE    *fileluopen64    __PR((int, const char *));
  244. extern    FILE    *fileopen64    __PR((const char *, const char *));
  245. #ifdef    FOUND_OFF_T
  246. extern    off64_t    filepos64    __PR((FILE *));
  247. #endif
  248. extern    FILE    *filereopen64    __PR((const char *, const char *, FILE *));
  249. #ifdef    FOUND_OFF_T
  250. extern    int    fileseek64    __PR((FILE *, off64_t));
  251. extern    off64_t    filesize64    __PR((FILE *));
  252. #endif
  253. #ifdef    S_IFMT
  254. extern    int    filestat64    __PR((FILE *, struct stat *));
  255. #endif
  256. extern    int    _openfd64    __PR((const char *, int));
  257. #endif
  258. #endif
  259.  
  260. #ifdef    __cplusplus
  261. }
  262. #endif
  263.  
  264. #if defined(_JOS) || defined(JOS)
  265. #    include <jos_io.h>
  266. #endif
  267.  
  268. #endif    /* _SCHILY_H */
  269.