Skip to content

Commit b650bb6

Browse files
committed
delete some unused code
1 parent 7a1363a commit b650bb6

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

gui/console.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,22 @@ static gint console_paste_handler (GtkWidget *w, gpointer p)
233233
return console_paste_text(w, GDK_NONE);
234234
}
235235

236-
/* paste from X selection onto the command line */
236+
#if defined(__linux) || defined(linux)
237237

238238
static gint console_click_handler (GtkWidget *w,
239239
GdkEventButton *event,
240240
gpointer p)
241241
{
242+
/* paste from the X selection onto the command line */
242243
if (event->button == 2) {
243244
return console_paste_text(w, GDK_SELECTION_PRIMARY);
245+
} else {
246+
return FALSE;
244247
}
245-
246-
return FALSE;
247248
}
248249

250+
#endif /* linux */
251+
249252
enum {
250253
SAMPLE_RECORD,
251254
SAMPLE_CHECK

gui/gretlwin32.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ void gretl_win32_debug_init (int debug)
345345

346346
void gretl_win32_init (int debug, int ignore_rc)
347347
{
348+
#if GTK_MAJOR_VERSION < 3
348349
char tmp[4] = {0};
349350

350-
#if GTK_MAJOR_VERSION < 3
351351
read_reg_val(HKEY_CURRENT_USER,
352352
"Microsoft\\Windows\\CurrentVersion\\ThemeManager",
353353
"ThemeActive", tmp);
@@ -466,7 +466,6 @@ int emf_to_clipboard (char *emfname)
466466
HENHMETAFILE hemfclip;
467467
HENHMETAFILE hemf = NULL;
468468
HANDLE htest;
469-
gchar *fconv = NULL;
470469

471470
#if GTK_MAJOR_VERSION > 2
472471
mainw = GDK_WINDOW_HWND(gtk_widget_get_window(mdata->main));

lib/src/gretl_foreign.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ static int set_foreign_lang (const char *lang, PRN *prn)
242242
return err;
243243
}
244244

245+
#ifndef G_OS_WIN32
246+
245247
static int lib_run_prog_sync (char **argv, gretlopt opt,
246248
int lang, PRN *prn)
247249
{
@@ -306,6 +308,8 @@ static int lib_run_prog_sync (char **argv, gretlopt opt,
306308
return err;
307309
}
308310

311+
#endif /* not Windows */
312+
309313
#ifdef HAVE_MPI /* start common MPI-driver code block */
310314

311315
enum {
@@ -901,7 +905,7 @@ static int win32_lib_run_other_sync (gretlopt opt, PRN *prn)
901905

902906
#else /* non-Windows code follows */
903907

904-
#ifdef __APPLE__
908+
# ifdef __APPLE__
905909

906910
static int lib_run_R_sync (gretlopt opt, PRN *prn)
907911
{
@@ -928,7 +932,7 @@ static int lib_run_R_sync (gretlopt opt, PRN *prn)
928932
return ret;
929933
}
930934

931-
#else
935+
# else
932936

933937
static int lib_run_R_sync (gretlopt opt, PRN *prn)
934938
{
@@ -944,7 +948,7 @@ static int lib_run_R_sync (gretlopt opt, PRN *prn)
944948
return lib_run_prog_sync(argv, opt, LANG_R, prn);
945949
}
946950

947-
#endif /* macOS or not */
951+
# endif /* macOS or not */
948952

949953
static int lib_run_other_sync (gretlopt opt, PRN *prn)
950954
{

lib/src/gretl_paths.c

-11
Original file line numberDiff line numberDiff line change
@@ -2279,17 +2279,6 @@ void show_paths (void)
22792279

22802280
#ifdef WIN32
22812281

2282-
static char *rightmost (char *s1, char *s2)
2283-
{
2284-
if (s1 == NULL) {
2285-
return s2;
2286-
} else if (s2 == NULL) {
2287-
return s1;
2288-
} else {
2289-
return (s2 - s1 > 0)? s2 : s1;
2290-
}
2291-
}
2292-
22932282
static char getsep (const char *s)
22942283
{
22952284
int bak = 0, fwd = 0;

lib/src/gretl_win32.c

-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ int win32_ensure_dll_path (void)
416416
{
417417
const char *bindir = gretl_bindir();
418418
const gchar *path = g_getenv("PATH");
419-
const gchar *tmpd = g_getenv("TMPDIR");
420419
int in_path = 0;
421420

422421
if (path != NULL) {

0 commit comments

Comments
 (0)