diff -Naur manedit-old/manedit/Makefile.FreeBSD manedit-new/manedit/Makefile.FreeBSD --- manedit-old/manedit/Makefile.FreeBSD 2005-03-16 02:33:14.000000000 -0500 +++ manedit-new/manedit/Makefile.FreeBSD 2005-06-01 19:25:57.000000000 -0400 @@ -70,7 +70,7 @@ # to the LIB line depending on what you have set in the CFLAGS line # farther above. # -LIB = `$(GTK_CONFIG) --libs` +LIB = `$(GTK_CONFIG) --libs` -lSystemStubs -lz -lbz2 # Library Directories: # @@ -116,7 +116,7 @@ # Build Rules: # $(BIN): $(OBJ_C) $(OBJ_CPP) - $(CC) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIB) $(LIB_DIR) + $(CPP) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIB) $(LIB_DIR) all: $(BIN) $(BIN).1.out diff -Naur manedit-old/manedit/config.h manedit-new/manedit/config.h --- manedit-old/manedit/config.h 2005-03-16 02:33:15.000000000 -0500 +++ manedit-new/manedit/config.h 2005-06-01 17:19:05.000000000 -0400 @@ -226,7 +226,7 @@ * %p = optional parameters */ #if !defined(__FreeBSD__) -#define MEDIT_CMD_MANPAGE_TO_OUTPUT (PREFIX "/bin/man %p %f") +#define MEDIT_CMD_MANPAGE_TO_OUTPUT ("/usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c %p %f") #else #define MEDIT_CMD_MANPAGE_TO_OUTPUT (PREFIX "/bin/manwrap %p %f") #endif /* !__FreeBSD__ */ diff -Naur manedit-old/manedit/fb.c manedit-new/manedit/fb.c --- manedit-old/manedit/fb.c 2005-03-16 02:33:14.000000000 -0500 +++ manedit-new/manedit/fb.c 2005-06-01 17:39:59.000000000 -0400 @@ -17,7 +17,7 @@ # elif defined(__FreeBSD__) /* # include */ # else -# include +/* # include */ # endif #endif #include @@ -794,124 +794,51 @@ } -/* - * Returns a list of strings describing the drive paths. - */ -static gchar **FileBrowserGetDrivePaths(gint *n) -{ -#if defined(_WIN32) - /* Win32 */ - gchar drive_letter = 'a'; - gchar drive_name[10]; - gint i, strc = 0; - gchar **strv = NULL; - - for(drive_letter = 'a'; drive_letter <= 'g'; drive_letter++) - { - g_snprintf( - drive_name, sizeof(drive_name), - "%c:\\", - toupper(drive_letter) - ); - i = strc; - strc = i + 1; - strv = (gchar **)g_realloc( - strv, strc * sizeof(gchar *) - ); - if(strv == NULL) - { - strc = 0; - break; - } - - strv[i] = STRDUP(drive_name); - } - - if(n != NULL) - *n = strc; - - return(strv); -#elif defined(__FreeBSD__) - /* FreeBSD */ - if(n != NULL ) - *n = 0; - return(NULL); -#else - /* UNIX */ - gint i, strc = 0; - gchar **strv = NULL; -#ifdef __SOLARIS__ - struct vfstab *vfs_ptr = NULL; - int mtback; -#else - struct mntent *mt_ptr; -#endif - - /* Open system devices list file */ -#ifdef __SOLARIS__ - FILE *fp = FOpen("/etc/vfstab", "rb"); -#else - FILE *fp = setmntent("/etc/fstab", "rb"); -#endif - if(fp == NULL) - { - if(n != NULL) - *n = strc; - return(strv); - } - - /* Begin reading system devices list file */ -#ifdef __SOLARIS__ - vfs_ptr = (struct vfstab *)g_malloc(sizeof(struct vfstab)); - mtback = getvfsent(fp, vfs_ptr); - while(mtback != 0) -#else - mt_ptr = getmntent(fp); - while(mt_ptr != NULL) -#endif - { - i = strc; - strc = i + 1; - strv = (gchar **)g_realloc( - strv, strc * sizeof(gchar *) - ); - if(strv == NULL) - { - strc = 0; - break; - } - - /* Get mount path as the drive path */ -#ifdef __SOLARIS__ - strv[i] = STRDUP(vfs_ptr->vfs_mountp); -#else - strv[i] = STRDUP(mt_ptr->mnt_dir); -#endif - - /* Read next mount entry */ -#ifdef __SOLARIS__ - mtback = getmntent(fp, vfs_ptr); -#else - mt_ptr = getmntent(fp); -#endif - } - - - /* Close system devices list file */ -#ifdef __SOLARIS__ - FClose(fp); - fp = NULL; - vfs_ptr = NULL; -#else - endmntent(fp); - fp = NULL; -#endif - - if(n != NULL) - *n = strc; - - return(strv); -#endif +#include +#include +#include + + /* + * Returns a list of strings describing the drive paths. + */ +static gchar **FileBrowserGetDrivePaths(gint *n) { + int n_mnts, i; + struct statfs* mnts; + gint strc = 0; + gchar **strv = NULL; + + n_mnts = getmntinfo(&mnts, MNT_WAIT); + if(n_mnts == 0) + { + if(n != NULL) + *n = strc; + return(strv); + } + + for (i = 0; i < n_mnts; ++i, ++mnts) { + if ( strcmp(mnts->f_fstypename, "volfs") == 0 || + strcmp(mnts->f_fstypename, "fdesc") == 0 || + strcmp(mnts->f_fstypename, "devfs") == 0 || + mnts->f_blocks == 0 ) + continue; + ++strc; + strv = (gchar **)g_realloc( + strv, strc * sizeof(gchar *) + ); + if(strv == NULL) + { + strc = 0; + break; + } + + strv[strc - 1] = STRDUP(mnts->f_mntonname); + } + + /* Update total return value */ + if(n != NULL) + *n = strc; + + return(strv); } diff -Naur manedit-old/manedit/prochandle.cpp manedit-new/manedit/prochandle.cpp --- manedit-old/manedit/prochandle.cpp 2005-03-16 02:33:15.000000000 -0500 +++ manedit-new/manedit/prochandle.cpp 2005-06-01 19:01:40.000000000 -0400 @@ -285,9 +285,9 @@ if(pid == 0) return(0); - if(sched_getparam( + if(kill( pid, - &sp + SIGINFO ) == 0) return(1); else diff -Naur manedit-old/manedit/utils/manview.sh manedit-new/manedit/utils/manview.sh --- manedit-old/manedit/utils/manview.sh 2005-03-16 02:33:15.000000000 -0500 +++ manedit-new/manedit/utils/manview.sh 2005-06-01 17:18:34.000000000 -0400 @@ -2,4 +2,4 @@ # # Script to call manedit in viewer mode. # -/usr/bin/manedit --viewer $1 +@PREFIX@/bin/manedit --viewer $1