Post Reply 
Four LIF text conversion questions
08-01-2014, 05:04 PM
Post: #1
Four LIF text conversion questions
Four separate questions seeking separate answers, in one thread because they are similar.

(Q1) Ordinary text files on LIF systems are hex type 0001, and are referred to as LIF1 files. Converting them to MS-DOS text is easy, e.g. with the HPDir program. But the HP-75 has its own text files of hex type E052. I can't figure out any way with just an HP-71 (no 75), PIL-Box, and 9114 disk drive, to convert those HP-75 text files to MS-DOS text files. Is it possible?

(Q2) Many LIF1 files on the Swap Disks have embedded "Text Editor" commands, such as ^CE (for Center Mode), ^MA (for setting the left and right margins), etc. Has anybody written any kind of program for converting these formatting commands into modern notation of any kind, like PostScript or TeX or whatever, so that these files could be presented for example as RTF's or PDF's with all the authors' formatting intact?

(Q3) There are many LIF1 files on the Swap Disks which contain only graphic data (100% escape codes and bitmap data), no text. These were intended to be sent directly to the ThinkJet printer, which interpreted the escape codes correctly and output the desired image. Has anybody written a program of any kind that converts these files into modern image files, e.g. PNG or BMP or whatever? I've tried a few PCL-to-PNG converters without any success.

(Q4) Similar to the previous two items, many LIF1 files on the Swap Disks contain ThinkJet-specific printer codes, such as CHR$(14) to turn on Bold Mode and CHR$(15) to turn it off again. These are neither Text Editor commands, nor standard PCL codes. Has anybody written any kind of program for converting these files to modern marked-up text?

Thanks in advance for any help you can offer! I'm converting all of the LIF1 files I can find into web-presentable form, and doing these conversions by hand is tedious.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
08-01-2014, 06:48 PM
Post: #2
RE: Four LIF text conversion questions
For Q1, my LIF utilities for Linux, available from the HPCC web site :

http://www.hpcc.org/datafile/hpil/lif_utils.html

(or ask me if you can't find them) include a program to decode HP75 text files into
plain ASCII. Although written for linux, it shouldn't be too hard to translate to another OS, and the C source should be a start.
Find all posts by this user
Quote this message in a reply
08-02-2014, 07:56 AM
Post: #3
RE: Four LIF text conversion questions
Thanks, Tony! No success yet at compiling your utilities for DOS. Has anybody ever succeeded at that? Google comes up empty.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
08-02-2014, 10:58 AM
Post: #4
RE: Four LIF text conversion questions
(08-02-2014 07:56 AM)Joe Horn Wrote:  Thanks, Tony! No success yet at compiling your utilities for DOS. Has anybody ever succeeded at that? Google comes up empty.
Joe, why do you want to target DOS instead of, say, Win32?

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
08-02-2014, 12:10 PM
Post: #5
RE: Four LIF text conversion questions
(08-02-2014 07:56 AM)Joe Horn Wrote:  Thanks, Tony! No success yet at compiling your utilities for DOS. Has anybody ever succeeded at that? Google comes up empty.

If you use the command line on Windows you should install a POSIX layer and it then should be easier to compile or port linux code.
There are several available but CygWin (http://www.cygwin.com) is the one used more often and the breath of packages available for it is impressive.
Find all posts by this user
Quote this message in a reply
08-02-2014, 12:21 PM
Post: #6
RE: Four LIF text conversion questions
(08-02-2014 10:58 AM)Marcus von Cube Wrote:  
(08-02-2014 07:56 AM)Joe Horn Wrote:  Thanks, Tony! No success yet at compiling your utilities for DOS. Has anybody ever succeeded at that? Google comes up empty.
Joe, why do you want to target DOS instead of, say, Win32?

Tony's utilities are command-line (aka "terminal") programs, so compiling them for a DOS window (cmd.exe) on my 32-bit Win7 computer is my only option, I think.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
08-02-2014, 11:47 PM
Post: #7
RE: Four LIF text conversion questions
(08-01-2014 05:04 PM)Joe Horn Wrote:  (Q1) Ordinary text files on LIF systems are hex type 0001, and are referred to as LIF1 files. Converting them to MS-DOS text is easy, e.g. with the HPDir program. But the HP-75 has its own text files of hex type E052. I can't figure out any way with just an HP-71 (no 75), PIL-Box, and 9114 disk drive, to convert those HP-75 text files to MS-DOS text files. Is it possible?

If you had access to an HP-75 you could TRANSFORM those files into LIF1 format, then HPDir could convert them to DOS text.

Dave
Find all posts by this user
Quote this message in a reply
08-03-2014, 08:50 AM
Post: #8
RE: Four LIF text conversion questions
(08-02-2014 11:47 PM)Dave Frederickson Wrote:  If you had access to an HP-75 you could TRANSFORM those files into LIF1 format, then HPDir could convert them to DOS text.

Hey, Dave, that gives me an idea: It would be easy to write an HP-71 program that reads the file's data directly from the disk (using IL commands, sector by sector), reconstructs the lines (optionally discarding the line numbers) and writes it all out to an ordinary LIF1 file. Essentially an HP-75 TRANSFORM using an HP-71. Amazing that nobody's done that before (?). Ok, that's Sunday's programming challenge to myself....

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
08-03-2014, 12:49 PM
Post: #9
RE: Four LIF text conversion questions
(08-02-2014 12:21 PM)Joe Horn Wrote:  
(08-02-2014 10:58 AM)Marcus von Cube Wrote:  Joe, why do you want to target DOS instead of, say, Win32?

Tony's utilities are command-line (aka "terminal") programs, so compiling them for a DOS window (cmd.exe) on my 32-bit Win7 computer is my only option, I think.

Ah, I do understand now. People keep thinking of the Windows command line as a variant of DOS which it definitely isn't. DOS is a 16 bit single tasking environment, while the Windows command line, starting with Windows NT, offers the full Windows API. (As an aside, You can even start a GUI program from a command window, as you probably already know). The problem with porting command line utilities targeted at Unix environments is that these tend to deviate from the POSIX standard and directly call Unix specific APIs like "open" instead of "fopen" or depend on the existence of certain external utilities or file system locations. Toolboxes like CygWin fill this gap.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
08-04-2014, 03:23 AM
Post: #10
RE: Four LIF text conversion questions
A1. Well, THAT was fun! I just finished getting an HP-71 program running which converts HP-75 text files on disk (type E052) into standard text files (LIF1, type 0001). Why on earth does EVERY line of an HP-75 text file begin (after the 2-byte line number and 1-byte line length) with a space character?!? What a waste. But the program works. So Q1 is handled to my satisfaction. Now to convert all the HP-75 text files on all the swap disks so that anybody with Internet access can read them.

Q2 and Q4 (embedded formatting codes) should be easy to translate into HTML with a macro in a text editor or MS Word.

Q3 (converting ThinkJet graphics to image files) looks hopeless.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)