[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Max length direct access files



Date: Thu, 20 Jun 91 14:13+0100
From: Marie-Christine Timmermans <MC@MILOU>
Subject: Max length direct access files 
To: SLUG@AI.SRI.COM
Message-ID: <19910620131349.2.MC@MILOU>
Character-Type-Mappings: (1 0 (NIL 0) (:FIX :BOLD :NORMAL) "CPTFONTCB")
Fonts: CPTFONT, CPTFONTCB
          
Does anyone know if there is a length set in advance for direct
access files ?
If so, how can we change this maximum length ?
 
For example, here is the code of the program where I have
such a problem :
 
(defun  create-file ()
  (with-open-file
    (stream
      "M:>file-pathname.text.newest"
      :direct t
      :if-exists :new-version
      :direction :output
      :estimated-length 3150
      :element-type 'string-char)
	
 
    (send stream :set-pointer 0)
    (send stream :string-out "string")
    (send stream :set-pointer 1136)
    (send stream :string-out "other-string")
    ))
 
When I try to execute this function, I receive the error message : 
 
"
1Error: File position 1136 not in file (length = 6)
0       1For M:>file-pathname.text.1
0While in the function (FLAVOR:METHOD :REAL-SET-POINTER LMFS:LMFS-OPENING-MIXIN)  (FLAVOR:METHO
D :SET-BUFFER-POINTER LMFS:LMFS-OPENING-MIXIN)  (FLAVOR:METHOD :SET-POINTER SI:OUTPUT-POINTER-
REMEMBERING-MIXIN)
 
1(FLAVOR:METHOD :REAL-SET-POINTER LMFS:LMFS-OPENING-MIXIN)
0   Arg 0 (SELF): #<LMFS:LMFS-DIRECT-ACCESS-CHAR-OUTPUT-OPENING "M:>file-pathname.text.newest" 4
6166572>
   Arg 1 (SYS:SELF-MAPPING-TABLE): #<Map to flavor LMFS:LMFS-OPENING-MIXIN 444151524>
   Arg 2 (FLAVOR::.GENERIC.): :REAL-SET-POINTER
   Arg 3 (LMFS:VAL): 1136
s-A, :    Return to Breakpoint ZMACS in Editor Typeout Window 9
s-B:           Editor Top Level
s-C:           Restart process Zmacs Windows 2

"
 
If for the last form of the type
"(send stream :set-pointer pointer-position)", the value of
pointer-position is greater or equal to 1136, I have this error message.
 
Is it a consequence of a predefined maximum length for direct access
files or is there another problem ?  
 
Notice that there is also a problem if for the first
"(send stream :set-pointer pointer-position)", the value of
pointer-position is not equal to 0.
In such a case, we have the following error message :
 
1Error: File position 0pointer-position1 not in file (length = 0)
0       1For M:>file-pathname.text.1
0While in the function (FLAVOR:METHOD :REAL-SET-POINTER LMFS:LMFS-OPENING-MIXIN)  (FLAVOR:METHO
D :SET-BUFFER-POINTER LMFS:LMFS-OPENING-MIXIN)  (FLAVOR:METHOD :SET-POINTER SI:OUTPUT-POINTER-
REMEMBERING-MIXIN)
 
1(FLAVOR:METHOD :REAL-SET-POINTER LMFS:LMFS-OPENING-MIXIN)
0   Arg 0 (SELF): #<LMFS:LMFS-DIRECT-ACCESS-CHAR-OUTPUT-OPENING "M:>file-pathname.text.newest" 4
5373277>
   Arg 1 (SYS:SELF-MAPPING-TABLE): #<Map to flavor LMFS:LMFS-OPENING-MIXIN 444151524>
   Arg 2 (FLAVOR::.GENERIC.): :REAL-SET-POINTER
   Arg 3 (LMFS:VAL): pointer-position
s-A, :    Return to Breakpoint ZMACS in Editor Typeout Window 9
s-B:           Editor Top Level
s-C:           Restart process Zmacs Windows 2

 
Has anyone ever had such a problem?
 
Thank you in advance.
 
 
Marie-Christine Timmermans.