1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

OpenBSD patches for dtpdmd and dtprintinfo.

Casts, #ifdefs, SIGCLD ...
This commit is contained in:
Pascal Stumpf 2012-08-11 14:01:14 +02:00 committed by Jon Trulson
parent d418376944
commit 76984653b4
8 changed files with 15 additions and 13 deletions

View file

@ -425,7 +425,7 @@ void mgr_launch_pdm( XpPdmServiceRec *rec )
sigemptyset(&svec.sa_mask); sigemptyset(&svec.sa_mask);
svec.sa_flags = 0; svec.sa_flags = 0;
svec.sa_handler = SIG_DFL; svec.sa_handler = SIG_DFL;
(void) sigaction(SIGCLD, &svec, (struct sigaction *) NULL); (void) sigaction(SIGCHLD, &svec, (struct sigaction *) NULL);
for (i=3; i < FOPEN_MAX; i++) { for (i=3; i < FOPEN_MAX; i++) {
if ((i != rec->message_pipe[1]) && if ((i != rec->message_pipe[1]) &&

View file

@ -324,16 +324,16 @@ void DtApp::SaveYourSelf()
save_state = true; save_state = true;
char *value = window->setPrefD->ShowOnlyMyJobs() ? "1" : "0"; char *value = window->setPrefD->ShowOnlyMyJobs() ? (char *)"1" : (char *)"0";
Save("ShowOnlyMine", value); Save("ShowOnlyMine", value);
value = window->setPrefD->ShowStatusLine() ? "1" : "0"; value = window->setPrefD->ShowStatusLine() ? (char *)"1" : (char *)"0";
Save("ShowMessageLine", value); Save("ShowMessageLine", value);
value = window->setPrefD->ShowDetailsLabel() ? "1" : "0"; value = window->setPrefD->ShowDetailsLabel() ? (char *)"1" : (char *)"0";
Save("ShowDetailsLabel", value); Save("ShowDetailsLabel", value);
value = window->setPrefD->ShowStatusFlags() ? "1" : "0"; value = window->setPrefD->ShowStatusFlags() ? (char *)"1" : (char *)"0";
Save("ShowProblemFlag", value); Save("ShowProblemFlag", value);
char interval[9]; char interval[9];
@ -357,10 +357,10 @@ void DtApp::SaveYourSelf()
queues = (DtPrinterIcon **) window->container->Children(); queues = (DtPrinterIcon **) window->container->Children();
for (i = 0; i < window->container->NumChildren(); i++) for (i = 0; i < window->container->NumChildren(); i++)
{ {
value = queues[i]->Visible() ? "1" : "0"; value = queues[i]->Visible() ? (char *)"1" : (char *)"0";
sprintf(attribute, "%s.Visible", queues[i]->QueueObj()->Name()); sprintf(attribute, "%s.Visible", queues[i]->QueueObj()->Name());
Save(attribute, value); Save(attribute, value);
value = queues[i]->Open() ? "1" : "0"; value = queues[i]->Open() ? (char *)"1" : (char *)"0";
sprintf(attribute, "%s.Open", queues[i]->QueueObj()->Name()); sprintf(attribute, "%s.Open", queues[i]->QueueObj()->Name());
Save(attribute, value); Save(attribute, value);
} }

View file

@ -174,7 +174,7 @@ char *DtPrinterIcon::Description()
sprintf(buf, "%s_Print", queue->Name()); sprintf(buf, "%s_Print", queue->Name());
char *desc = DtActionDescription(buf); char *desc = DtActionDescription(buf);
return (desc ? desc : ""); return (desc ? desc : (char *)"");
} }
void DtPrinterIcon::PrintQueueUp(boolean _flag) void DtPrinterIcon::PrintQueueUp(boolean _flag)

View file

@ -59,7 +59,7 @@ class DtPrinterContainer : public Container
: Container(category, parent, name, SCROLLED_HORIZONTAL_ROW_COLUMN) { } : Container(category, parent, name, SCROLLED_HORIZONTAL_ROW_COLUMN) { }
~DtPrinterContainer() { delete dnd; } ~DtPrinterContainer() { delete dnd; }
boolean DtPrinterContainer::SetVisiblity(boolean flag) boolean SetVisiblity(boolean flag)
{ {
Container::SetVisiblity(flag); Container::SetVisiblity(flag);
dnd->UpdateActivity(flag); dnd->UpdateActivity(flag);

View file

@ -40,7 +40,7 @@
#define boolean boolean_t #define boolean boolean_t
#define true B_TRUE #define true B_TRUE
#define false B_FALSE #define false B_FALSE
#elif defined(linux) #elif defined(linux) || defined(CSRG_BASED)
#define false 0 #define false 0
#define true 0 #define true 0
#define boolean int #define boolean int

View file

@ -41,7 +41,7 @@
#define boolean boolean_t #define boolean boolean_t
#define true B_TRUE #define true B_TRUE
#define false B_FALSE #define false B_FALSE
#elif defined(linux) #elif defined(linux) || defined(CSRG_BASED)
#define false 0 #define false 0
#define true 0 #define true 0
#define boolean int #define boolean int

View file

@ -774,7 +774,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs)
} }
#endif // HP LOCAL PARSER #endif // HP LOCAL PARSER
#if defined(__osf__) || defined(linux) #if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
// //
// DEC/OSF1 PARSER - Output from "lpstat -o<printer> // DEC/OSF1 PARSER - Output from "lpstat -o<printer>
// //
@ -870,7 +870,7 @@ 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) #if defined(linux) || defined(CSRG_BASED)
sprintf(buf, "lpq -P%s", printer); sprintf(buf, "lpq -P%s", printer);
#endif #endif

View file

@ -38,7 +38,9 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#if !defined(CSRG_BASED)
#include <values.h> #include <values.h>
#endif
#ifdef _AIX #ifdef _AIX
#include <strings.h> /* need to get bzero defined */ #include <strings.h> /* need to get bzero defined */
#endif /* _AIX */ #endif /* _AIX */