aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/pbproxy/app-main.m
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-28 07:58:00 +0000
committermarha <marha@users.sourceforge.net>2011-04-28 07:58:00 +0000
commit57a879849643e79d9674198a3a77c59532fb79b4 (patch)
tree19ece2254fadb6c2077aa09098dd8a51a5578d2a /xorg-server/hw/xquartz/pbproxy/app-main.m
parent96d6df5da9cddedf4931bf8e17f96e242467c661 (diff)
downloadvcxsrv-57a879849643e79d9674198a3a77c59532fb79b4.tar.gz
vcxsrv-57a879849643e79d9674198a3a77c59532fb79b4.tar.bz2
vcxsrv-57a879849643e79d9674198a3a77c59532fb79b4.zip
xserver xkeyboard-config mesa git update 28 Apr 2011
Diffstat (limited to 'xorg-server/hw/xquartz/pbproxy/app-main.m')
-rw-r--r--xorg-server/hw/xquartz/pbproxy/app-main.m18
1 files changed, 14 insertions, 4 deletions
diff --git a/xorg-server/hw/xquartz/pbproxy/app-main.m b/xorg-server/hw/xquartz/pbproxy/app-main.m
index b00e90a6d..9055bad06 100644
--- a/xorg-server/hw/xquartz/pbproxy/app-main.m
+++ b/xorg-server/hw/xquartz/pbproxy/app-main.m
@@ -34,7 +34,7 @@
#include <unistd.h> /*for getpid*/
#include <Cocoa/Cocoa.h>
-static const char *app_prefs_domain = LAUNCHD_ID_PREFIX".xpbproxy";
+static const char *app_prefs_domain = BUNDLE_ID_PREFIX".xpbproxy";
CFStringRef app_prefs_domain_cfstr;
/* Stubs */
@@ -53,12 +53,22 @@ static void signal_handler (int sig) {
}
}
+void
+ErrorF(const char * f, ...)
+{
+ va_list args;
+
+ va_start(args, f);
+ vfprintf(stderr, f, args);
+ va_end(args);
+}
+
int main (int argc, const char *argv[]) {
const char *s;
int i;
#ifdef DEBUG
- printf("pid: %u\n", getpid());
+ ErrorF("pid: %u\n", getpid());
#endif
xpbproxy_is_standalone = YES;
@@ -70,13 +80,13 @@ int main (int argc, const char *argv[]) {
if(strcmp (argv[i], "--prefs-domain") == 0 && i+1 < argc) {
app_prefs_domain = argv[++i];
} else if (strcmp (argv[i], "--help") == 0) {
- printf("usage: xpbproxy OPTIONS\n"
+ ErrorF("usage: xpbproxy OPTIONS\n"
"Pasteboard proxying for X11.\n\n"
"--prefs-domain <domain> Change the domain used for reading preferences\n"
" (default: %s)\n", app_prefs_domain);
return 0;
} else {
- fprintf(stderr, "usage: xpbproxy OPTIONS...\n"
+ ErrorF("usage: xpbproxy OPTIONS...\n"
"Try 'xpbproxy --help' for more information.\n");
return 1;
}