write.h revision 5dfecf96
1/*
2 * Copyright (c) 2002 by The XFree86 Project, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17 * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
21 *
22 * Except as contained in this notice, the name of the XFree86 Project shall
23 * not be used in advertising or otherwise to promote the sale, use or other
24 * dealings in this Software without prior written authorization from the
25 * XFree86 Project.
26 *
27 * Author: Paulo César Pereira de Andrade
28 */
29
30/* $XFree86: xc/programs/xedit/lisp/write.h,v 1.9tsi Exp $ */
31
32#ifndef Lisp_write_h
33#define Lisp_write_h
34
35#include "lisp/io.h"
36
37/*
38 * Prototypes
39 */
40void LispWriteInit(void);
41
42LispObj *Lisp_FreshLine(LispBuiltin*);
43LispObj *Lisp_Prin1(LispBuiltin*);
44LispObj *Lisp_Princ(LispBuiltin*);
45LispObj *Lisp_Print(LispBuiltin*);
46LispObj *Lisp_Terpri(LispBuiltin*);
47LispObj *Lisp_Write(LispBuiltin*);
48LispObj *Lisp_WriteChar(LispBuiltin*);
49LispObj *Lisp_WriteLine(LispBuiltin*);
50LispObj *Lisp_WriteString(LispBuiltin*);
51
52int LispGetColumn(LispObj*);
53
54int LispWriteChar(LispObj*, int);
55int LispWriteChars(LispObj*, int, int);
56int LispWriteStr(LispObj*, char*, long);
57
58	/* write any lisp object to stream */
59int LispWriteObject(LispObj*, LispObj*);
60
61/* formatted output */
62	/* object must be an integer */
63int LispFormatInteger(LispObj*, LispObj*, int, int, int, int, int, int, int);
64	/* must be in range 1 to 3999 for new roman, 1 to 4999 for old roman */
65int LispFormatRomanInteger(LispObj*, long, int);
66	/* must be in range -9999999 to 9999999 */
67int LispFormatEnglishInteger(LispObj*, long, int);
68	/* object must be a character */
69int LispFormatCharacter(LispObj*, LispObj*, int, int);
70	/* object must be a float */
71int LispFormatFixedFloat(LispObj*, LispObj*, int, int, int*, int, int, int);
72	/* object must be a float */
73int LispFormatExponentialFloat(LispObj*, LispObj*,
74			       int, int, int*, int, int, int, int, int);
75	/* object must be a float */
76int LispFormatGeneralFloat(LispObj*, LispObj*, int,
77			   int, int*, int, int, int, int, int);
78int LispFormatDollarFloat(LispObj*, LispObj*, int, int, int, int, int, int);
79
80#endif /* Lisp_write_h */
81