source: trunk/minix/commands/yap/getline.h@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.5 KB
RevLine 
[9]1/* Copyright (c) 1985 Ceriel J.H. Jacobs */
2
3/* $Header: /cvsup/minix/src/commands/yap/getline.h,v 1.1.1.1 2005/04/21 14:55:39 beng Exp $ */
4
5# ifndef _GETLINE_
6# define PUBLIC extern
7# else
8# define PUBLIC
9# endif
10
11char * getline();
12/*
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
16 *
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".
21 */
22
23char * alloc();
24/*
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
29 *
30 * Return a pointer to a block of "size" bytes.
31 * Panics if no core can be found.
32 */
33
34VOID do_clean();
35/*
36 * void do_clean()
37 *
38 * Cleans up and initializes.
39 */
40
41VOID cls_files();
42/*
43 * void cls_files()
44 *
45 * Closes files. Useful for shell escapes.
46 */
47
48int getch();
49/*
50 * int getch()
51 *
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.
55 */
56
57long to_lastline();
58/*
59 * long to_lastline()
60 *
61 * Finds the last line of the file, and returns its number.
62 * This command can be interrupted, in which case it returns 0.
63 */
64
65long getpos();
66/*
67 * long getpos(line);
68 *
69 * get offset of line "line" in the input
70 */
71# undef PUBLIC
Note: See TracBrowser for help on using the repository browser.