tty: don't use custom kputc; this fixes tty printf()s.
[minix.git] / commands / yap / getline.h
blobd4aa4160374a4eece5dc7899078b79e99bd65d1b
1 /* Copyright (c) 1985 Ceriel J.H. Jacobs */
3 /* $Header$ */
5 # ifndef _GETLINE_
6 # define PUBLIC extern
7 # else
8 # define PUBLIC
9 # endif
11 char * getline();
13 * char * getline(ln,disable_interrupt)
14 * long ln; The line number of the line to be returned
15 * int disable_interrupt; 1 if interrupts must be ignored, 0 otherwise
17 * Returns a pointer to the line with linenumber "ln".
18 * It returns 0 if
19 * - there was an interrupt, and interrupts were not disabled, or
20 * - there is no line with linenumber "ln".
23 char * alloc();
25 * char * alloc(size, isblock)
26 * unsigned size; The size in bytes
27 * int isblock; Flag indicating whether this is a file-text
28 * block
30 * Return a pointer to a block of "size" bytes.
31 * Panics if no core can be found.
34 VOID do_clean();
36 * void do_clean()
38 * Cleans up and initializes.
41 VOID cls_files();
43 * void cls_files()
45 * Closes files. Useful for shell escapes.
48 int getch();
50 * int getch()
52 * Get a character from input or command option line (only at start up).
53 * Some systems allow us to do some workahead while the user is
54 * thinking/reading. Use this to get parts of the input file in core.
57 long to_lastline();
59 * long to_lastline()
61 * Finds the last line of the file, and returns its number.
62 * This command can be interrupted, in which case it returns 0.
65 long getpos();
67 * long getpos(line);
69 * get offset of line "line" in the input
71 # undef PUBLIC