public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Stdprn in GCC
@ 2002-10-22 14:41 David
  2002-10-22 15:06 ` John Carter
  2002-10-22 15:08 ` bjorn rohde jensen
  0 siblings, 2 replies; 5+ messages in thread
From: David @ 2002-10-22 14:41 UTC (permalink / raw)
  To: gcc-help

Hello,

    Starting to learn C Programming all over again in Linux this time.

The problem is that most books are for Windows/Dos also.

'stdprn'   is not contained in stdio.h in GCC.

Is it in another library, is there an equivilant library function to use?

If not, how do you send a file to the printer with GCC?

This is stumping me and found no help on Google.

Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Stdprn in GCC
@ 2002-10-22 16:13 David
  2002-10-23 13:35 ` John Carter
  0 siblings, 1 reply; 5+ messages in thread
From: David @ 2002-10-22 16:13 UTC (permalink / raw)
  To: gcc-help; +Cc: John Carter



John Carter wrote:

>If you want it to come out (directly) /dev/lp0 (the line printer port) 
>just open that and fire away.
>
>Either that stuff it in a file and invoke "lpr fileName" at a later stage.
>
>You can also pipe either stdout to "lpr" or fork and pipe to lpr.
>
>A good reference source if the Linux Documentation Project (ask google) 
>and in particular the Linux Programmers Guide.
>  
>
>  
>
I searched google and haven't came up with anything yet, tried putting /dev/lp0
in there and piping it to lpr. Just get errors about it.


> page = 0;     line = 1;     do_heading( argc[1] );     while( fgets( 
> buffer, 256, fp ) != NULL )     {         if( line % 55 == 0 )        
>      do_heading( argc[1] );         fprintf( stdprn, "%4d:\t%s", 
> line++, buffer );     }     fprintf( stdprn, "\f" );     fclose(fp); 
>     return 0; } /* Start function */ void do_heading( char *filename ) 
> {     page++;     if( page > 1)         fprintf( stdprn, "\f");    
>  fprintf( stdprn, "Page: %d, %s\n\n", page, filename ); }




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-23 20:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22 14:41 Stdprn in GCC David
2002-10-22 15:06 ` John Carter
2002-10-22 15:08 ` bjorn rohde jensen
2002-10-22 16:13 David
2002-10-23 13:35 ` John Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).