debian/0000755000000000000000000000000011705552077007177 5ustar debian/patches/0000755000000000000000000000000011705551661010624 5ustar debian/patches/fix-ftbfs-with-binutils-gold.patch0000644000000000000000000000066511705551661017267 0ustar Description: Fix FTBFS with binutils-gold Author: Angel Abad Bug-Ubuntu: https://launchpad.net/bugs/770780 Forwarded: no --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ GTK_LIBS = $(shell pkg-config --libs gtk+-2.0) gman: $(objectfiles) - $(CC) -lpthread $(GTK_LIBS) -rdynamic $(objectfiles) -o gman + $(CC) -rdynamic $(objectfiles) -o gman -lpthread $(GTK_LIBS) %.o: %.c %.h gman.o: gman.c gman.h menu.h debian/patches/evince.patch0000644000000000000000000000764711700626650013130 0ustar Author: Osamu Aoki Description: Use Evince --- a/gman.1x +++ b/gman.1x @@ -40,6 +40,12 @@ .sp This requires GhostView (command "gv") to be available on your system. .TP +.B Evince +gman will present man pages in an Evince window for you to view and print +the man page. +.sp +This requires GNOME Evince (command "evince") to be available on your system. +.TP .B LocalBrowse gman will launch a web browser window to show you the man page. .sp --- a/gman.c +++ b/gman.c @@ -91,6 +91,7 @@ context->set_default_value("show_mode","int",(void*)0); // 0 = xterm, 1 = ghostview context->set_default_value("xterm_command","char*",(void*)"x-terminal-emulator"); context->set_default_value("gv_command","char*",(void*)"gv"); + context->set_default_value("evince_command","char*",(void*)"evince"); context->set_default_value("browser_command","char*",(void*)"sensible-browser"); // kfm also works context->set_default_value("cgi_host","char*",(void*)"localhost"); context->set_default_value("cgi_location","char*",(void*)"/cgi-bin/gman.pl"); --- a/mandata.c +++ b/mandata.c @@ -275,6 +275,26 @@ _exit(0); } break; + case 2: + sprintf(loc_name," ~/.gman.%s.ps ",get_display_name(buffer1)); + sprintf(buffer,"man -t "); + len = strlen(buffer); + attach(buffer+len,man_path->GetPath(),file_name); + strcat(buffer," >> "); + strcat(buffer,loc_name); + strcat(buffer," ; "); + strcat(buffer,(char*)context->get_value("evince_command")); + strcat(buffer,loc_name); + strcat(buffer," ; rm "); + strcat(buffer,loc_name); + //g_warning(buffer); + if(!fork()) + { + //printf(buffer); + system(buffer); + _exit(0); + } + break; /* case 2: sprintf(loc_name," ~/.gman.%s.html ",get_display_name(buffer1)); @@ -304,7 +324,7 @@ } break; */ - case 2: + case 3: sprintf(loc_name," ~/.gman.%s.html ",get_display_name(buffer1)); //g_warning(loc_name); strcpy(buffer,"/usr/lib/cgi-bin/gman.pl "); @@ -329,7 +349,7 @@ _exit(0); } break; - case 3: + case 4: sprintf(buffer,(char*)context->get_value("browser_command")); len = strlen(buffer); strcat(buffer," \"http://"); --- a/menu.c +++ b/menu.c @@ -78,8 +78,9 @@ {"/_View", NULL, NULL, 0, ""}, {"/View/x_Term", "T", (void (*)())show_mode_callback, 0, ""}, {"/View/_GhostView", "G", (void (*)())show_mode_callback, 1, "/View/xTerm"}, - {"/View/_LocalBrowse", "L", (void (*)())show_mode_callback, 2, "/View/xTerm"}, - {"/View/_NetBrowse", "N", (void (*)())show_mode_callback, 3, "/View/xTerm"}, + {"/View/_Evince", "E", (void (*)())show_mode_callback, 2, "/View/xTerm"}, + {"/View/_LocalBrowse", "L", (void (*)())show_mode_callback, 3, "/View/xTerm"}, + {"/View/_NetBrowse", "N", (void (*)())show_mode_callback, 4, "/View/xTerm"}, {"/_Options", NULL, NULL, 0, ""}, {"/Options/Status bar", NULL, (void (*)())status_bar_callback, 0, ""}, {"/Options/sep1", NULL, NULL, 0, ""}, @@ -164,8 +165,9 @@ searching_mode_buttons[1] = gtk_item_factory_get_widget(item_factory, "/Options/Key word search"); show_mode_buttons[0] = gtk_item_factory_get_widget(item_factory, "/View/xTerm"); show_mode_buttons[1] = gtk_item_factory_get_widget(item_factory, "/View/GhostView"); - show_mode_buttons[2] = gtk_item_factory_get_widget(item_factory, "/View/LocalBrowse"); - show_mode_buttons[3] = gtk_item_factory_get_widget(item_factory, "/View/NetBrowse"); + show_mode_buttons[2] = gtk_item_factory_get_widget(item_factory, "/View/Evince"); + show_mode_buttons[3] = gtk_item_factory_get_widget(item_factory, "/View/LocalBrowse"); + show_mode_buttons[4] = gtk_item_factory_get_widget(item_factory, "/View/NetBrowse"); status_bar_button = gtk_item_factory_get_widget(item_factory, "/Options/Status bar"); // gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_buttons[4]),1); updata_menu_buttons(0); debian/patches/gnome-terminal.patch0000644000000000000000000000105511700640522014552 0ustar Author: Osamu Aoki Description: Drop -n option since gnome terminal does not like it --- a/mandata.c +++ b/mandata.c @@ -241,9 +241,8 @@ char buffer2[BUFFER_SIZE]; switch ((long)context->get_value("show_mode")) { case 0: - sprintf(buffer,"%s -T '%s manual page' -n '%s - GMan' -e man ", + sprintf(buffer,"%s -T '%s manual page' -e man ", (char*)context->get_value("xterm_command"), - get_display_name(buffer1), get_display_name(buffer1)); len = strlen(buffer); attach(buffer+len,man_path->GetPath(),file_name); debian/patches/pre-0.9.3-5.1.patch0000644000000000000000000011317311700626720013401 0ustar Author: Josip Rodin and Barry deFreese Description: Combined patches from 0.9.3-1 to 0.9.3-5.1 diff --git a/ChangeLog b/ChangeLog index ed28b96..eb5817d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -ChangeLog for G-man by Xinkai Wang +ChangeLog for Gman by Xinkai Wang v0.9.2 (31.Mar 2001) - CGI front-end for man2html (gman.pl) added. diff --git a/Makefile b/Makefile index 9fb583c..6a0ea23 100644 --- a/Makefile +++ b/Makefile @@ -1,55 +1,39 @@ # Gman Makefile # You can adjust the following variables. + CXX = g++ -CXXFLAGS = -DVERSION=\"0.9.3\" `gtk-config --cflags` -O2 -Wall +CXXFLAGS = -DVERSION=\"0.9.3\" $(shell pkg-config --cflags gtk+-2.0) -O2 -Wall $(DEBUG) CC = $(CXX) $(CXXFLAGS) -GNOMELIB = #`gnome-config --libs gnomeui` -GTKLIB = -L/usr/lib/ `gtk-config --libs` prefix = /usr -cgi_bin_prefix = /var/www/cgi-bin +cgi_bin_prefix = ${prefix}/lib/cgi-bin # There shouldn't be any need to edit anything below this point. all: gman -gman: menu.o mandata.o util.o gman.o list.o context.o task.o taskfunc.o window2.o - $(CXX) -lgtk -lgdk -lpthread $(GTKLIB) menu.o mandata.o util.o gman.o list.o context.o task.o taskfunc.o window2.o -o gman +objectfiles = menu.o mandata.o util.o gman.o list.o context.o task.o \ + taskfunc.o window2.o -gman.o: gman.c menu.h - $(CC) -c gman.c +GTK_LIBS = $(shell pkg-config --libs gtk+-2.0) -menu.o: menu.c mandata.h util.h - $(CC) -c menu.c -o menu.o +gman: $(objectfiles) + $(CC) -lpthread $(GTK_LIBS) -rdynamic $(objectfiles) -o gman +%.o: %.c %.h +gman.o: gman.c gman.h menu.h +menu.o: menu.c menu.h mandata.h util.h mandata.o: mandata.c mandata.h util.h mandatadef.h - $(CC) -c mandata.c -o mandata.o - -util.o: util.c util.h - $(CC) -c util.c -o util.o - -list.o: list.c list.h - $(CC) -c list.c - -context.o: context.c context.h - $(CC) -c context.c - -task.o: task.c task.h - $(CC) -c task.c - -taskfunc.o: taskfunc.c taskfunc.h - $(CC) -c taskfunc.c - -window2.o: window2.c window2.h - $(CC) -c window2.c clean: - rm -f *.o *~ gman + rm -f $(objectfiles) gman + +distclean: clean + rm -f *.o *~ install: test -d $(prefix)/bin || mkdir -p $(prefix)/bin - test -d $(prefix)/man/man1 || mkdir -p $(prefix)/man/man1 - test -d $(cgi_bin_prefix)/gman || mkdir -p $(cgi_bin_prefix)/gman - install -s -m 755 gman $(prefix)/bin - install -s -m 755 gman.pl $(prefix)/bin/gman.cgi - install -m 644 gman.1x $(prefix)/man/man1 - install -s -m 755 gman.pl $(ci_bin_prefix)/gman + test -d $(prefix)/share/man/man1 || mkdir -p $(prefix)/share/man/man1 + test -d $(cgi_bin_prefix) || mkdir -p $(cgi_bin_prefix) + install -m 755 gman $(prefix)/bin/ + install -m 755 gman.pl $(cgi_bin_prefix)/gman.pl + install -m 644 gman.1x $(prefix)/share/man/man1 diff --git a/README b/README index 64d213a..0b866eb 100644 --- a/README +++ b/README @@ -71,7 +71,7 @@ To do * autoconf support, especially if GNOME support is included. * use of gettext for easier translation to other languages. - * improvment for the parser when reading the ~/.gman file (context.c). + * improvement for the parser which reads the ~/.gman file (context.c). * internal method of displaying manual pages, not with xterm. Your comments and suggestions will be the most important for gman diff --git a/context.c b/context.c index 4f339a4..9c60bd0 100644 --- a/context.c +++ b/context.c @@ -122,7 +122,7 @@ void AppContext::restore_all() void AppContext::display_values() { - int i,j,k; + int i,j; printf("values:\n"); j = names->get_size(); for(i = 0; i"GhostView" and gman will present man pages with a -ghostview window for you to view and print the man page. +This requires GhostView (command "gv") to be available on your system. +.TP +.B LocalBrowse +gman will launch a Mozilla window to show you the man page. .sp -Tips: If you have netscape on your system, you may set -"View"->"LocalBrowse" and gman will launch a netscape window to show -you the man page. +This requires man2html and Mozilla (command "mozilla") to be available on your +system. +.TP +.B NetBrowse +In this mode, you can view the pages with Mozilla and navigate from +one man page to another by clicking the links in the man pages. .sp -Tips: If you have netscape and apache server running ( defult -cgi-bin directory is "/var/www/cgi-bin") , you may enjoy the full -NetBrowse mode by set "View"->"NetBrowse". In this mode, you can view -the pages with netscape browser and navigate from one man page to -another (by click the links in the man pages). This mode is very -useful. +This requires man2html, Mozilla (command "mozilla") and a HTTP server +running on localhost. .SH FILES .TP @@ -71,8 +78,13 @@ options avialiable. .BR man (1), .BR man (7), .BR xterm (1). + .SH AUTHOR .B Gman -was written by a smart gay named Xinkai Wang . Home page of gman is at: +was written by a smart guy named Xinkai Wang . +.PP +Home page of gman is at: .br -.I http://homex.coolconnect.com/user/xkwang/gman/ +.UR +http://homex.coolconnect.com/user/xkwang/gman/ +.UE diff --git a/gman.c b/gman.c index 52613fd..36cd661 100644 --- a/gman.c +++ b/gman.c @@ -42,13 +42,12 @@ TaskGroup * task_group; int main(int argc, char *argv[]) { GtkWidget *window; - pthread_t th_init_data; pthread_mutex_init(>k_lock,NULL); pthread_mutex_init(&context_lock,NULL); pthread_mutex_init(&loading_man_path_lock,NULL); init_context(); - debuging = (int)context->get_value("debuging"); + debuging = (long)context->get_value("debuging"); pthread_mutex_lock(>k_lock); gtk_init (&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); @@ -83,18 +82,18 @@ void init_context() context = new AppContext(); // context->set_default_value("v_size",(void*)400); context->set_default_value("debuging","int",(void*)0); - context->set_default_value("man_paths","char*",(void*)"/usr/man:/usr/local/man:/usr/X11R6/man"); + context->set_default_value("man_paths","char*",(void*)"/usr/share/man:/usr/X11R6/man:/usr/man:/usr/local/man"); context->set_default_value("display_section_policy","int",(void*)0); context->set_default_value("display_section","int",(void*)3); context->set_default_value("searching_mode","int",(void*)0); context->set_default_value("show_status_bar","int",(void*)0); context->set_default_value("show_warning","int",(void*)0); context->set_default_value("show_mode","int",(void*)0); // 0 = xterm, 1 = ghostview - context->set_default_value("xterm_command","char*",(void*)"xterm"); // rxvt, Eterm also works + context->set_default_value("xterm_command","char*",(void*)"x-terminal-emulator"); context->set_default_value("gv_command","char*",(void*)"gv"); - context->set_default_value("browser_command","char*",(void*)"netscape"); // kfm also works + context->set_default_value("browser_command","char*",(void*)"mozilla"); // kfm also works context->set_default_value("cgi_host","char*",(void*)"localhost"); - context->set_default_value("cgi_location","char*",(void*)"/cgi-bin/gman/gman.pl"); + context->set_default_value("cgi_location","char*",(void*)"/cgi-bin/gman.pl"); context->set_default_value("print_command","char*",(void*)"lpr"); // not in use attach(buffer,getenv("HOME"),".gman"); diff --git a/gman.pl b/gman.pl index 850e5af..052b7e8 100755 --- a/gman.pl +++ b/gman.pl @@ -1,18 +1,30 @@ -#!/usr/bin/perl -use strict(all); +#!/usr/bin/perl -w +use strict; -my $cgi_path = "/cgi-bin/gman/gman.pl"; -my $man2html = "man2html -M $cgi_path"; -my $path = `man -w @ARGV`; -my $tmp_file = "/tmp/gman.$ARGV[1].$ARGV[0]"; +if (@ARGV != 2) { + print <<_EOF_; +Content-type: text/html + +gman.pl: invalid use + +

gman.pl cannot be used without arguments.

+ +_EOF_ + die; +} +my $section = $ARGV[0]; # should also have some sanity check +my $name = $ARGV[1]; +my $man2html = "/usr/lib/cgi-bin/man/man2html"; +my $path = `man -w $section $name`; chomp $path; $path =~ s/\s*$//; -if (!&file_exist($path)) { - my $name = lc($ARGV[1]); - $path = `man -w $ARGV[0] $name`; -# print "check point 0.9\n"; +unless (-s "$path") { + warn "not -s $path\n"; + $name = lc $name; + $path = `man -w $section $name`; chomp $path; $path =~ s/\s*$//; } -if (!&file_exist($path)) { +unless (-s "$path") { + warn "not -s $path\n"; print <404 Not Found

Not Found

-The requested man page $ARGV[1]($ARGV[0]) was not found on this server.

+The requested man page $name($section) was not found on this server. end_of_line die; } -my $page; -if ($path =~ /gz$/) { - my $file = `gzip -cd $path`; - open (TEMPFILE,">$tmp_file"); - print TEMPFILE $file; - close (TEMPFILE); - $page = `$man2html $tmp_file`; - `rm $tmp_file`; -} else { - $page = `$man2html $path`; + +unless (-e "$man2html") { + warn "$man2html missing\n"; + print < + +man2html missing + +

man2html missing

+ +

You have to install man2html in order to use this mode in gman. + + +end_of_line + die; } -$page =~ s/This document was created by\s*man2html<\/A>,\s*using the manual pages.
/This document was created by -
man2html<\/A> for gman<\/A>, -using the manual pages.
/; +my $page = `$man2html $path`; + +# $page =~ s/^Content-type: text\/html\n\n// if (not run as cgi...); + +$page =~ s/(This document was created by\n
man2html<\/a>)(,\nusing the manual pages.
)/$1 for
gman<\/a>$2/io; + print $page; -#print `cat /home/wxk/src/gtk/gman.html`; - -sub file_exist { - open (FILE,$_[0]); - my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, - $atime,$mtime,$ctime,$blksize,$blocks) = stat(FILE); - close(FILE); - -# print "check point 0.5, size = $size, $_[0]\n"; - if ($size == 0 or $size eq null) { - return 0; - } else { - return 1; - } -} diff --git a/mandata.c b/mandata.c index 540b48c..94412a8 100644 --- a/mandata.c +++ b/mandata.c @@ -30,7 +30,6 @@ void attach (char *dest, const char *dirname, const char *name); static int section_translate_c_to_n(const char* c); -static int ManItemComp(ManItem ** a,ManItem ** b); static int is_zip_suffix(char* c); char buffer1[BUFFER_SIZE]; @@ -40,7 +39,6 @@ char buffer2[BUFFER_SIZE]; ManPath::ManPath(char* _path_name) { int i; - int len; active = 1; path_name = my_strdup(_path_name); for (i=0;id_name); //printf("LoadManPath: %s\n",name); val = stat (buffer1, &state); - if (val < 0) fprintf(stderr,"error number %d, in get state %s",errno,buffer1); + if (val < 0) fprintf(stderr,"error getting state of %s: %s\n",buffer1,strerror(errno)); else if (S_ISDIR(state.st_mode) && !strncmp(item->d_name,"man",3)) LoadManSubPath(item->d_name); else { @@ -151,7 +149,7 @@ int ManPath::LoadManSubPath(char * sub_name) attach(buffer1,buffer2,item->d_name); //printf("LoadManSubPath: %s\n",full_name); val = stat (buffer1, &state); - if (val < 0) fprintf(stderr,"error number %d, in get state %s\n",errno,buffer1); + if (val < 0) fprintf(stderr,"error getting state of %s: %s\n",buffer1,strerror(errno)); else if (S_ISDIR(state.st_mode)) continue; else { @@ -166,6 +164,7 @@ int ManPath::LoadManSubPath(char * sub_name) } } closedir(dirp); + return 0; } ManItem * ManPath::search_man_item(char * name, char * sect) @@ -236,15 +235,15 @@ void * ManItem::get_man_path() {return (void *)man_path;} void ManItem::active_man_page(void) { - int i; int len; char buffer[2*BUFFER_SIZE]; char loc_name[BUFFER_SIZE]; char buffer2[BUFFER_SIZE]; - switch ((int)context->get_value("show_mode")) { + switch ((long)context->get_value("show_mode")) { case 0: - sprintf(buffer,"%s -T '%s manual page' -n GMan -e man ", + sprintf(buffer,"%s -T '%s manual page' -n '%s - GMan' -e man ", (char*)context->get_value("xterm_command"), + get_display_name(buffer1), get_display_name(buffer1)); len = strlen(buffer); attach(buffer+len,man_path->GetPath(),file_name); @@ -295,6 +294,7 @@ void ManItem::active_man_page(void) strcat(buffer,loc_name); strcat(buffer," ; rm ~/.gman.tmp ; sleep 120; rm "); strcat(buffer,loc_name); + fprintf(stderr, "running: %s\n", buffer); g_warning(buffer); if(!fork()) { @@ -307,7 +307,7 @@ void ManItem::active_man_page(void) case 2: sprintf(loc_name," ~/.gman.%s.html ",get_display_name(buffer1)); //g_warning(loc_name); - strcpy(buffer,"gman.cgi "); + strcpy(buffer,"/usr/lib/cgi-bin/gman.pl "); strcat(buffer," "); strcat(buffer,get_section_name(buffer2)); strcat(buffer," "); @@ -320,6 +320,7 @@ void ManItem::active_man_page(void) strcat(buffer,loc_name); strcat(buffer," ; sleep 120; rm "); strcat(buffer,loc_name); + fprintf(stderr, "running: %s\n", buffer); //g_warning(buffer); if(!fork()) { @@ -339,6 +340,7 @@ void ManItem::active_man_page(void) strcat(buffer,"+"); strcat(buffer,get_display_name(loc_name)); strcat(buffer,"\""); + fprintf(stderr, "running: %s\n", buffer); //g_warning(buffer); if(!fork()) { @@ -349,7 +351,7 @@ void ManItem::active_man_page(void) break; default: if(context->get_value("show_warning")) - g_print("unexpected \'show_mode\' : %d ",(int)context->get_value("show_mode")); + g_print("unexpected \'show_mode\' : %ld ",(long)context->get_value("show_mode")); return; } //g_warning(buffer); diff --git a/menu.c b/menu.c index 3a455a4..9ac4e3c 100644 --- a/menu.c +++ b/menu.c @@ -33,8 +33,6 @@ #include "window2.h" #include "taskfunc.h" -static int print_hello(GtkWidget *w, gpointer data); -static int test_callback(GtkWidget *w, gpointer data); static int window_resize_callback(GtkWidget *w, GtkAllocation *size, gpointer data); static int section_policy_callback(GtkWidget *w, gpointer data); static int section_select_callback(GtkWidget *w, gpointer data); @@ -60,36 +58,35 @@ static int button_clicked_callback(GtkWidget *,gpointer); static GtkItemFactoryEntry menu_items[] = { {"/_File", NULL, NULL, 0, ""}, - {"/File/_Quit", "Q", (void (*)(...))app_quit, 0, NULL}, + {"/File/_Quit", "Q", (void (*)())app_quit, 0, NULL}, {"/_Sections", NULL, NULL, 0, ""}, {"/Sections/tearoff1", NULL, NULL, 0, "" }, - {"/Sections/_All", NULL, (void (*)(...))section_policy_callback, 0, ""}, - {"/Sections/all _But", NULL, (void (*)(...))section_policy_callback, 1, "/Sections/All"}, - {"/Sections/_Only", NULL, (void (*)(...))section_policy_callback, 2, "/Sections/All"}, + {"/Sections/_All", NULL, (void (*)())section_policy_callback, 0, ""}, + {"/Sections/all _But", NULL, (void (*)())section_policy_callback, 1, "/Sections/All"}, + {"/Sections/_Only", NULL, (void (*)())section_policy_callback, 2, "/Sections/All"}, {"/Sections/sep1", NULL, NULL, 0, ""}, - {"/Sections/_1: User Commands", NULL, (void (*)(...))section_select_callback, 1<<0, ""}, - {"/Sections/_2: System Calls", NULL, (void (*)(...))section_select_callback, 1<<1, ""}, - {"/Sections/_3: Subroutines", NULL, (void (*)(...))section_select_callback, 1<<2, ""}, - {"/Sections/_4: Devices", NULL, (void (*)(...))section_select_callback, 1<<3, ""}, - {"/Sections/_5: File Formats", NULL, (void (*)(...))section_select_callback, 1<<4, ""}, - {"/Sections/_6: Games", NULL, (void (*)(...))section_select_callback, 1<<5, ""}, - {"/Sections/_7: Miscellaneous", NULL, (void (*)(...))section_select_callback, 1<<6, ""}, - {"/Sections/_8: Sys.Administration",NULL, (void (*)(...))section_select_callback, 1<<7, ""}, - {"/Sections/_l: Local", NULL, (void (*)(...))section_select_callback, 1<<8, ""}, - {"/Sections/_n: New", NULL, (void (*)(...))section_select_callback, 1<<9, ""}, + {"/Sections/_1: User Commands", NULL, (void (*)())section_select_callback, 1<<0, ""}, + {"/Sections/_2: System Calls", NULL, (void (*)())section_select_callback, 1<<1, ""}, + {"/Sections/_3: Subroutines", NULL, (void (*)())section_select_callback, 1<<2, ""}, + {"/Sections/_4: Devices", NULL, (void (*)())section_select_callback, 1<<3, ""}, + {"/Sections/_5: File Formats", NULL, (void (*)())section_select_callback, 1<<4, ""}, + {"/Sections/_6: Games", NULL, (void (*)())section_select_callback, 1<<5, ""}, + {"/Sections/_7: Miscellaneous", NULL, (void (*)())section_select_callback, 1<<6, ""}, + {"/Sections/_8: Sys.Administration",NULL, (void (*)())section_select_callback, 1<<7, ""}, + {"/Sections/_l: Local", NULL, (void (*)())section_select_callback, 1<<8, ""}, + {"/Sections/_n: New", NULL, (void (*)())section_select_callback, 1<<9, ""}, {"/_View", NULL, NULL, 0, ""}, - {"/View/x_Term", "T", (void (*)(...))show_mode_callback, 0, ""}, - {"/View/_GhostView", "G", (void (*)(...))show_mode_callback, 1, "/View/xTerm"}, - {"/View/_LocalBrowse", "L", (void (*)(...))show_mode_callback, 2, "/View/xTerm"}, - {"/View/_NetBrowse", "N", (void (*)(...))show_mode_callback, 3, "/View/xTerm"}, + {"/View/x_Term", "T", (void (*)())show_mode_callback, 0, ""}, + {"/View/_GhostView", "G", (void (*)())show_mode_callback, 1, "/View/xTerm"}, + {"/View/_LocalBrowse", "L", (void (*)())show_mode_callback, 2, "/View/xTerm"}, + {"/View/_NetBrowse", "N", (void (*)())show_mode_callback, 3, "/View/xTerm"}, {"/_Options", NULL, NULL, 0, ""}, - {"/Options/Status bar", NULL, (void (*)(...))status_bar_callback, 0, ""}, + {"/Options/Status bar", NULL, (void (*)())status_bar_callback, 0, ""}, {"/Options/sep1", NULL, NULL, 0, ""}, - {"/Options/_Index search", "I", (void (*)(...))search_mode_callback, 0, ""}, - {"/Options/_Key word search", "K", (void (*)(...))search_mode_callback, 1, "/Options/Index search"}, + {"/Options/_Index search", "I", (void (*)())search_mode_callback, 0, ""}, + {"/Options/_Key word search", "K", (void (*)())search_mode_callback, 1, "/Options/Index search"}, {"/Options/sep2", NULL, NULL, 0, ""}, - {"/Options/Man _Paths...", NULL, (void (*)(...))edit_paths_callback, 0, NULL}, - // {"/Options/Test", NULL, (void (*)(...))test_callback, 0, NULL}, + {"/Options/Man _Paths...", NULL, (void (*)())edit_paths_callback, 0, NULL}, {"/_Help", NULL, NULL, 0, ""}, {"/_Help/About", NULL, GTK_SIGNAL_FUNC(window_help_about_callback),0,NULL} }; @@ -116,7 +113,7 @@ char * *man_items_buffer; int man_items_count; int clist_selected_row; List * man_paths_to_be_load; -char * keyword; +const char * keyword; void updata_menu_buttons(int); @@ -144,7 +141,8 @@ void get_main_menu(GtkWidget *window, GtkWidget ** menubar) { gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); /* Attach the new accelerator group to the window. */ - gtk_accel_group_attach (accel_group, GTK_OBJECT (window)); +/* gtk_accel_group_attach (accel_group, GTK_OBJECT (window)); */ + gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); if (menubar) /* Finally, return the actual menu bar created by the item factory. */ @@ -176,32 +174,32 @@ void get_main_menu(GtkWidget *window, GtkWidget ** menubar) { /*flag = 0 means not to invoke call backs when changing the states of buttons.*/ void updata_menu_buttons(int flag) { - int i,j,k,k2; - k = (int)context->get_value("display_section_policy"); + long i,j,k,k2; + k = (long)context->get_value("display_section_policy"); if(k>0 && k<=2) if(!((GtkCheckMenuItem*)(section_select[k]))->active){ if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_select[k]),1); } - k = (int)context->get_value("display_section"); + k = (long)context->get_value("display_section"); for (i = 0;i<10;i++) if(!(k&(1<active)) { if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_buttons[i]),k&(1<get_value("searching_mode"); + k = (long)context->get_value("searching_mode"); if(k>0 && k<=1) if(!(((GtkCheckMenuItem*)(searching_mode_buttons[k]))->active)) { if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(searching_mode_buttons[k]),1); } - k = (int)context->get_value("show_mode"); + k = (long)context->get_value("show_mode"); if(k>0 && k<=3) if(!(((GtkCheckMenuItem*)(show_mode_buttons[k]))->active)) { if(!flag) signal_menu_change++; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_mode_buttons[k]),1); } - k2 = (int)context->get_value("show_status_bar"); + k2 = (long)context->get_value("show_status_bar"); i = k2&(1<active); if((i&&!j) || (!i&&j)) { @@ -223,10 +221,10 @@ static GtkWidget *statusbar2; static void updata_widget_show(int flag) { - int k,k2; + long k,k2; - k = (int)context->get_value("searching_mode"); - k2 = (int)context->get_value("show_status_bar"); + k = (long)context->get_value("searching_mode"); + k2 = (long)context->get_value("show_status_bar"); if(k2&(1<get_value("h_size"), - (int)context->get_value("v_size")); + (long)context->get_value("h_size"), + (long)context->get_value("v_size")); gtk_widget_set_usize(GTK_WIDGET(window),200,150); main_vbox = gtk_vbox_new(FALSE, 1); @@ -386,7 +382,8 @@ void init_main_window(GtkWidget * window) /******************* tools functions ******************/ -int search_array_for_text(char ** array, int count, char * text) +/*int search_array_for_text(char ** array, int count, char * text) */ +int search_array_for_text(char ** array, int count, const char * text) { int i; for (i=0;i0 ;i++); @@ -423,8 +420,8 @@ void entry_activate_callback(GtkWidget * w,gpointer data) int i; GtkWidget * clist = (GtkWidget *)data; i = search_array_for_text(man_items_buffer, - man_items_count, - gtk_entry_get_text(GTK_ENTRY(w))); + man_items_count, + gtk_entry_get_text(GTK_ENTRY(w))); if (i == -1) return; gtk_clist_moveto(GTK_CLIST(clist),i,0,0.1,0.0); GTK_CLIST(clist)->focus_row = i; @@ -446,54 +443,32 @@ void entry_changed_callback(GtkWidget * w,gpointer data) gtk_clist_select_row(GTK_CLIST(clist),i,0); } -static int print_hello(GtkWidget *w, gpointer data) { - if(signal_menu_change>0) {signal_menu_change--;return 1;} - g_message("Hello, World! %x\n",data); - return 0; -} - -static int print_page(GtkWidget *w, gpointer data) { - if(signal_menu_change>0) {signal_menu_change--;return 1;} - g_message("Hello, World! %x\n",data); - return 0; -} - -static int test_callback(GtkWidget *w, gpointer data) { - int i,j; - if(signal_menu_change>0) {signal_menu_change--;return 1;} - j = man_paths->get_size(); - for(i = 0;iget_value(i))); - delete (man_paths); - init_man_data(); - return 0; -} - static int section_policy_callback(GtkWidget *w, gpointer data) { // static int signal; - int k,k2; - k2 = (int) data; + long k,k2; + k2 = (long) data; if(!((GtkCheckMenuItem*)(section_select[k2]))->active) return 1; // g_message("Hello, World! %x\n signal = %d",data,signal_menu_change); if(signal_menu_change>0) {signal_menu_change--;return 1;} //if(!signal) {signal++;return 1;} //signal--; - k = (int) context->get_value("display_section_policy"); + k = (long) context->get_value("display_section_policy"); if(k == k2) return 1; pthread_mutex_lock(&context_lock); context->set_value("display_section_policy","int",(void*)k2); pthread_mutex_unlock(&context_lock); task_set_active(task_extract_man_data); task_set_active(task_add_data_to_clist); + return 0; } static int section_select_callback(GtkWidget *w, gpointer data) { - int var; + long var; if(signal_menu_change>0) {signal_menu_change--;return 1;} pthread_mutex_lock(&context_lock); - var = (int)context->get_value("display_section"); - var ^= (int)data; + var = (long)context->get_value("display_section"); + var ^= (long)data; context->set_value("display_section","int",(void*)var); if (context->get_value("display_section_policy")) { task_set_active(task_extract_man_data); @@ -501,6 +476,7 @@ static int section_select_callback(GtkWidget *w, gpointer data) { } pthread_mutex_unlock(&context_lock); // g_message("Hello, World! %x\n",data); + return 0; } static void app_quit(GtkWidget *w, gpointer data) { @@ -517,12 +493,12 @@ static void app_quit(GtkWidget *w, gpointer data) { context->set_value("man_paths","char*",my_strdup(buffer)); attach(buffer,getenv("HOME"),".gman"); if((fd = fopen(buffer,"w"))) { - context->save(fd,"automatically made by G-man"); + context->save(fd,"automatically made by Gman"); fclose(fd); } - // context->save(stdout,"automatically made by G-man"); + // context->save(stdout,"automatically made by Gman"); - gtk_exit((int)data); + gtk_exit((long)data); } static int window_resize_callback(GtkWidget *w, GtkAllocation * size, gpointer data) @@ -544,7 +520,6 @@ static void window_help_about_callback (GtkWidget *widget, gpointer data) { GtkWidget *button; - GdkFont *font; about_window = gtk_dialog_new (); gtk_window_set_position (GTK_WINDOW (about_window), GTK_WIN_POS_MOUSE); @@ -576,6 +551,12 @@ static void window_help_about_callback (GtkWidget *widget, gpointer data) gtk_label_new ("Copyright (C) 1999 Xinkai Wang"), FALSE, FALSE, 5); + char *tmp = g_strdup_printf("Credits: %s", authors[0]); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (about_window)->vbox), + gtk_label_new (tmp), + FALSE, FALSE, 5); + g_free(tmp); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (about_window)->vbox), gtk_label_new ("Comments and suggestions are extremely welcomed!"), FALSE, FALSE, 5); @@ -594,10 +575,10 @@ static void window_help_about_callback (GtkWidget *widget, gpointer data) static int status_bar_callback (GtkWidget *widget, gpointer data) { - int k,k2; + long k,k2; if(signal_menu_change>0) {signal_menu_change--;return 1;} - k2 = (int) context->get_value("show_status_bar"); - k = (int) context->get_value("searching_mode"); + k2 = (long) context->get_value("show_status_bar"); + k = (long) context->get_value("searching_mode"); if(((GtkCheckMenuItem*)(status_bar_button))->active) k2 = k2 | (1<active) return 1; if(signal_menu_change>0) {signal_menu_change--;return 1;} //if(!signal) {signal++;return 1;} //signal--; - k = (int) context->get_value("searching_mode"); + k = (long) context->get_value("searching_mode"); if(k == k2) return 1; pthread_mutex_lock(&context_lock); context->set_value("searching_mode","int",(void*)k2); @@ -627,13 +608,13 @@ static int search_mode_callback (GtkWidget *widget, gpointer data) static int show_mode_callback (GtkWidget *widget, gpointer data) { - int k,k2; - k2 = (int) data; + long k,k2; + k2 = (long) data; if(!((GtkCheckMenuItem*)(show_mode_buttons[k2]))->active) return 1; if(signal_menu_change>0) {signal_menu_change--;return 1;} //if(!signal) {signal++;return 1;} //signal--; - k = (int) context->get_value("show_mode"); + k = (long) context->get_value("show_mode"); if(k == k2) return 1; pthread_mutex_lock(&context_lock); context->set_value("show_mode","int",(void*)k2); @@ -651,7 +632,7 @@ static void entry4_activate_callback(GtkWidget *w,gpointer data) static void entry4_changed_callback(GtkWidget *w,gpointer data) { - char * tmp; + const char * tmp; tmp = gtk_entry_get_text(GTK_ENTRY(entry4)); gtk_widget_set_sensitive(search_button,strlen(tmp) >= 3); @@ -659,9 +640,10 @@ static void entry4_changed_callback(GtkWidget *w,gpointer data) static int button_clicked_callback(GtkWidget * w,gpointer data) { - int i = (int) data; + long i = (long) data; switch (i) { case 1: task_set_stop(task_key_word_search);break; case 2: task_set_active(task_key_word_search);break; } + return 0; } diff --git a/task.c b/task.c index 2ffedf0..6124f95 100644 --- a/task.c +++ b/task.c @@ -30,7 +30,7 @@ static void task_group_set_active(TaskGroup *); TaskGroup * task_group_new() { - int retcode; + //int retcode; TaskGroup * task_group = (TaskGroup*)g_malloc(sizeof(TaskGroup)); task_group->tasks = new List; task_group->state = 0; @@ -44,7 +44,7 @@ TaskGroup * task_group_new() Task * task_new(TaskGroup * task_group, float priority, TaskRunFunc task_func, gpointer data) { - int i,j,k; + int i,j; Task * task; g_return_val_if_fail((priority>0.0 && priority <1.0)&&(task_group != NULL)&&(task_func != NULL),(Task*)NULL); @@ -106,18 +106,18 @@ static void * task_group_running(TaskGroup * task_group) { int i,j; int have_task; - int state,k; + int state; Task * task; do { have_task = 0; task = (Task *)NULL; - int flag; + long flag = 0; pthread_mutex_lock(&task_group->lock); j = task_group->tasks->get_size(); for(i = 0; itasks->get_item(i))->signals[0]->get_size()) { - flag = ((int)task->signals[0]->get_item(0) & ~1) | (task->state & 1); + flag = ((long)task->signals[0]->get_item(0) & ~1) | (task->state & 1); task->signals[0]->delete_item(0); have_task++; } @@ -126,7 +126,7 @@ static void * task_group_running(TaskGroup * task_group) have_task++; } else if (task->signals[1]->get_size()) { - flag = ((int)task->signals[1]->get_item(1) & ~1); + flag = ((long)task->signals[1]->get_item(1) & ~1); task->signals[1]->delete_item(0); have_task++; } diff --git a/taskfunc.c b/taskfunc.c index 82025cd..dd7b102 100644 --- a/taskfunc.c +++ b/taskfunc.c @@ -18,7 +18,6 @@ /********************* init_man_data *************************/ int init_man_data() { - ManPath * path; char * path_name,*p1,*p2; int end = 0; man_paths = new Dictionary; @@ -42,10 +41,10 @@ int extract_man_data() int display_section_ID; pthread_mutex_lock(&context_lock); - switch ((int)context->get_value("display_section_policy")) { + switch ((long)context->get_value("display_section_policy")) { case 0: display_section_ID = ~0;break; - case 1: display_section_ID = ~(int)(context->get_value("display_section"));break; - case 2: display_section_ID = (int)context->get_value("display_section"); break; + case 1: display_section_ID = ~(long)(context->get_value("display_section"));break; + case 2: display_section_ID = (long)context->get_value("display_section"); break; default: fprintf(stderr,"warning: init_man_data: \"display_section_policy\" " "have invalid value %d",context->get_value("display_section_policy")); display_section_ID = ~0; @@ -73,11 +72,10 @@ int add_data_to_clist(int flag) { gchar *text[2]; static int i; - int j,k; + int j; ManItem ** buffer; static char ** pointer; char a[100],b[20]; - int display_section_ID; text[0] = a; text[1] = b; buffer = (ManItem**) man_items_buffer; @@ -160,9 +158,9 @@ static char section[BUF_SIZE/4]; static int parser_whatis(int fd) { static int init = 0; - int i,j,k,end; + int i,k,end; static char buffer[BUF_SIZE]; - char a,b,c; + char c; if(!init) { names = new List; @@ -285,7 +283,6 @@ List * keyword_search_list; static int key_word_search_taskfunc(int flag) { static int init = 0; - static char * parameter; static int process_ID; static int pipes[2]; static List * paths; @@ -335,12 +332,10 @@ static int key_word_search_taskfunc(int flag) } else { path = (char*) paths->get_item(0); paths->delete_item(0); - strcpy(buffer,"grep "); + strcat(buffer,"whatis -w \"*"); strcat(buffer,keyword); - strcat(buffer," "); - attach(file_name,path,"whatis"); - strcat(buffer,file_name); - strcat(buffer," "); + strcat(buffer,"*\" "); + fprintf (stderr, "%s\n", file_name); g_return_val_if_fail(!pipe(pipes),0); process_ID = fork(); @@ -377,7 +372,8 @@ static int key_word_search_taskfunc(int flag) man_item = (ManItem*)man_path->search_man_item(s,section); //g_print("point 1\n"); if(context->get_value("show_warning")) - if (!man_item) g_warning("man item: %s (%s) could not found",names->get_item(i),section); + if (!man_item) + g_warning("man item: %s (%s) could not be found in %s",names->get_item(i),section,path); text[0] = (char*)names->get_item(i); //g_print("point 2\n"); if(i == j-1) text[2] = comment; diff --git a/util.c b/util.c index 24c36f3..bdcc32f 100644 --- a/util.c +++ b/util.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "util.h" #include "gripedefs.h" diff --git a/window2.c b/window2.c index bda5ec9..c90a19d 100644 --- a/window2.c +++ b/window2.c @@ -2,6 +2,7 @@ /******************** window2.c **************************/ #include +#include #include #include "menu.h" #include "list.h" @@ -222,7 +223,7 @@ static int window2_button_callback(GtkWidget *w, gpointer data) GtkWidget * x, *apply_button,*add_new_button; gchar * c, *c2; int i; - int select = (int)data; + long select = (long)data; gchar * clist_item[3]; // printf("point2 data = %d\n",select); apply_button = (GtkWidget*)gtk_object_get_data(GTK_OBJECT(window2),"button2"); @@ -239,9 +240,9 @@ static int window2_button_callback(GtkWidget *w, gpointer data) break; case 3: //Add New x = (GtkWidget*)gtk_object_get_data(GTK_OBJECT(window2),"entry2"); - c = gtk_entry_get_text(GTK_ENTRY(x)); + c = (gchar *)gtk_entry_get_text(GTK_ENTRY(x)); if(!strcmp(c,"")) { - g_print("g-man: path name can not be empty\n"); + g_print("gman: path name can not be empty\n"); break; } if (man_paths->have_item(c)) break; @@ -268,7 +269,7 @@ static int window2_button_callback(GtkWidget *w, gpointer data) gtk_widget_set_sensitive(apply_button,1); break; default: - g_print("g-man: sorry... this function not implementd yet, please wait for the future version\n"); + g_print("gman: sorry... this function not implemented yet\n"); }; return 1; } debian/patches/sensible-browser.patch0000644000000000000000000000316211700626416015130 0ustar Author: Osamu Aoki Description: Use sensible-browser --- a/gman.1x +++ b/gman.1x @@ -41,16 +41,16 @@ This requires GhostView (command "gv") to be available on your system. .TP .B LocalBrowse -gman will launch a Mozilla window to show you the man page. +gman will launch a web browser window to show you the man page. .sp -This requires man2html and Mozilla (command "mozilla") to be available on your +This requires man2html and web browser (command "sensible-browser") to be available on your system. .TP .B NetBrowse -In this mode, you can view the pages with Mozilla and navigate from +In this mode, you can view the pages with web browser and navigate from one man page to another by clicking the links in the man pages. .sp -This requires man2html, Mozilla (command "mozilla") and a HTTP server +This requires man2html, web browser (command "sensible-browser") and a HTTP server running on localhost. .SH FILES --- a/gman.c +++ b/gman.c @@ -91,7 +91,7 @@ context->set_default_value("show_mode","int",(void*)0); // 0 = xterm, 1 = ghostview context->set_default_value("xterm_command","char*",(void*)"x-terminal-emulator"); context->set_default_value("gv_command","char*",(void*)"gv"); - context->set_default_value("browser_command","char*",(void*)"mozilla"); // kfm also works + context->set_default_value("browser_command","char*",(void*)"sensible-browser"); // kfm also works context->set_default_value("cgi_host","char*",(void*)"localhost"); context->set_default_value("cgi_location","char*",(void*)"/cgi-bin/gman.pl"); context->set_default_value("print_command","char*",(void*)"lpr"); // not in use debian/patches/manpath.patch0000644000000000000000000000240111700631667013272 0ustar Author: Osamu Aoki Description: Adjust manpath to current values --- a/gman.1x +++ b/gman.1x @@ -74,7 +74,7 @@ .br show_warning = 0 .br -man_paths = /usr/man:/usr/local/man:/usr/X11R6/man +man_paths = /usr/local/man:/usr/local/share/man:/usr/share/man .sp For more information, see init_context() function in gman.c for all the options avialiable. --- a/gman.c +++ b/gman.c @@ -82,7 +82,7 @@ context = new AppContext(); // context->set_default_value("v_size",(void*)400); context->set_default_value("debuging","int",(void*)0); - context->set_default_value("man_paths","char*",(void*)"/usr/share/man:/usr/X11R6/man:/usr/man:/usr/local/man"); + context->set_default_value("man_paths","char*",(void*)"/usr/local/man:/usr/local/share/man:/usr/share/man"); context->set_default_value("display_section_policy","int",(void*)0); context->set_default_value("display_section","int",(void*)3); context->set_default_value("searching_mode","int",(void*)0); --- a/t2.c +++ b/t2.c @@ -744,7 +744,7 @@ item_list_length = 0; item_list_count = 0; - man_paths = new ManPath("/usr/X11/man/"); + man_paths = new ManPath("/usr/share/man/"); printf("GetSize = %d\n",man_paths->GetSize('a')); item_list_length = item_list_count = man_paths->GetSize('a'); debian/patches/series0000644000000000000000000000017611705551566012051 0ustar pre-0.9.3-5.1.patch sensible-browser.patch evince.patch manpath.patch gnome-terminal.patch fix-ftbfs-with-binutils-gold.patch debian/source/0000755000000000000000000000000011700627650010472 5ustar debian/source/options0000644000000000000000000000005711700627650012112 0ustar extend-diff-ignore = "(^|/)(.*\.org|.*\.rej)$" debian/source/format0000644000000000000000000000001511700614336011676 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000157411700633576010265 0ustar #!/usr/bin/make -f # Derived from debhelper's sample rules file. #export DH_VERBOSE=1 ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" "" DEBUG := -g endif build-arch: build build-indep: build build: gman gman: dh_testdir $(MAKE) DEBUG="$(DEBUG)" clean: dh_testdir dh_testroot $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep $(MAKE) install prefix=$(CURDIR)/debian/gman/usr binary-indep: # There are no architecture-independent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs README AUTHORS dh_installmenu dh_installchangelogs ChangeLog ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "" dh_strip endif dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install build-arch build-indep debian/copyright0000644000000000000000000000145511700623304011122 0ustar This package was first debianized by Josip Rodin on Tue, 12 Oct 1999 14:31:42 +0200. It was downloaded from: http://homex.coolconnect.com/user/xkwang/gman/ Upstream author: Xinkai Wang . Copyright (C) 1999 Xinkai Wang This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The full text of the GNU GPL can be found in /usr/share/common-licenses/GPL. debian/menu0000644000000000000000000000010711700623304010047 0ustar ?package(gman): needs="X11" section="Help" title="Gman" command="gman" debian/control0000644000000000000000000000223511705552070010575 0ustar Source: gman Section: doc Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Josip Rodin Build-Depends: debhelper (>= 8), libglib2.0-dev, libgtk2.0-dev Standards-Version: 3.9.2 Package: gman Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, man-db, xterm | x-terminal-emulator Suggests: gv, man2html, httpd, sensible-browser, evince Provides: man-browser Description: small man(1) front-end for X Gman is a simple front-end for the manual page system. The most basic job of gman is to build a database for all the man pages and display them (or part of them) on the screen. When user decides to read a man page, gman will launch an external viewer to display the manual page. More than one external viewer windows can be launched at the same time. . The default manual page viewer is a terminal window with the original man(1). It can also launch gv, evince, or a link to a CGI script which utilizes man2html, for viewing manual pages using a web browser. . There is an index search function to look for the man pages that one needs. It's simple, but it's useful. debian/watch0000644000000000000000000000003511700633432010214 0ustar # no upstream available now. debian/changelog0000644000000000000000000001313411705552077011053 0ustar gman (0.9.3-5.2ubuntu1) precise; urgency=low * Merge from Debian testing. Remaining changes: - Reorder libraries to fix FTBFS with ld --as-needed -- Angel Abad Wed, 18 Jan 2012 15:15:05 +0100 gman (0.9.3-5.2) unstable; urgency=low * Non-maintainer upload. * Switched from mozilla to sensible-browser. * Added evince as choice since this is gnome/GTK+ app. * Updated manpath default values to current situation. * Updated policy version, used 3.0 (quilt) format, and made some lintian touch-ups. -- Osamu Aoki Wed, 04 Jan 2012 00:48:23 +0900 gman (0.9.3-5.1ubuntu1) oneiric; urgency=low * Reorder libraries to fix FTBFS with ld --as-needed (LP: #770780) -- Angel Abad Fri, 19 Aug 2011 19:10:26 +0200 gman (0.9.3-5.1) unstable; urgency=low * Non-maintainer upload. * Build with Gtk2. (Closes: #515288). -- Barry deFreese Tue, 24 Feb 2009 14:58:55 -0500 gman (0.9.3-5) unstable; urgency=medium * Replaced 'gtk-config --libs' call with a condensed list of library dependencies, the new dpkg-shlibdeps caught a fair few extra ones in there. * Fixed debug option handling to actually work (?!). * (Also fixes the lack of ldbl glib dependency on amd64, caused by my hybrid system.) -- Josip Rodin Sat, 22 Mar 2008 15:18:28 +0100 gman (0.9.3-4) unstable; urgency=low * Included page name in terminal's icon name as well as the title, thanks to Norbert Buchmuller, closes: #390424. * Removed '-s' from install(1) invocations in order to properly support the nostrip build mode, closes: #437045. * Removed a completely unnecessary #include and the libjpeg62-dev build-dependency - gman simply doesn't use anything from there. * Intercept the complete lack of man2html in gman.pl, closes: #248501. * Upped DH_COMPAT and debhelper build-dependency to 5 (no changes). * Dropped old FSF address from the copyright file. * Upped standards version to 3.7.2 (no changes). * Side-note: gman could use 'man -H' instead of its own forking of a browser with man2html, but that generates slightly different output with no links and requires psutils and netpbm to get tables (and even then they don't work, cf. #335411). -- Josip Rodin Sun, 16 Mar 2008 22:54:42 +0100 gman (0.9.3-3) unstable; urgency=low * (Restoring package after it was removed by #328541.) * Applied Andreas Jochens' patch that fixes numerous broken casts, closes: #297177. * Updated man2html path, and fixed up the Description, thanks to Justin B Rye, closes: #317564. * Removed xlibs-dev build dependency. -- Josip Rodin Sun, 26 Feb 2006 01:46:36 +0100 gman (0.9.3-2) unstable; urgency=low * Recompiled with new maintainer address, new gcc, new standards version. -- Josip Rodin Thu, 3 Jul 2003 00:56:58 +0200 gman (0.9.3-1) unstable; urgency=low * New upstream version, closes: #156493. * Severe hacking around the CGI crap. -- Josip Rodin Tue, 13 Aug 2002 15:28:34 +0200 gman (0.0.8-6) unstable; urgency=low * Added patches kindly provided by Gergely Nagy to make it compile with GCC 3.0 on i386 and hppa, closes: #104806. We'll see about the rest. * Polishing. -- Josip Rodin Sat, 14 Jul 2001 17:29:38 +0200 gman (0.0.8-5) unstable; urgency=low * Added libjpeg62-dev to build-dependencies, closes: #76913. -- Josip Rodin Sun, 19 Nov 2000 20:21:50 +0100 gman (0.0.8-4) unstable; urgency=low * Added Provides: man-browser. * Clarified the error message when a manual page can't be found (2=ENOENT). The listed file may exist, but it is a broken symlink in the end. Considering man-db also displays such messages, this closes: #50444. * Partially fixed sorting thanks to Paul Harris , closes: #75282. I don't know how I didn't notice that this doesn't work. :/ If you have n defined manpaths, it will give 1 clickable result and n-1 copies, clicking on which will fail. Oh well. At least the warning message will display in which directory it failed. :) * Policy 3.2.1 compliance. -- Josip Rodin Fri, 28 Jan 2000 18:24:19 +0100 gman (0.0.8-3) unstable; urgency=low * Depend on 'xterm | x-terminal-emulator', invoke x-terminal-emulator by default, closes: #50484. * Fix the default manpath. * Standards-Version: 3.1.1. Added Build-Depends:. -- Josip Rodin Sun, 28 Nov 1999 18:04:49 +0100 gman (0.0.8-2) unstable; urgency=low * Fixed discarding a const in window2.c, the one-liner kindly provided by Edward Brocklesby (larne), closes: #50345. -- Josip Rodin Wed, 17 Nov 1999 11:36:33 +0100 gman (0.0.8-1) unstable; urgency=low * Initial Release. * menu.c: replaced GNOMEized "About" menu entry with GTK+ code, to remove the dependency on GNOME libs (which is pointless). Removed tiny GNOME references from the rest of the code. * Makefile: various portability changes. Used some nifty shortcuts to reduce it twice in size. * gman.c: added usr/share/man to default manpath. * mandata.c: appended ' manual page' to the XTerm window title. * Various spelling/style/grammar fixes in the documentation. * Lots of small fixes in *.c to clean up warnings with "-Wall". * Changed all references to "G-man" to "Gman", as that is the real name. * Wrote gman.1x manual page. -- Josip Rodin Tue, 12 Oct 1999 14:31:42 +0200 debian/compat0000644000000000000000000000000211657743732010403 0ustar 8