26 |
#include <unistd.h> |
#include <unistd.h> |
27 |
#include <sys/stat.h> |
#include <sys/stat.h> |
28 |
#include <sys/types.h> |
#include <sys/types.h> |
|
#include <sys/ipc.h> |
|
|
#include <sys/msg.h> |
|
29 |
#include <errno.h> |
#include <errno.h> |
30 |
#include <time.h> |
#include <time.h> |
31 |
#include <locale.h> |
#include <locale.h> |
32 |
#include <gtk/gtk.h> |
#include <gtk/gtk.h> |
33 |
#include <string.h> |
#include <string.h> |
34 |
|
|
35 |
|
#if defined(HAVE_SYS_IPC_H) |
36 |
|
#include <sys/ipc.h> |
37 |
|
#include <sys/msg.h> |
38 |
|
#endif |
39 |
|
|
40 |
#if WANT_HAMLIB |
#if WANT_HAMLIB |
41 |
# include <hamlib/rig.h> |
# include <hamlib/rig.h> |
42 |
# include "hamlib-utils.h" |
# include "hamlib-utils.h" |
130 |
xlogdir = g_strconcat (g_get_home_dir (), packagedir->str, NULL); |
xlogdir = g_strconcat (g_get_home_dir (), packagedir->str, NULL); |
131 |
if (stat (xlogdir, &statdir) == -1) |
if (stat (xlogdir, &statdir) == -1) |
132 |
{ |
{ |
133 |
|
#ifdef WIN32 |
134 |
|
if (mkdir (xlogdir) == -1) |
135 |
|
#else |
136 |
if (mkdir (xlogdir, S_IRUSR | S_IWUSR | S_IXUSR) == -1) |
if (mkdir (xlogdir, S_IRUSR | S_IWUSR | S_IXUSR) == -1) |
137 |
|
#endif |
138 |
g_error (_("Creating ~%s directory."), packagedir->str); |
g_error (_("Creating ~%s directory."), packagedir->str); |
139 |
else |
else |
140 |
show_setupdialog(); |
show_setupdialog(); |
378 |
setframestyle (locatorframe, preferences.themecolor, preferences.themefont); |
setframestyle (locatorframe, preferences.themecolor, preferences.themefont); |
379 |
|
|
380 |
/* set up the message queue for remote data */ |
/* set up the message queue for remote data */ |
381 |
|
#if defined(HAVE_SYS_IPC_H) |
382 |
msgid = msgget ((key_t) 1238, 0666 | IPC_CREAT); |
msgid = msgget ((key_t) 1238, 0666 | IPC_CREAT); |
383 |
if (msgid == -1) |
if (msgid == -1) |
384 |
{ |
{ |
387 |
} |
} |
388 |
else /* check for a message twice a second */ |
else /* check for a message twice a second */ |
389 |
remotetimer = g_timeout_add (500, (GSourceFunc) remote_entry, NULL); |
remotetimer = g_timeout_add (500, (GSourceFunc) remote_entry, NULL); |
390 |
|
#endif |
391 |
|
|
392 |
/* hamlib stuff */ |
/* hamlib stuff */ |
393 |
mhzlabel = lookup_widget (mainwindow, "mhzlabel"); |
mhzlabel = lookup_widget (mainwindow, "mhzlabel"); |