Subversion Repositories SvarDOS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37 mv_fox 1
/* Functions that emulate UNIX catgets, some small DOS file functions */
2
 
3
/* Copyright (C) 1999,2000 Jim Hall <jhall@freedos.org> */
4
/* Kitten version by Tom Ehlert, heavily modified by Eric Auer 2003 */
5
 
6
/*
7
  This library is free software; you can redistribute it and/or
8
  modify it under the terms of the GNU Lesser General Public
9
  License as published by the Free Software Foundation; either
10
  version 2.1 of the License, or (at your option) any later version.
11
 
12
  This library is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
  Lesser General Public License for more details.
16
 
17
  You should have received a copy of the GNU Lesser General Public
18
  License along with this library; if not, write to the Free Software
19
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
*/
21
 
22
 
23
#ifndef _CATGETS_H
24
#define _CATGETS_H
25
 
26
#ifdef __cplusplus
27
extern "C"
28
{
29
#endif
30
 
31
#ifdef NO_KITTEN
32
 
33
#define kittengets(x,y,z) (z)
34
#define kittenclose()
35
#define kittenopen(a)
36
 
37
#else
38
 
39
/* Data types */
40
 
41
#define nl_catd int
42
 
43
/* Functions */
44
 
45
#define catgets(catalog, set,message_number,message) kittengets(set,message_number,message)
46
#define catopen(name,flag) kittenopen(name)
47
#define catclose(catalog)  kittenclose()
48
 
49
 
50
  char *kittengets (int set_number, int message_number, char *message);
51
  nl_catd kittenopen (char *name);
52
  void kittenclose (void);
53
 
54
  int get_line (int file, char *buffer, int size);
55
 
56
#ifndef _MICROC_
57
#ifndef __DJGPP__
58
 
59
  int dos_open (char *filename, int mode);
60
#define open(filename,mode) dos_open(filename,mode)
61
 
62
  int dos_read (int file, void *ptr, unsigned count);
63
#define read(file, ptr, count) dos_read(file,ptr,count)
64
 
65
  int dos_write (int file, void *ptr, unsigned count);
66
#define write(file, ptr, count) dos_write(file,ptr,count)
67
 
68
  void dos_close (int file);
69
#define close(file) dos_close(file)
70
 
71
#endif  /*DJGPP*/
72
#endif				/*Micro-C */
73
#endif				/*NO_KITTEN */
74
#ifdef __cplusplus
75
}
76
#endif
77
 
78
#endif				/* _CATGETS_H */