/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 #include "rdesktop.h"
2
3 FILE *printer_fp;
4
5 static NTSTATUS
6 printer_create(HANDLE * handle)
7 {
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 printer_write(HANDLE handle, uint8 * data, uint32 length, uint32 * result)
22 {
23 *result = fwrite(data, 1, length, printer_fp);
24 return STATUS_SUCCESS;
25 }
26
27 DEVICE_FNS printer_fns = {
28 printer_create,
29 printer_close,
30 NULL, /* read */
31 printer_write,
32 NULL /* device_control */
33 };

  ViewVC Help
Powered by ViewVC 1.1.26