Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!ucbvax!RELAY.CS.NET!egisin%watmath.waterloo.edu From: egisin%watmath.waterloo.edu@RELAY.CS.NET (Eric Gisin) Newsgroups: mod.computers.vax Subject: Re: Converting Stream_LF files? Message-ID: <8610260459.AA20437@ucbvax.Berkeley.EDU> Date: Sat, 25-Oct-86 15:28:56 EST Article-I.D.: ucbvax.8610260459.AA20437 Posted: Sat Oct 25 15:28:56 1986 Date-Received: Sun, 26-Oct-86 07:02:22 EST References: <12249233250.11.OC.PEDHEM@CU20B.COLUMBIA.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 30 Approved: info-vax@sri-kl.arpa > Hi, > Does anyone have a program or FDL file to convert a Stream_Lf file to > a nice normal file so that commands like TYPE FOO.BAR and COPY FOO.BAR TT: > will work? Any language would be instructive. > > Thanks, > Chris Lent The only problems I've seen with stream-lf file occur when the file doesn't have a newline as the final character or when a record (delimited by newlines) is too big for the application's buffer. The first case can be checked and fixed with a simple program in C: /* the following return values should be check for errors */ f = fopen(file, "r+w"); fseek(f, -1, 2); /* seek to last byte */ if (getc(f) != '\n') { fprintf(stderr, "Appended \\n\n"); fseek(f, 0, 2); /* seek to EOF */ putc('\n', f); } fclose(f); I haven't tested the above, and seem to recall VAXC IO may have some bugs regarding "r+w" file access. Are there any other problems with stream-lf file created by C? I've used them extensively (on VMS V4). Note the message EDT gives when editing a stream-lf file is just a meaningless warning. Eric Gisin, egisin@math.waterloo.{csnet,edu}