1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtprintinfo: Use CUPS lpq for FreeBSD

Use /usr/local/bin/lpq from CUPS for FreeBSD
for now; this prevents immediate dtprintinfo
crash.

In the future we should handle both built-in
/usr/bin/lpq as well as CUPS /usr/local/bin/lpq
output in separate functions.

Code to support CUPS should probably shared between
other operating systems.
This commit is contained in:
Marcin Cieslak 2012-09-24 03:15:02 +02:00 committed by Jon Trulson
parent 6ea7855841
commit fc0f1ff697

View file

@ -870,8 +870,10 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs)
#if defined(__osf__) #if defined(__osf__)
sprintf(buf, "lpstat -o%s", printer); sprintf(buf, "lpstat -o%s", printer);
#endif #endif
#if defined(linux) || defined(CSRG_BASED) #if defined(linux) || defined(__OpenBSD__)
sprintf(buf, "lpq -P%s", printer); snprintf(buf, 1000, "lpq -P%s", printer);
#elif defined(__FreeBSD__)
snprintf(buf, 1000, "/usr/local/bin/lpq -P%s", printer);
#endif #endif
Invoke *_thread = new Invoke(buf, &output); Invoke *_thread = new Invoke(buf, &output);