File: io.texi

package info (click to toggle)
gcl27 2.7.1-13
  • links: PTS
  • area: main
  • in suites: sid
  • size: 30,888 kB
  • sloc: lisp: 211,946; ansic: 52,944; sh: 9,347; makefile: 647; tcl: 53; awk: 52
file content (1008 lines) | stat: -rwxr-xr-x 23,832 bytes parent folder | download | duplicates (18)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
@node Streams and Reading, Special Forms and Functions, Lists, Top
@chapter Streams and Reading

@defun MAKE-ECHO-STREAM (input-stream output-stream)
Package:LISP

Returns a bidirectional stream which gets its input from INPUT-STREAM and
sends its output to OUTPUT-STREAM.  In addition, all input is echoed to
OUTPUT-STREAM.


@end defun

@defvar *READTABLE* 
Package:LISP
The current readtable.


@end defvar

@defun LOAD (filename &key (verbose *load-verbose*) (print nil) (if-does-not-exist :error))
Package:LISP

Loads the file named by FILENAME into GCL.


@end defun

@defun OPEN (filename &key (direction :input) (element-type 'string-char) (if-exists :error) (if-does-not-exist :error))
Package:LISP

Opens the file specified by FILENAME, which may be a string, a pathname,
or a stream.  Returns a stream for the open file.
DIRECTION is  :INPUT, :OUTPUT, :IO or :PROBE.
ELEMENT-TYPE is  STRING-CHAR, (UNSIGNED-BYTE n),
UNSIGNED-BYTE, (SIGNED-BYTE n), SIGNED-BYTE, CHARACTER, BIT, (MOD n), or
:DEFAULT.
IF-EXISTS is :ERROR, :NEW-VERSION, :RENAME,
:RENAME-AND-DELETE, :OVERWRITE, :APPEND, :SUPERSEDE, or NIL.
IF-DOES-NOT-EXIST is  :ERROR, :CREATE, or NIL.

If FILENAME begins with a vertical pipe sign: '|'  then the resulting
stream is actually a one way pipe.   It will be open for reading
or writing depending on the direction given.   The rest
of FILENAME in this case is passed to the /bin/sh command.   See
the posix description of popen for more details.
@example
(setq pipe (open "| wc < /tmp/jim"))
(format t "File has ~%d lines" (read pipe))
(close pipe)
@end example

@end defun

@defvar *PRINT-BASE* 
Package:LISP
The radix in which the GCL printer prints integers and rationals.
The value must be an integer from 2 to 36, inclusive.


@end defvar

@defun MAKE-STRING-INPUT-STREAM (string &optional (start 0) (end (length string)))
Package:LISP

Returns an input stream which will supply the characters of String between
Start and End in order.


@end defun

@defun PPRINT (object &optional (stream *standard-output*))
Package:LISP

Pretty-prints OBJECT.  Returns OBJECT.  Equivalent to
	(WRITE :STREAM STREAM :PRETTY T)
The SI:PRETTY-PRINT-FORMAT property N (which must be a non-negative integer)
of a symbol SYMBOL controls the pretty-printing of form
	(SYMBOL f1 ... fN fN+1 ... fM)
in such a way that the subforms fN+1, ..., fM are regarded as the 'body' of
the entire form.  For instance, the property value of 2 is initially given
to the symbol DO.


@end defun

@defvar *READ-DEFAULT-FLOAT-FORMAT* 
Package:LISP
The floating-point format the GCL reader uses when reading floating-point
numbers that have no exponent marker or have e or E for an exponent marker.
Must be one of SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT, and LONG-FLOAT.


@end defvar

@defun READ-PRESERVING-WHITESPACE (&optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))
Package:LISP

Reads an object from STREAM, preserving the whitespace that followed the
object.


@end defun

@defun STREAMP (x)
Package:LISP

Returns T if X is a stream object; NIL otherwise.


@end defun


@defun SET-DISPATCH-MACRO-CHARACTER (disp-char sub-char function &optional (readtable *readtable*))
Package:LISP

Causes FUNCTION to be called when the DISP-CHAR followed by SUB-CHAR is
read.


@end defun

@deffn {Macro} WITH-OUTPUT-TO-STRING 
Package:LISP

Syntax:
@example
(with-output-to-string (var [string]) @{decl@}* @{form@}*)
@end example

Binds VAR to a string output stream that puts characters into STRING, which
defaults to a new string.  The stream is automatically closed on exit and
the string is returned.


@end deffn

@defun FILE-LENGTH (file-stream)
Package:LISP

Returns the length of the specified file stream.


@end defun

@defvar *PRINT-CASE* 
Package:LISP
The case in which the GCL printer should print ordinary symbols.
The value must be one of the keywords :UPCASE, :DOWNCASE, and :CAPITALIZE.


@end defvar

@defun PRINT (object &optional (stream *standard-output*))
Package:LISP

Outputs a newline character, and then prints OBJECT in the mostly readable
representation.  Returns OBJECT.  Equivalent to
	(PROGN (TERPRI STREAM) (WRITE OBJECT :STREAM STREAM :ESCAPE T)).


@end defun

@defun SET-MACRO-CHARACTER (char function &optional (non-terminating-p nil) (readtable *readtable*))
Package:LISP

Causes CHAR to be a macro character that, when seen by READ, causes FUNCTION
to be called.


@end defun

@defun FORCE-OUTPUT (&optional (stream *standard-output*))
Package:LISP

Attempts to force any buffered output to be sent.


@end defun

@defvar *PRINT-ARRAY* 
Package:LISP
Whether the GCL printer should print array elements.


@end defvar

@defun STREAM-ELEMENT-TYPE (stream)
Package:LISP

Returns a type specifier for the kind of object returned by STREAM.


@end defun

@defun WRITE-BYTE (integer stream)
Package:LISP

Outputs INTEGER to the binary stream STREAM.  Returns INTEGER.


@end defun

@defun MAKE-CONCATENATED-STREAM (&rest streams)
Package:LISP

Returns a stream which takes its input from each of the STREAMs in turn,
going on to the next at end of stream.


@end defun

@defun PRIN1 (object &optional (stream *standard-output*))
Package:LISP

Prints OBJECT in the mostly readable representation.  Returns OBJECT.
Equivalent to (WRITE OBJECT :STREAM STREAM :ESCAPE T).


@end defun

@defun PRINC (object &optional (stream *standard-output*))
Package:LISP

Prints OBJECT without escape characters.  Returns OBJECT.  Equivalent to
	(WRITE OBJECT :STREAM STREAM :ESCAPE NIL).


@end defun

@defun CLEAR-OUTPUT (&optional (stream *standard-output*))
Package:LISP

Clears the output stream STREAM.


@end defun

@defun TERPRI (&optional (stream *standard-output*))
Package:LISP

Outputs a newline character.


@end defun

@defun FINISH-OUTPUT (&optional (stream *standard-output*))
Package:LISP

Attempts to ensure that all output sent to STREAM has reached its destination,
and only then returns.


@end defun

@deffn {Macro} WITH-OPEN-FILE 
Package:LISP

Syntax:
@example
(with-open-file (stream filename @{options@}*) @{decl@}* @{form@}*)
@end example

Opens the file whose name is FILENAME, using OPTIONs, and binds the variable
STREAM to a stream to/from the file.  Then evaluates FORMs as a PROGN.
The file is automatically closed on exit.


@end deffn

@deffn {Special Form} DO 
Package:LISP

Syntax:
@example
(do (@{(var [init [step]])@}*) (endtest @{result@}*)
          @{decl@}* @{tag | statement@}*)
@end example

Creates a NIL block, binds each VAR to the value of the corresponding INIT,
and then executes STATEMENTs repeatedly until ENDTEST is satisfied.  After
each iteration, assigns to each VAR the value of the corresponding STEP.  When
ENDTEST is satisfied, evaluates RESULTs as a PROGN and returns the value(s) of
the last RESULT (or NIL if no RESULTs are supplied).  Performs variable
bindings and assignments all at once, just like LET and PSETQ do.


@end deffn

@defun READ-FROM-STRING (string &optional (eof-error-p t) (eof-value nil) &key (start 0) (end (length string)) (preserve-whitespace nil))
Package:LISP

Reads an object from STRING.


@end defun

@defun WRITE-STRING (string &optional (stream *standard-output*) &key (start 0) (end (length string)))
Package:LISP

Outputs STRING and returns it.


@end defun

@defvar *PRINT-LEVEL* 
Package:LISP
How many levels deep the GCL printer should print.  Unlimited if NIL.


@end defvar

@defvar *PRINT-RADIX* 
Package:LISP
Whether the GCL printer should print the radix indicator when printing
integers and rationals.


@end defvar

@defun Y-OR-N-P (&optional (format-string nil) &rest args)
Package:LISP

Asks the user a question whose answer is either 'Y' or 'N'.  If FORMAT-STRING
is non-NIL, then FRESH-LINE operation is performed, a message is printed as
if FORMAT-STRING and ARGs were given to FORMAT, and then a prompt
"(Y or N)" is printed.  Otherwise, no prompt will appear.


@end defun

@defun MAKE-BROADCAST-STREAM (&rest streams)
Package:LISP

Returns an output stream which sends its output to all of the given streams.


@end defun

@defun READ-CHAR (&optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))
Package:LISP

Reads a character from STREAM.


@end defun

@defun PEEK-CHAR (&optional (peek-type nil) (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))
Package:LISP

Peeks at the next character in the input stream STREAM.


@end defun

@defun OUTPUT-STREAM-P (stream)
Package:LISP

Returns non-nil if STREAM can handle output operations; NIL otherwise.


@end defun

@defvar *QUERY-IO* 
Package:LISP
The query I/O stream.


@end defvar

@defvar *READ-BASE* 
Package:LISP
The radix that the GCL reader reads numbers in.


@end defvar

@deffn {Macro} WITH-OPEN-STREAM 
Package:LISP

Syntax:
@example
(with-open-stream (var stream) @{decl@}* @{form@}*)
@end example

Evaluates FORMs as a PROGN with VAR bound to the value of STREAM.  The stream
is automatically closed on exit.


@end deffn

@deffn {Macro} WITH-INPUT-FROM-STRING 
Package:LISP

Syntax:
@example
(with-input-from-string (var string @{keyword value@}*) @{decl@}*
@{form@}*)
@end example

Binds VAR to an input stream that returns characters from STRING and evaluates
the FORMs.  The stream is automatically closed on exit.  Allowed keywords are
:INDEX, :START, and :END.


@end deffn

@defun CLEAR-INPUT  (&optional (stream *standard-input*))
Package:LISP
 Clears the input
stream STREAM.


@end defun

@defvar *TERMINAL-IO* 
Package:LISP
The terminal I/O stream.


@end defvar

@defun LISTEN (&optional (stream *standard-input*))
Package:LISP

Returns T if a character is available on STREAM; NIL otherwise.  This function
does not correctly work in some versions of GCL because of the lack of such
mechanism in the underlying operating system.


@end defun

@defun MAKE-PATHNAME (&key (defaults (parse-namestring "" (pathname-host *default-pathname-defaults*))) (host (pathname-host defaults)) (device (pathname-device defaults)) (directory (pathname-directory defaults)) (name (pathname-name defaults)) (type (pathname-type defaults)) (version (pathname-version defaults)))
Package:LISP

Create a pathname from HOST, DEVICE, DIRECTORY, NAME, TYPE and VERSION.


@end defun

@defun PATHNAME-TYPE (pathname)
Package:LISP

Returns the type slot of PATHNAME.


@end defun

@defvar *PRINT-GENSYM* 
Package:LISP
Whether the GCL printer should prefix symbols with no home package
with "#:".


@end defvar

@defun READ-LINE (&optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))
Package:LISP

Returns a line of text read from STREAM as a string, discarding the newline
character.

Note that when using line at a time input under unix,
input forms will always be followed by a #\newline.   Thus if you
do

>(read-line)
""
nil

the empty string will be returned.  After lisp reads the (read-line)
it then invokes (read-line).  This happens before it does anything
else and so happens before the newline character immediately following
(read-line) has been read.  Thus read-line immediately encounters a
#\newline and so returns the empty string.  If there had been other
characters before the #\newline it would have been different:

>(read-line) how are you
" how are you"
nil

If you want to throw away "" input, you can do that with
the following:

(sloop::sloop while (equal (setq input (read-line)) ""))

You may also want to use character at a time input, but that
makes input editing harder.
nicolas% stty cbreak
nicolas% gcl
GCL (GNU Common Lisp)  Version(1.1.2) Mon Jan  9 12:58:22 MET 1995
Licensed under GNU Public Library License
Contains Enhancements by W. Schelter

>(let ((ifilename nil))
    (format t "~%Input file name: ")
    (setq ifilename (read-line)))
Input file name: /tmp/myfile
"/tmp/myfile"

>(bye)Bye.




@end defun

@defun WRITE-TO-STRING (object &key (escape *print-escape*) (radix *print-radix*) (base *print-base*) (circle *print-circle*) (pretty *print-pretty*) (level *print-level*) (length *print-length*) (case *print-case*) (array *print-array*) (gensym *print-gensym*))
Package:LISP

Returns as a string the printed representation of OBJECT in the specified
mode.  See the variable docs of *PRINT-...* for the mode.


@end defun

@defun PATHNAMEP (x)
Package:LISP

Returns T if X is a pathname object; NIL otherwise.


@end defun

@defun READTABLEP (x)
Package:LISP

Returns T if X is a readtable object; NIL otherwise.


@end defun

@defun READ (&optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursivep nil))
Package:LISP

Reads in the next object from STREAM.


@end defun

@defun NAMESTRING (pathname)
Package:LISP

Returns the full form of PATHNAME as a string.


@end defun

@defun UNREAD-CHAR (character &optional (stream *standard-input*))
Package:LISP

Puts CHARACTER back on the front of the input stream STREAM.


@end defun

@defun CLOSE (stream &key (abort nil))
Package:LISP

Closes STREAM.  A non-NIL value of :ABORT indicates an abnormal termination.


@end defun

@defvar *PRINT-LENGTH* 
Package:LISP
How many elements the GCL printer should print at each level of nested data
object.  Unlimited if NIL.


@end defvar

@defun SET-SYNTAX-FROM-CHAR (to-char from-char &optional (to-readtable *readtable*) (from-readtable nil))
Package:LISP

Makes the syntax of TO-CHAR in TO-READTABLE be the same as the syntax of
FROM-CHAR in FROM-READTABLE.


@end defun

@defun INPUT-STREAM-P (stream)
Package:LISP

Returns non-NIL if STREAM can handle input operations; NIL otherwise.


@end defun

@defun PATHNAME (x)
Package:LISP

Turns X into a pathname.  X may be a string, symbol, stream, or pathname.


@end defun

@defun FILE-NAMESTRING (pathname)
Package:LISP

Returns the written representation of PATHNAME as a string.


@end defun

@defun MAKE-DISPATCH-MACRO-CHARACTER (char &optional (non-terminating-p nil) (readtable *readtable*))
Package:LISP

Causes the character CHAR to be a dispatching macro character in READTABLE.


@end defun

@defvar *STANDARD-OUTPUT* 
Package:LISP
The default output stream used by the GCL printer.


@end defvar

@defun MAKE-TWO-WAY-STREAM (input-stream output-stream)
Package:LISP

Returns a bidirectional stream which gets its input from INPUT-STREAM and
sends its output to OUTPUT-STREAM.


@end defun

@defvar *PRINT-ESCAPE* 
Package:LISP
Whether the GCL printer should put escape characters whenever appropriate.


@end defvar

@defun COPY-READTABLE (&optional (from-readtable *readtable*) (to-readtable nil))
Package:LISP

Returns a copy of the readtable FROM-READTABLE.  If TO-READTABLE is non-NIL,
then copies into TO-READTABLE.  Otherwise, creates a new readtable.


@end defun

@defun DIRECTORY-NAMESTRING (pathname)
Package:LISP

Returns the directory part of PATHNAME as a string.


@end defun

@defun TRUENAME (pathname)
Package:LISP

Returns the pathname for the actual file described by PATHNAME.


@end defun

@defvar *READ-SUPPRESS* 
Package:LISP
When the value of this variable is NIL, the GCL reader operates normally.
When it is non-NIL, then the reader parses input characters but much of what
is read is not interpreted.


@end defvar

@defun GET-DISPATCH-MACRO-CHARACTER (disp-char sub-char &optional (readtable *readtable*))
Package:LISP

Returns the macro-character function for SUB-CHAR under DISP-CHAR.


@end defun

@defun PATHNAME-DEVICE (pathname)
Package:LISP

Returns the device slot of PATHNAME.


@end defun

@defun READ-CHAR-NO-HANG (&optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))
Package:LISP

Returns the next character from STREAM if one is available; NIL otherwise.


@end defun

@defun FRESH-LINE (&optional (stream *standard-output*))
Package:LISP

Outputs a newline if it is not positioned at the beginning of a line.  Returns
T if it output a newline; NIL otherwise.


@end defun

@defun WRITE-CHAR (char &optional (stream *standard-output*))
Package:LISP

Outputs CHAR and returns it.


@end defun

@defun PARSE-NAMESTRING (thing &optional host (defaults *default-pathname-defaults*) &key (start 0) (end (length thing)) (junk-allowed nil))
Package:LISP

Parses a string representation of a pathname into a pathname.  HOST
is ignored.


@end defun

@defun PATHNAME-DIRECTORY (pathname)
Package:LISP

Returns the directory slot of PATHNAME.


@end defun

@defun GET-MACRO-CHARACTER (char &optional (readtable *readtable*))
Package:LISP

Returns the function associated with CHAR and, as a second value, returns
the non-terminating-p flag.


@end defun

@defun FORMAT (destination control-string &rest arguments)
Package:LISP

Provides various facilities for formatting output.
DESTINATION controls where the result will go.  If DESTINATION is T, then
the output is sent to the standard output stream.  If it is NIL, then the
output is returned in a string as the value of the call.  Otherwise,
DESTINATION must be a stream to which the output will be sent.

CONTROL-STRING is a string to be output, possibly with embedded
formatting directives, which are flagged with the escape character
"~".  Directives generally expand into additional text to be output,
usually consuming one or more of ARGUMENTs in the process.



A few useful directives are:
@example

~A, ~nA, ~n@@A	Prints one argument as if by PRINC
~S, ~nS, ~n@@S	Prints one argument as if by PRIN1
~D, ~B, ~O, ~X	Prints one integer in decimal, binary, octal, and hexa
~%		Does TERPRI
~&		Does FRESH-LINE
@end example

where n is the minimal width of the field in which the object is printed.
~nA and ~nS put padding spaces on the right; ~n@@A and ~n@@S put on the left.

@example
~R  is for printing numbers in various formats.

  ~nR   prints arg in radix n.
  ~R    prints arg as a cardinal english number: two
  ~:R   prints arg as an ordinal english number: third
  ~@@R   prints arg as an a Roman Numeral: VII
  ~:@@R   prints arg as an old Roman Numeral: IIII

~C prints a character.
  ~:C represents non printing characters by their pretty names,eg Space
  ~@@C uses the #\ syntax to allow the reader to read it.

~F prints a floating point number arg.
  The full form is ~w,d,k,overflowchar,padcharF
  w represents the total width of the printed representation (variable if
    not present)
  d the number of fractional digits to display
    (format nil "~,2f" 10010.0314) --> "10010.03"
  k arg is multiplied by 10^k before printing it as a decimal number.
  overflowchar width w characters copies of the overflow character will
    be printed.   eg(format t "X>~5,2,,'?F<X" 100.034) --> X>?????<X
  padchar is the character to pad with
    (format t "X>~10,2,1,'?,'bF<X" 100.03417) -->X>bbb1000.34<X
  @@ makes + sign print if the arg is positive

~@@[print-if-true~]
@end example
   if arg is not nil, then it is retained as an arg for further printing,
   otherwise it is used up

@example
   (format nil "~@@[x = ~d~]~a" nil 'bil) --> "BIL"
   (format nil "~@@[x = ~d ~]~a" 8) --> "x = 8 BIL"
@end example


@end defun

@defun PATHNAME-NAME (pathname)
Package:LISP

Returns the name slot of PATHNAME.


@end defun

@defun MAKE-STRING-OUTPUT-STREAM ()
Package:LISP

Returns an output stream which will accumulate all output given it for
the benefit of the function GET-OUTPUT-STREAM-STRING.


@end defun

@defun MAKE-SYNONYM-STREAM (symbol)
Package:LISP

Returns a stream which performs its operations on the stream which is the
value of the dynamic variable named by SYMBOL.


@end defun

@defvar *LOAD-VERBOSE* 
Package:LISP
The default for the VERBOSE argument to LOAD.


@end defvar

@defvar *PRINT-CIRCLE* 
Package:LISP
Whether the GCL printer should take care of circular lists.


@end defvar

@defvar *PRINT-PRETTY* 
Package:LISP
Whether the GCL printer should pretty-print.  See the function doc of PPRINT
for more information about pretty-printing.


@end defvar

@defun FILE-WRITE-DATE (file)
Package:LISP

Returns the time at which the specified file is written, as an integer in
universal time format.  FILE may be a string or a stream.


@end defun

@defun PRIN1-TO-STRING (object)
Package:LISP

Returns as a string the printed representation of OBJECT in the mostly
readable representation.
Equivalent to (WRITE-TO-STRING OBJECT :ESCAPE T).


@end defun

@defun MERGE-PATHNAMES (pathname &optional (defaults *default-pathname-defaults*) default-version)
Package:LISP

Fills in unspecified slots of PATHNAME from DEFAULTS.  DEFAULT-VERSION
is ignored in GCL.


@end defun

@defun READ-BYTE (stream &optional (eof-error-p t) (eof-value nil))
Package:LISP

Reads the next byte from STREAM.


@end defun

@defun PRINC-TO-STRING (object)
Package:LISP

Returns as a string the printed representation of OBJECT without escape
characters.  Equivalent to
	(WRITE-TO-STRING OBJECT :ESCAPE NIL).


@end defun

@defvar *STANDARD-INPUT* 
Package:LISP
The default input stream used by the GCL reader.


@end defvar

@defun PROBE-FILE (file)
Package:LISP

Returns the truename of file if the file exists.
Returns NIL otherwise.


@end defun

@defun PATHNAME-VERSION (pathname)
Package:LISP

Returns the version slot of PATHNAME.


@end defun

@defun WRITE-LINE (string &optional (stream *standard-output*) &key (start 0) (end (length string)))
Package:LISP

Outputs STRING and then outputs a newline character.  Returns STRING.


@end defun

@defun WRITE (object &key (stream *standard-output*) (escape *print-escape*) (radix *print-radix*) (base *print-base*) (circle *print-circle*) (pretty *print-pretty*) (level *print-level*) (length *print-length*) (case *print-case*) (array *print-array*) (gensym *print-gensym*))
Package:LISP

Prints OBJECT in the specified mode.  See the variable docs of *PRINT-...*
for the mode.


@end defun

@defun GET-OUTPUT-STREAM-STRING (stream)
Package:LISP

Returns a string of all the characters sent to STREAM made by
MAKE-STRING-OUTPUT-STREAM since the last call to this function.


@end defun

@defun READ-DELIMITED-LIST (char &optional (stream *standard-input*) (recursive-p nil))
Package:LISP

Reads objects from STREAM until the next character after an object's
representation is CHAR.  Returns a list of the objects read.


@end defun

@defun READLINE-ON ()
Package:SI

Begins readline command editing mode when possible.  In addition to
the basic readline editing features, command word completion is
implemented according to the following scheme:

[[pkg]:[:]]txt

pkg -- an optional package specifier.  Defaults to the current
package.  The symbols in this package and those in the packages in
this package's use list will be searched.

:[:] -- an optional internal/external specifier.  Defaults to
external.  The keyword package is denoted by a single colon at the
beginning of the token.  Only symbols of this type will be searched
for completion.

txt -- a string.  Symbol names beginning with this string are
completed.  The comparison is case insensitive.


@end defun 

@defun READLINE-OFF ()
Package:SI

Disables readline command editing mode.

@end defun 

@defvar *READLINE-PREFIX* 
Package:SI

A string implicitly prepended to input text for use in readline
command completion.  If this string contains one or more colons, it is
used to specify the default package and internal/external setting for
searched symbols in the case that the supplied text itself contains no
explicit package specification.  If this string contains characters
after the colon(s), or contains no colons at all, it is treated as a
symbol name prefix.  In this case, the prefix is matched first, then
the supplied text, and the completion returned is relative to the
supplied text itself, i.e. contains no prefix.  For example, the
setting ``maxima::$'' will complete input text ``int'' according to
the internal symbols in the maxima package of the form
``maxima::$int...'', and return suggestions to the user of the form
``int...''.

@end defvar