diff --git a/bld/browser/h/brwhelp.h b/bld/browser/h/brwhelp.h index d166a72872..a8a05998dc 100644 --- a/bld/browser/h/brwhelp.h +++ b/bld/browser/h/brwhelp.h @@ -2,6 +2,7 @@ * * Open Watcom Project * +* Copyright (c) 2002-2020 The Open Watcom Contributors. All Rights Reserved. * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. * * ======================================================================== @@ -31,7 +32,7 @@ #include "wsyshelp.hpp" -#include "wbrw.h" +#include "wbrw.gh" #define BRH_SELECT_ROOTS HLP_MANIPULATING_THE_TREE_VIEWS #define BRH_QUERY_CONFIGURATION HLP_GLOBAL_SYMBOL_QUERIES diff --git a/bld/browser/master.mif b/bld/browser/master.mif index 91726a80e3..96bfeb246d 100644 --- a/bld/browser/master.mif +++ b/bld/browser/master.mif @@ -8,7 +8,7 @@ browse_trmem = 1 docs_host_dir = $(docs_dir)/$(host_os) -additional_clean = $(docs_host_dir)/wbrw.h +additional_clean = $(docs_host_dir)/wbrw.gh .extensions: .gpp @@ -99,7 +99,7 @@ objs_dbg = debuglog.obj # # EXE # -exetarg_prebuild_objs = $(docs_host_dir)/wbrw.h +exetarg_prebuild_objs = $(docs_host_dir)/wbrw.gh exetarg_objs = $(objs) $(objs_dbg) exetarg_libs_dos = $(ui_lib) exetarg_libs = $(gui_lib) $(exetarg_libs_$(host_os)) $(dwarfr_lib) $(wclass_lib) @@ -142,7 +142,7 @@ curr_dir=$+$(%__CWD__)$- $(docs_host_dir) : .SYMBOLIC $(noecho)cd $@ -$(docs_host_dir)/wbrw.h : $(docs_host_dir) .ALWAYS +$(docs_host_dir)/wbrw.gh : $(docs_host_dir) .ALWAYS $(noecho)!$(nested_wmake) -h -f ../mif/onebook.mif hbook=wbrw header=1 dotarget=$(host_os) $(noecho)cd $(curr_dir) diff --git a/bld/ide/ide/cpp/vpemain.cpp b/bld/ide/ide/cpp/vpemain.cpp index 2ec424aef6..c76502a461 100644 --- a/bld/ide/ide/cpp/vpemain.cpp +++ b/bld/ide/ide/cpp/vpemain.cpp @@ -69,7 +69,7 @@ #include "wflashp.hpp" #include "vhelpstk.hpp" #include "veditdlg.hpp" -#include "ide.h" +#include "ide.gh" #include "autoenv.h" #include "clibext.h" diff --git a/bld/ide/ide/cpp/vpemain2.cpp b/bld/ide/ide/cpp/vpemain2.cpp index 5801cc5b4c..8e5fc1f488 100644 --- a/bld/ide/ide/cpp/vpemain2.cpp +++ b/bld/ide/ide/cpp/vpemain2.cpp @@ -71,7 +71,7 @@ #include "wflashp.hpp" #include "vhelpstk.hpp" #include "veditdlg.hpp" -#include "ide.h" +#include "ide.gh" #include "mitem.hpp" #include "inifile.hpp" diff --git a/bld/ide/ide/master.mif b/bld/ide/ide/master.mif index 54f08b63a1..b01975c98a 100644 --- a/bld/ide/ide/master.mif +++ b/bld/ide/ide/master.mif @@ -12,7 +12,7 @@ target_win = win docs_host_dir = $(docs_dir)/$(host_os) -additional_clean = $(docs_host_dir)/ide.h +additional_clean = $(docs_host_dir)/ide.gh !include cproj.mif !include defrule.mif @@ -70,7 +70,7 @@ extra_l_flags = op eliminate op description 'Open Watcom IDE' # # EXE # -exetarg_prebuild_objs = $(docs_host_dir)/ide.h +exetarg_prebuild_objs = $(docs_host_dir)/ide.gh exetarg_objs = $(objs) exetarg_libs = $(idelib_lib) $(wclass_lib) $(gui_lib) $(wres_lib) exetarg_res_version_res_exe_nt_386 = exever.res @@ -102,6 +102,6 @@ curr_dir=$+$(%__CWD__)$- $(docs_host_dir) : .SYMBOLIC $(noecho)cd $@ -$(docs_host_dir)/ide.h: $(docs_host_dir) .ALWAYS +$(docs_host_dir)/ide.gh : $(docs_host_dir) .ALWAYS $(noecho)!$(nested_wmake) -h -f ../mif/onebook.mif hbook=ide header=1 dotarget=$(host_os) $(noecho)cd $(curr_dir) diff --git a/bld/whpcvt/c/whpcvt.c b/bld/whpcvt/c/whpcvt.c index 87bb8bb2ce..63ae82b84f 100644 --- a/bld/whpcvt/c/whpcvt.c +++ b/bld/whpcvt/c/whpcvt.c @@ -2,7 +2,7 @@ * * Open Watcom Project * -* Copyright (c) 2002-2019 The Open Watcom Contributors. All Rights Reserved. +* Copyright (c) 2002-2020 The Open Watcom Contributors. All Rights Reserved. * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. * * ======================================================================== @@ -57,6 +57,7 @@ pick( ARG_OL, "ol" ) \ pick( ARG_UL, "ul" ) \ pick( ARG_H, "h" ) \ + pick( ARG_HF, "hf" ) \ pick( ARG_HH, "hh" ) \ pick( ARG_HN, "hn" ) \ pick( ARG_B, "b" ) \ @@ -136,6 +137,8 @@ const char Fonttype_courier[] = "courier"; /* local variables */ +static char *h_file_name = NULL; + static const char *Help_info[] = { "Usage: whpcvt [options] []", " Options for all help file types:", @@ -502,6 +505,14 @@ static int process_args( int argc, char *argv[] ) case ARG_H: Do_def = true; break; + case ARG_HF: + start_arg++; + if( start_arg < argc ) { + h_file_name = normalize_fname( h_file_name, argv[start_arg], NULL ); + } else { + error_err( ERR_BAD_ARGS ); + } + break; case ARG_HH: Do_hdef = true; break; @@ -2058,8 +2069,12 @@ int main( int argc, char *argv[] ) In_file = NULL; if( Do_ctx_ids ) { - strcpy( strrchr( file, '.' ), EXT_DEF_FILE ); - In_file = fopen( file, "r" ); + if( h_file_name != NULL ) { + In_file = fopen( h_file_name, "r" ); + } else { + strcpy( strrchr( file, '.' ), EXT_DEF_FILE ); + In_file = fopen( file, "r" ); + } if( In_file != NULL ) { read_ctx_ids(); fclose( In_file ); @@ -2069,11 +2084,19 @@ int main( int argc, char *argv[] ) set_ctx_ids(); if( Do_def ) { - strcpy( strrchr( file, '.' ), EXT_DEF_FILE ); - Def_file = fopen( file, "w" ); - if( Def_file == NULL ) { - printf( "Could not open define file: %s\n", file ); - goto error_exit; + if( h_file_name != NULL ) { + Def_file = fopen( h_file_name, "w" ); + if( Def_file == NULL ) { + printf( "Could not open define file: %s\n", h_file_name ); + goto error_exit; + } + } else { + strcpy( strrchr( file, '.' ), EXT_DEF_FILE ); + Def_file = fopen( file, "w" ); + if( Def_file == NULL ) { + printf( "Could not open define file: %s\n", file ); + goto error_exit; + } } } @@ -2139,6 +2162,9 @@ int main( int argc, char *argv[] ) error_exit: + if( h_file_name != NULL ) { + free( h_file_name ); + } if( Header_File != NULL ) { free( Header_File ); } diff --git a/docs/makehhp.awk b/docs/makehhp.awk index a15c412084..d818abb314 100644 --- a/docs/makehhp.awk +++ b/docs/makehhp.awk @@ -28,7 +28,7 @@ BEGIN { gsub( /\"> (.*) <\/h.>/, "", file ) # "Index_of_Topics" should be included since it is - # defined in the .h file, but we'll place it last + # defined in the .gh file, but we'll place it last # since it shouldn't be our first page if (file == "Index_of_Topics") { last_file = file @@ -64,7 +64,7 @@ END { print "" print "[MAP]" - print "#include " hbook ".h" + print "#include " hbook ".gh" print "" # Directly write aliases into the project rather diff --git a/docs/mif/clean.mif b/docs/mif/clean.mif index aaabca86fc..a2264fc207 100644 --- a/docs/mif/clean.mif +++ b/docs/mif/clean.mif @@ -6,7 +6,7 @@ clean : .procedure @if exist *.bmp rm -f *.bmp @if exist *.hlp rm -f *.hlp @if exist *.cnt rm -f *.cnt - @if exist *.h rm -f *.h + @if exist *.gh rm -f *.gh @if exist *.ipf rm -f *.ipf @if exist *.inf rm -f *.inf @if exist *.tmp rm -f *.tmp diff --git a/docs/mif/onebook.mif b/docs/mif/onebook.mif index 2c8bb29940..18de2be1c8 100644 --- a/docs/mif/onebook.mif +++ b/docs/mif/onebook.mif @@ -71,22 +71,22 @@ bmp2eps = bmp2eps # !ifeq header 1 -dep_nt = $(hbook).h +dep_nt = $(hbook).gh !else ifneq hc_nt dep_nt = $(hbook).hlp $(hbook).cnt !endif !ifeq header 1 -dep_win = $(hbook).h +dep_win = $(hbook).gh !else dep_win = $(hbook).hlp !endif !ifeq header 1 -dep_os2 = $(hbook).h +dep_os2 = $(hbook).gh !else dep_os2 = $(hbook).inf $(hbook).hlp !endif !ifeq header 1 -dep_dos = $(hbook).h +dep_dos = $(hbook).gh !else dep_dos = $(hbook).ihp !endif @@ -193,7 +193,7 @@ $(hbook).cnt : $(hbook).cn1 awk -f ../makecnt2.awk -v file=$(hbook).hlp -v title="$(book_title)" -v multi=$(book_multi_chapter) $[@ > $(hbook).cnt !endif -$(hbook).rtf $(hbook).cn1 $(hbook).h $(hbook).hh : $(book_objs) $(proj_objs) +$(hbook).rtf $(hbook).cn1 $(hbook).gh $(hbook).hh : $(book_objs) $(proj_objs) @%make compile_gml_to_xxx #################################################### @@ -211,7 +211,7 @@ $(hbook).hlp : $(hbook).hpj $(hbook).rtf $(hbook).hh $(hbook).hpj : $(proj_objs) @%make compile_hpj_win -$(hbook).rtf $(hbook).h $(hbook).hh : $(book_objs) $(proj_objs) +$(hbook).rtf $(hbook).gh $(hbook).hh : $(book_objs) $(proj_objs) @%make compile_gml_to_xxx #################################################### @@ -226,7 +226,7 @@ $(hbook).rtf $(hbook).h $(hbook).hh : $(book_objs) $(proj_objs) $(hbook).ihp : $(hbook).ib $(hcdos) -h 25 -w 80 $(hbook).ib $(hbook).ihp -$(hbook).ib $(hbook).h : $(book_objs) $(proj_objs) +$(hbook).ib $(hbook).gh : $(book_objs) $(proj_objs) @%make compile_gml_to_xxx @@ -246,12 +246,12 @@ $(hbook).ib $(hbook).h : $(book_objs) $(proj_objs) .EXTENSIONS: .chm -$(hbook).chm : $(hbook).htm $(hbook).h +$(hbook).chm : $(hbook).htm $(hbook).gh @if not exist $(hbook) mkdir $(hbook) !ifdef book_bmroot $(noecho)cp -f $(book_bmroot)/*.bmp $(hbook)/ > $(nulldevice) !endif - cp -f $(hbook).h $(hbook)/$(hbook).h > $(nulldevice) + cp -f $(hbook).gh $(hbook)/$(hbook).gh > $(nulldevice) awk -f ../splithtm.awk -v dir=$(hbook) $(hbook).htm awk -f ../makehha.awk $(hbook).htm >$(hbook)/$(hbook).hha awk -f ../makehhc.awk $(hbook).htm >$(hbook)/$(hbook).hhc @@ -323,7 +323,7 @@ $(hbook).hlp : $(hbook).ipf $(hbook).hlp : .symbolic !endif -$(hbook).ipf $(hbook).h : $(book_objs) $(proj_objs) +$(hbook).ipf $(hbook).gh : $(book_objs) $(proj_objs) @%make compile_gml_to_xxx !endif @@ -363,7 +363,7 @@ $(hbook).ps : $(book_objs) $(book_objs_ps) $(proj_objs) .EXTENSIONS: .htm -$(hbook).h $(hbook).htm : $(book_objs) $(proj_objs) +$(hbook).gh $(hbook).htm : $(book_objs) $(proj_objs) !ifneq dotarget htmlhelp !ifdef book_bmroot $(noecho)cp -f $(book_bmroot)/*.bmp . > $(nulldevice) @@ -413,6 +413,8 @@ prepare_whpcvt_opts : .PROCEDURE @%append $(whpcvt_optfile) -k @%append $(whpcvt_optfile) -up !endif + @%append $(whpcvt_optfile) -hf + @%append $(whpcvt_optfile) $*.gh @%append $(whpcvt_optfile) -hn @%append $(whpcvt_optfile) -i @@ -574,8 +576,8 @@ compile_gml_to_xxx : .PROCEDURE $(noecho)%ren $(wgml_tmpfile) $*.ptf @if exist $*.mix @%erase $*.mix @%ren $(wgml_sysfile_01) $*.mix - @if exist $*.h @%erase $*.h - @%ren $(wgml_sysfile_02) $*.h + @if exist $*.gh @%erase $*.gh + @%ren $(wgml_sysfile_02) $*.gh @if exist $*.cn1 @%erase $*.cn1 @%ren $(wgml_sysfile_03) $*.cn1 whpcvt -h -@ $(whpcvt_optfile) $*.ptf