~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/RDP/client/printer.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- c-basic-offset: 8 -*-
2
2
   rdesktop: A Remote Desktop Protocol client.
3
 
   Copyright (C) Matthew Chapman 1999-2007
 
3
   Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 1999-2008
4
4
 
5
 
   This program is free software; you can redistribute it and/or modify
 
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
7
 
   the Free Software Foundation; either version 2 of the License, or
 
7
   the Free Software Foundation, either version 3 of the License, or
8
8
   (at your option) any later version.
9
9
 
10
10
   This program is distributed in the hope that it will be useful,
13
13
   GNU General Public License for more details.
14
14
 
15
15
   You should have received a copy of the GNU General Public License
16
 
   along with this program; if not, write to the Free Software
17
 
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
16
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
17
*/
19
18
 
20
19
/*
119
118
        pprinter_data = (PRINTER *) g_rdpdr_device[device_id].pdevice_data;
120
119
 
121
120
        /* default printer name use default printer queue as well in unix */
122
 
        if (!strcmp(pprinter_data->printer, "mydeskjet"))
 
121
        if (strncmp(pprinter_data->printer, "mydeskjet", strlen(pprinter_data->printer)) == 0)
123
122
        {
124
123
                pprinter_data->printer_fp = popen("lpr", "w");
125
124
        }
126
125
        else
127
126
        {
128
127
#ifdef VBOX
129
 
                snprintf(cmd, sizeof(cmd), "lpr -P %s", pprinter_data->printer);
 
128
                snprintf(cmd, sizeof(cmd), "lpr -P %s", pprinter_data->printer);
130
129
#else
131
130
                sprintf(cmd, "lpr -P %s", pprinter_data->printer);
132
131
#endif