From 3d61b96643f3a52b0403280cb3ead6bcf9ab2c61 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sun, 1 Jun 2008 17:30:03 +0200 Subject: [PATCH] Compilation fix for system without ncurses --- src/intrf.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/intrf.c b/src/intrf.c index 563cbdf7..cbcaf2f6 100644 --- a/src/intrf.c +++ b/src/intrf.c @@ -86,8 +86,6 @@ extern const char *monstr[]; static char intr_buffer_screen[MAX_LINES][LINE_LENGTH+1]; static int intr_nbr_line=0; static void set_parent_directory(char *dst_directory); -static int vaff_txt(int line, WINDOW *window, const char *_format, va_list ap) __attribute__((format(printf, 3, 0))); -static int wmenuUpdate(WINDOW *window, const int yinfo, int y, int x, const struct MenuItem *menuItems, const unsigned int itemLength, const char *available, const int menuType, unsigned int current); int screen_buffer_add(const char *_format, ...) { @@ -274,8 +272,22 @@ static void set_parent_directory(char *dst_directory) #endif } +static inline char *td_getcwd(char *buf, unsigned long size) +{ + /* buf must non-NULL*/ +#ifdef HAVE_GETCWD + if(getcwd(buf, size)!=NULL) + return buf; +#endif + buf[0]='.'; + buf[1]='\0'; + return buf; +} + #ifdef HAVE_NCURSES #define INTER_DIR (LINES-25+16) +static int vaff_txt(int line, WINDOW *window, const char *_format, va_list ap) __attribute__((format(printf, 3, 0))); +static int wmenuUpdate(WINDOW *window, const int yinfo, int y, int x, const struct MenuItem *menuItems, const unsigned int itemLength, const char *available, const int menuType, unsigned int current); static void dir_aff_entry(WINDOW *window, struct file_info *dir_info); static int wgetch_nodelay(WINDOW *window); @@ -1467,18 +1479,6 @@ static int interface_partition_type_ncurses(disk_t *disk_car) return 0; } -static inline char *td_getcwd(char *buf, unsigned long size) -{ - /* buf must non-NULL*/ -#ifdef HAVE_GETCWD - if(getcwd(buf, size)!=NULL) - return buf; -#endif - buf[0]='.'; - buf[1]='\0'; - return buf; -} - #if defined(DJGPP) || defined(__OS2__) void get_dos_drive_list(struct td_list_head *list);