/[rdesktop]/sourceforge.net/trunk/rdesktop/printer.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/printer.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 435 - (hide annotations)
Wed Jul 9 09:18:20 2003 UTC (20 years, 11 months ago) by astrand
File MIME type: text/plain
File size: 557 byte(s)
Indent fixes

1 matthewc 432 #include "rdesktop.h"
2    
3     FILE *printer_fp;
4    
5     static NTSTATUS
6 astrand 435 printer_create(HANDLE * handle)
7 matthewc 432 {
8     printer_fp = popen("lpr", "w");
9     *handle = 0;
10     return STATUS_SUCCESS;
11     }
12    
13     static NTSTATUS
14     printer_close(HANDLE handle)
15     {
16     pclose(printer_fp);
17     return STATUS_SUCCESS;
18     }
19    
20     static NTSTATUS
21 astrand 435 printer_write(HANDLE handle, uint8 * data, uint32 length, uint32 * result)
22 matthewc 432 {
23     *result = fwrite(data, 1, length, printer_fp);
24     return STATUS_SUCCESS;
25     }
26    
27 astrand 435 DEVICE_FNS printer_fns = {
28 matthewc 432 printer_create,
29     printer_close,
30 astrand 435 NULL, /* read */
31 matthewc 432 printer_write,
32 astrand 435 NULL /* device_control */
33 matthewc 432 };

  ViewVC Help
Powered by ViewVC 1.1.26