HP3000-L Archives

February 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Larry Boyd <[log in to unmask]>
Reply To:
Date:
Wed, 17 Feb 1999 10:49:38 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (62 lines)
Ted Ashton wrote:
> <whine>
> All I'm trying to do is:
>   1) Open a file
>   2) Use FFILEINFO to find out what it's POSIX name is
>   3) Move it out of the way with FRENAME
>   4) Create a new file with the original name
>
> Things were going smoothly.  I HPFOpened the file, did the
> FFILEINFO call and
> got the name into a character array.  The rename worked
> beautifully.  I
> appended a semi-colon to the POSIX name in the character array (as a
> terminating character--see HPFOPEN documentation) and called
> HPFOPEN.  A bunch
> of debugging down the road, I discover that
>
> HPFOPEN IS USING THE INITIAL '/' WHICH SUPPOSEDLY SIGNALED
> THAT THIS PATH WAS
> IN HFS FORMAT AS THE FIRST OF THE "MATCHED STARTING AND
> ENDING NAME DELIMITERS"
>
> and so for the file /SYS/ASHTED/TI, it thinks the filename is
> "SYS"!  And no,
> using option 41 to specify that this thing is POSIX doesn't
> help at all, any.

Okay, maybe I'm missing something in your email, Ted.  The HPFOPEN
requires a starting and ending character for the name.  In your original
HPFOPEN, you apparently met this requirement, since the correct file was
opened.  In the second HPFOPEN, it doesn't appear that the ";" was
placed in the first character - only the last.  Therefore, when HPFOPEN
saw /SYS/ASHTED/TI; it properly started with the first "/" and ended
with the second "/", deciding the name was SYS.  With ;/SYS/ASHTED/TI;
it should work as you would like.

> So fine, I give up on that and strmove the name to a Pascal
> string and switch
> the HPFOPEN call to use option 51 which takes a Pascal string
> and doesn't
> require delimiters of any kind.  Now I'm getting
>
> The PASCAL XL STRING OPTION (item# 51) is not valid, or a
> bounds violation
> occurred on this option.  (FILE OPEN ERROR -455)

Unfortunately, I can't help you with this one.  Seems like it should
work, but I'm not knowledgeable about PASCAL.

> It's almost 2am and I'm going home.  Tomorrow I'll put in the
> ugly code to hand
> it a pac delimited with "&"s or some such.  But as far as I'm
> concerned, that
> first behavior is ridiculous and the second bizarre.

Ah!! 2am - BTDT and have made several minor sins of omission at this
time of the morning with a deadline pending.  Typically, after a few
hours of sleep I can look back at the code and see my omission
immediately.  Hopefully, you'll have the same good luck today.

lb

ATOM RSS1 RSS2