-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathline.h
46 lines (38 loc) · 1.95 KB
/
line.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
/*********************************************************
* From C PROGRAMMING: A MODERN APPROACH, Second Edition *
* By K. N. King *
* Copyright (c) 2008, 1996 W. W. Norton & Company, Inc. *
* All rights reserved. *
* This program may be freely distributed for class use, *
* provided that this copyright notice is retained. *
*********************************************************/
/* line.h (Chapter 15, page 362) */
#ifndef LINE_H
#define LINE_H
/**********************************************************
* clear_line: Clears the current line. *
**********************************************************/
void clear_line(void);
/**********************************************************
* add_word: Adds word to the end of the current line. *
* If this is not the first word on the line, *
* puts one space before word. *
**********************************************************/
void add_word(const char *word);
/**********************************************************
* space_remaining: Returns the number of characters left *
* in the current line. *
**********************************************************/
int space_remaining(void);
/**********************************************************
* write_line: Writes the current line with *
* justification. *
**********************************************************/
void write_line(void);
/**********************************************************
* flush_line: Writes the current line without *
* justification. If the line is empty, does *
* nothing. *
**********************************************************/
void flush_line(void);
#endif