INSERTMSG(1) HP-UX 5.0 INSERTMSG(1) NAME insertmsg - use findstring output to insert calls to getmsg SYNOPSIS insertmsg stringlist HP-UX COMPATIBILITY Level: HP-UX/STANDARD Origin: HP DESCRIPTION Insertmsg examines the file stringlist, which is assumed to be the output of findstr minus the strings which do not need to be localized and have been removed by editing. Insertmsg first places the line #include at the beginning of each file named in stringlist. Then for each line in stringlist , it surrounds the string with an expression of the form (*getmsg(nl_fd, nl_set_num, nl_msg_num, nl_msg_buf, NL_MBUFLN) == '\0' ? "saved string" : nl_msg_buf) which evaluates to the original string if the translation cannot be retrieved. The string buffer and other "nl_" variables and constants are defined in . Insertmsg places the modified source on a file nl_xx.c where the original file name was xx.c. The user must then hand edit the file to insert a call nl_catopen("/*appropriate message catalog*/"); and assign the proper value to nl_set_num. Insertmsg also places on the standard output a file which can be used as input to gencat. Again, hand editing is required to define the $set number to match nl_set_num. Messages will automatically be numbered from 1 upward, in the order that they appear in stringlist. The same number will also be placed in the call to getmsg(3C), as the parameter msg_num. DIAGNOSTICS If insertmsg doesn't find the opening or closing double quote where it expects it in the strings file, it prints "insertmsg exiting : lost in strings file" and dies. If this happens check the strings file to make sure that the lines that have been kept there haven't been altered. SEE ALSO findstr(1), gencat(1), getmsg(3C). BUGS Inserts a pointer to a static area which is overwritten on each call.