15dfecf96Smrg/*
25dfecf96Smrg * Copyright (c) 2001 by The XFree86 Project, Inc.
35dfecf96Smrg *
45dfecf96Smrg * Permission is hereby granted, free of charge, to any person obtaining a
55dfecf96Smrg * copy of this software and associated documentation files (the "Software"),
65dfecf96Smrg * to deal in the Software without restriction, including without limitation
75dfecf96Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
85dfecf96Smrg * and/or sell copies of the Software, and to permit persons to whom the
95dfecf96Smrg * Software is furnished to do so, subject to the following conditions:
105dfecf96Smrg *
115dfecf96Smrg * The above copyright notice and this permission notice shall be included in
125dfecf96Smrg * all copies or substantial portions of the Software.
135dfecf96Smrg *
145dfecf96Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
155dfecf96Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
165dfecf96Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
175dfecf96Smrg * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
185dfecf96Smrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
195dfecf96Smrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
205dfecf96Smrg * SOFTWARE.
215dfecf96Smrg *
225dfecf96Smrg * Except as contained in this notice, the name of the XFree86 Project shall
235dfecf96Smrg * not be used in advertising or otherwise to promote the sale, use or other
245dfecf96Smrg * dealings in this Software without prior written authorization from the
255dfecf96Smrg * XFree86 Project.
265dfecf96Smrg *
275dfecf96Smrg * Author: Paulo César Pereira de Andrade
285dfecf96Smrg */
295dfecf96Smrg
305dfecf96Smrg/* $XFree86: xc/programs/xedit/lisp/helper.h,v 1.15tsi Exp $ */
315dfecf96Smrg
325dfecf96Smrg#ifndef Lisp_helper_h
335dfecf96Smrg#define Lisp_helper_h
345dfecf96Smrg
355dfecf96Smrg#include "lisp/private.h"
365dfecf96Smrg
375dfecf96Smrg/*
385dfecf96Smrg * Prototypes
395dfecf96Smrg */
405dfecf96Smrgvoid LispCheckSequenceStartEnd(LispBuiltin*, LispObj*,
415dfecf96Smrg			       LispObj*, LispObj*, long*, long*, long*);
425dfecf96Smrglong LispLength(LispObj*);
435dfecf96SmrgLispObj *LispCharacterCoerce(LispBuiltin*, LispObj*);
445dfecf96SmrgLispObj *LispStringCoerce(LispBuiltin*, LispObj*);
455dfecf96SmrgLispObj *LispCoerce(LispBuiltin*, LispObj*, LispObj*);
465dfecf96Smrg
475dfecf96Smrg/*
485dfecf96Smrg do init test &rest body
495dfecf96Smrg do* init test &rest body
505dfecf96Smrg */
515dfecf96SmrgLispObj *LispDo(LispBuiltin*, int);
525dfecf96Smrg
535dfecf96Smrg/*
545dfecf96Smrg dolist init &rest body
555dfecf96Smrg dotimes init &rest body
565dfecf96Smrg */
575dfecf96SmrgLispObj *LispDoListTimes(LispBuiltin*, int);
585dfecf96Smrg
595dfecf96Smrg#define FEQ	1
605dfecf96Smrg#define FEQL	2
615dfecf96Smrg#define FEQUAL	3
625dfecf96Smrg#define FEQUALP	4
635dfecf96SmrgLispObj *LispObjectCompare(LispObj*, LispObj*, int);
645dfecf96Smrg#define XEQ(x, y)	LispObjectCompare(x, y, FEQ)
655dfecf96Smrg#define XEQL(x, y)	LispObjectCompare(x, y, FEQL)
665dfecf96Smrg#define XEQUAL(x, y)	LispObjectCompare(x, y, FEQUAL)
675dfecf96Smrg#define XEQUALP(x, y)	LispObjectCompare(x, y, FEQUALP)
685dfecf96Smrg
695dfecf96SmrgLispObj *LispLoadFile(LispObj*, int, int, int);
705dfecf96Smrg
715dfecf96Smrg/*
725dfecf96Smrg string= string1 string2 &key start1 end1 start2 end2
735dfecf96Smrg string< string1 string2 &key start1 end1 start2 end2
745dfecf96Smrg string> string1 string2 &key start1 end1 start2 end2
755dfecf96Smrg string<= string1 string2 &key start1 end1 start2 end2
765dfecf96Smrg string>= string1 string2 &key start1 end1 start2 end2
775dfecf96Smrg string/= string1 string2 &key start1 end1 start2 end2
785dfecf96Smrg string-equal string1 string2 &key start1 end1 start2 end2
795dfecf96Smrg string-lessp string1 string2 &key start1 end1 start2 end2
805dfecf96Smrg string-greaterp string1 string2 &key start1 end1 start2 end2
815dfecf96Smrg string-not-lessp string1 string2 &key start1 end1 start2 end2
825dfecf96Smrg string-not-greaterp string1 string2 &key start1 end1 start2 end2
835dfecf96Smrg string-not-equal string1 string2 &key start1 end1 start2 end2
845dfecf96Smrg*/
855dfecf96Smrgvoid LispGetStringArgs(LispBuiltin*,
865dfecf96Smrg			char**,	/* string1 */
875dfecf96Smrg			char**,	/* string2 */
885dfecf96Smrg			long*,	/* start1 */
895dfecf96Smrg			long*,	/* end1 */
905dfecf96Smrg			long*,	/* start2 */
915dfecf96Smrg			long*);	/* end2 */
925dfecf96Smrg
935dfecf96Smrg/*
945dfecf96Smrg pathname-host pathname
955dfecf96Smrg pathname-device pathname
965dfecf96Smrg pathname-directory pathname
975dfecf96Smrg pathname-name pathname
985dfecf96Smrg pathname-type pathname
995dfecf96Smrg pathname-version pathname
1005dfecf96Smrg */
1015dfecf96SmrgLispObj *LispPathnameField(int, int);
1025dfecf96Smrg
1035dfecf96Smrg/*
1045dfecf96Smrg truename pathname
1055dfecf96Smrg probe-file pathname
1065dfecf96Smrg */
1075dfecf96SmrgLispObj *LispProbeFile(LispBuiltin*, int);
1085dfecf96Smrg
1095dfecf96Smrg/*
1105dfecf96Smrg write-string string &optional output-stream &key start end
1115dfecf96Smrg write-line string &optional output-stream &key start end
1125dfecf96Smrg */
1135dfecf96SmrgLispObj *LispWriteString_(LispBuiltin*, int);
1145dfecf96Smrg
1155dfecf96Smrg#endif	/* Lisp_helper_h */
116