summaryrefslogtreecommitdiff
path: root/hw/xquartz/pbproxy/app-main.m
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xquartz/pbproxy/app-main.m')
-rw-r--r--hw/xquartz/pbproxy/app-main.m70
1 files changed, 36 insertions, 34 deletions
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index 772c458a1..4eacc879f 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -1,32 +1,34 @@
/* app-main.m
- Copyright (c) 2002, 2008 Apple Computer, Inc. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
- HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name(s) of the above
- copyright holders shall not be used in advertising or otherwise to
- promote the sale, use or other dealings in this Software without
- prior written authorization.
+ *
+ * Copyright (c) 2002-2012 Apple Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above
+ * copyright holders shall not be used in advertising or otherwise to
+ * promote the sale, use or other dealings in this Software without
+ * prior written authorization.
*/
+
#include "pbproxy.h"
#import "x-selection.h"
@@ -57,7 +59,7 @@ void
ErrorF(const char * f, ...)
{
va_list args;
-
+
va_start(args, f);
vfprintf(stderr, f, args);
va_end(args);
@@ -67,7 +69,7 @@ ErrorF(const char * f, ...)
void xq_asl_log (int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...) {
#ifdef DEBUG
va_list args;
-
+
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
@@ -77,16 +79,16 @@ void xq_asl_log (int level, const char *subsystem, const char *file, const char
int main (int argc, const char *argv[]) {
const char *s;
int i;
-
+
#ifdef DEBUG
ErrorF("pid: %u\n", getpid());
#endif
-
+
xpbproxy_is_standalone = YES;
-
+
if((s = getenv("X11_PREFS_DOMAIN")))
app_prefs_domain = s;
-
+
for (i = 1; i < argc; i++) {
if(strcmp (argv[i], "--prefs-domain") == 0 && i+1 < argc) {
app_prefs_domain = argv[++i];
@@ -98,7 +100,7 @@ int main (int argc, const char *argv[]) {
return 0;
} else {
ErrorF("usage: xpbproxy OPTIONS...\n"
- "Try 'xpbproxy --help' for more information.\n");
+ "Try 'xpbproxy --help' for more information.\n");
return 1;
}
}
@@ -109,6 +111,6 @@ int main (int argc, const char *argv[]) {
signal (SIGTERM, signal_handler);
signal (SIGHUP, signal_handler);
signal (SIGPIPE, SIG_IGN);
-
+
return xpbproxy_run();
}