/[rdesktop]/jpeg/rdesktop/trunk/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 /jpeg/rdesktop/trunk/printer.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 432 - (show annotations)
Tue Jul 1 09:31:25 2003 UTC (20 years, 11 months ago) by matthewc
Original Path: sourceforge.net/trunk/rdesktop/printer.c
File MIME type: text/plain
File size: 551 byte(s)
Commit of work in progress on channels (so that other people can hack on
RDPSND), in particular:
* channel layer takes care of virtual channel header
* split X dependent parts out of CLIPRDR, simplified IPC implementation
* initial RDPDR implementation

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 {
29 printer_create,
30 printer_close,
31 NULL, /* read */
32 printer_write,
33 NULL /* device_control */
34 };
35

  ViewVC Help
Powered by ViewVC 1.1.26