forked from liuhaotian/tsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio.h
116 lines (100 loc) · 4.07 KB
/
io.h
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
/***************************************************************************
* Title: Input/Output
* -------------------------------------------------------------------------
* Purpose: Handles the input and output
* Author: Stefan Birrer
* Version: $Revision: 1.2 $
* Last Modification: $Date: 2009/10/11 04:45:50 $
* File: $RCSfile: io.h,v $
* Copyright: (C) 2002 by Stefan Birrer
***************************************************************************/
/***************************************************************************
* ChangeLog:
* -------------------------------------------------------------------------
* $Log: io.h,v $
* Revision 1.2 2009/10/11 04:45:50 npb853
* Changing the identation of the project to be GNU.
*
* Revision 1.1 2005/10/13 05:24:59 sbirrer
* - added the skeleton files
*
* Revision 1.3 2002/10/24 21:32:47 sempi
* final release
*
* Revision 1.2 2002/10/23 21:54:27 sempi
* beta release
*
* Revision 1.1 2002/10/15 20:20:56 sempi
* Milestone 1
*
***************************************************************************/
#ifndef __IO_H__
#define __IO_H__
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/************System include***********************************************/
/************Private include**********************************************/
/************Defines and Typedefs*****************************************/
/* #defines and typedefs should have their names in all caps.
* Global variables begin with g. Global constants with k. Local
* variables should be in all lower case. When initializing
* structures and arrays, line everything up in neat columns.
*/
#undef EXTERN
#ifdef __IO_IMPL__
#define EXTERN
#else
#define EXTERN extern
#endif
/************Global Variables*********************************************/
/************Function Prototypes******************************************/
/***********************************************************************
* Title: Print a message
* ---------------------------------------------------------------------
* Purpose: Prints a message to standard output.
* Input: a string
* Output: void
***********************************************************************/
EXTERN void
Print(char*);
/***********************************************************************
* Title: Print a newline
* ---------------------------------------------------------------------
* Purpose: Prints a newline character to standard output.
* Input: void
* Output: void
***********************************************************************/
EXTERN void
PrintNewline();
/***********************************************************************
* Title: Print a error message
* ---------------------------------------------------------------------
* Purpose: Prints a error message according to perror.
* Input: a message
* Output: void
***********************************************************************/
EXTERN void
PrintPError(char*);
/***********************************************************************
* Title: Checks whether input is read from stdin
* ---------------------------------------------------------------------
* Purpose: Checks whether th input is actually read from stdin.
* Input: void
* Output: true if reading
***********************************************************************/
EXTERN bool
IsReading();
/***********************************************************************
* Title: Read one command line from stdin
* ---------------------------------------------------------------------
* Purpose: Reads one command line from stdin and returns it to the
* callee.
* Input: pointer to the buffer (will be resized as necessary) & size
* Output: void
***********************************************************************/
EXTERN void
getCommandLine(char**, int);
/************External Declaration*****************************************/
/**************Definition***************************************************/
#endif /* __IO_H__ */