[prog] printing a linked-list
Sue Stones
suzo at spin.net.au
Mon Mar 15 14:17:54 EST 2004
On Mon, 15 Mar 2004 12:57 pm, ed orphan wrote:
> I've written most of a simple linked-list program
> that loads its data from a file ( if it exists ) and
> upon exit, saves its data to a file.
> It's written in C for Linux with a touch of curses.
> I want it to print the linked list out, with a space
> between each linked list's data, and a one line
> header for each page of print, e.g.
> date ddmmyyyy program name page number
> The paper is standard letter size, that is 60 lines
> per page.
> I don't want anything fancy, just that the data
> be printed correctly and clearly in plain text.
> Do I have to learn some kind of printer formatting
> language to accomplish this? I was thinking of
> creating a special file just for printing, ( print.txt )
> with the
> spaces and the page titles in the correct places,
> then doing a system call, like system("lpr print.txt");
> I haven't got a clue. Any ideas would be most
> appreciated.
I don't know anything about curses, or why you would need them. So I don't
know if that makes the following invalid. But you should have no trouble
doing this in C. You know how many lines per page you have, and that is the
only thing that would make a diference. (Do you have a VB background by any
chance).
sue
More information about the Programming
mailing list