4 |
|
|
5 |
# Source file position: <groff-source>/contrib/groffer/groffer.sh |
# Source file position: <groff-source>/contrib/groffer/groffer.sh |
6 |
|
|
7 |
# Copyright (C) 2001,2002,2003,2004 Free Software Foundation, Inc. |
# Copyright (C) 2001,2002,2003,2004,2005 Free Software Foundation, Inc. |
8 |
# Written by Bernd Warken |
# Written by Bernd Warken |
9 |
|
|
10 |
# This file is part of groff version @VERSION@. |
# This file is part of groff version @VERSION@. |
25 |
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
26 |
|
|
27 |
_PROGRAM_NAME='groffer'; |
_PROGRAM_NAME='groffer'; |
28 |
_PROGRAM_VERSION='0.9.12'; |
_PROGRAM_VERSION='0.9.13'; |
29 |
_LAST_UPDATE='15 November 2004'; |
_LAST_UPDATE='17 May 2005'; |
30 |
|
|
31 |
|
|
32 |
######################################################################## |
######################################################################## |
264 |
export _VIEWER_PS; # viewer program for ps mode |
export _VIEWER_PS; # viewer program for ps mode |
265 |
export _VIEWER_HTML_X; # viewer program for html mode in X |
export _VIEWER_HTML_X; # viewer program for html mode in X |
266 |
export _VIEWER_HTML_TTY; # viewer program for html mode in tty |
export _VIEWER_HTML_TTY; # viewer program for html mode in tty |
267 |
_VIEWER_DVI='xdvi,dvilx'; |
_VIEWER_DVI='kdvi,xdvi,dvilx'; |
268 |
_VIEWER_PDF='xpdf,acroread'; |
_VIEWER_PDF='kghostview,ggv,xpdf,acroread,kpdf'; |
269 |
_VIEWER_PS='gv,ghostview,gs_x11,gs'; |
_VIEWER_PS='kghostview,ggv,gv,ghostview,gs_x11,gs'; |
270 |
_VIEWER_HTML='konqueror,mozilla,netscape,opera,amaya,arena,lynx'; |
_VIEWER_HTML='konqueror,mozilla,netscape,opera,amaya,arena,lynx'; |
271 |
_VIEWER_X='gxditview,xditview'; |
_VIEWER_X='gxditview,xditview'; |
272 |
|
|
1040 |
|
|
1041 |
|
|
1042 |
######################################################################## |
######################################################################## |
1043 |
# Definition of normal Functions |
# Definition of normal Functions in alphabetical order |
1044 |
######################################################################## |
######################################################################## |
1045 |
landmark "3: functions"; |
landmark "3: functions"; |
1046 |
|
|
3203 |
|
|
3204 |
|
|
3205 |
######################################################################## |
######################################################################## |
3206 |
# main |
# main* Functions |
3207 |
######################################################################## |
######################################################################## |
3208 |
|
|
3209 |
# The main area contains the following parts: |
# The main area contains the following parts: |
3210 |
# - main_init(): initialize temporary files and set exit trap |
# - main_init(): initialize temporary files and set exit trap |
3211 |
# - parse $MANOPT |
# - main_parse_MANOPT(): parse $MANOPT |
3212 |
# - main_parse_args(): argument parsing |
# - main_parse_args(): argument parsing |
3213 |
# - determine display mode |
# - main_set_mode (): determine the display mode |
3214 |
# - process filespec arguments |
# - main_do_fileargs(): process filespec arguments |
3215 |
# - setup X resources |
# - main_set_resources(): setup X resources |
3216 |
# - do the displaying |
# - main_display(): do the displaying |
3217 |
|
# - main(): the main function that calls all main_*() |
3218 |
|
|
3219 |
# These parts are implemented as functions, being defined below in the |
# These parts are implemented as functions, being defined below in the |
3220 |
# sequence they are called in the main() function. |
# sequence they are called in the main() function. |
4429 |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
4430 |
;; |
;; |
4431 |
esac; |
esac; |
4432 |
|
_modefile="${_modefile}".dvi; |
4433 |
_groggy="$(tmp_cat | grog -Tdvi)"; |
_groggy="$(tmp_cat | grog -Tdvi)"; |
4434 |
_do_display; |
_do_display; |
4435 |
;; |
;; |
4441 |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
4442 |
;; |
;; |
4443 |
esac; |
esac; |
4444 |
_modefile="${_modefile}".html |
_modefile="${_modefile}".html; |
4445 |
_groggy="$(tmp_cat | grog -Thtml)"; |
_groggy="$(tmp_cat | grog -Thtml)"; |
4446 |
_do_display; |
_do_display; |
4447 |
;; |
;; |
4455 |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
4456 |
;; |
;; |
4457 |
esac; |
esac; |
|
_modefile="${_modefile}" |
|
4458 |
_groggy="$(tmp_cat | grog -Tps)"; |
_groggy="$(tmp_cat | grog -Tps)"; |
4459 |
trap_clean; |
trap_clean; |
4460 |
# start a new shell program to get another process ID. |
# start a new shell program to get another process ID. |
4492 |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
"wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; |
4493 |
;; |
;; |
4494 |
esac; |
esac; |
4495 |
|
_modefile="${_modefile}".ps; |
4496 |
_groggy="$(tmp_cat | grog -Tps)"; |
_groggy="$(tmp_cat | grog -Tps)"; |
4497 |
_do_display; |
_do_display; |
4498 |
;; |
;; |