Routines in Tran_rtn.c

The file contains the following routines:


CXX_TRANSLATE_ACCENTS: Routine to translate accents

/************************************************************************/
/*																		*/
/*    CXX_TRANSLATE_ACCENTS - C++ shell around TRANSLATE_ACCENTS		*/
/*																		*/
/*    Calling Format:													*/
/*																		*/
/*		CXX_TRANSLATE_ACCENTS (buff_ptr, obufptr_ptr,					*/
/*			    			   inp_fmt, out_fmt, prtfil_ptr);			*/
/*																		*/
/*    Where:															*/
/*																		*/
/*		buff_ptr    = Pointer to input buffer							*/
/*		obufptr_ptr = Pointer to char* to hold ptr to output buffer		*/
/*		inp_fmt     = Format of accents in input file:					*/
/*				      TRFMT_EXP = Expanded (^xx) format					*/
/*		     		  TRFMT_WORD = Suitable for Word for Windows		*/
/*		    		  TRFMT_LOCUS = Internal form used by Locus			*/
/*		out_fmt     = Format of accents in output file:					*/
/*				      as for inp_fmt +									*/
/*		    		  TRFMT_WDPART = Partial Word for Windows (i.e.		*/
/*						leave unchanged if no translation)				*/
/*		   			  TRFMT_FALLBACK = Always translate as fallback		*/
/*			 		  TRFMT_HTML = HTML									*/
/*		prtfil_ptr  = Pointer to diagnostics file (may be NULL)			*/
/*																		*/
/*    This routine is just a shell around TRANSLATE_ACCENTS which can	*/
/*	  be called from a C++ routine.										*/
/*																		*/
/************************************************************************/

TRANSLATE_ACCENTS: Routine to translate accents

/************************************************************************/
/*																		*/
/*    TRANSLATE_ACCENTS - Translate all accents in a given buffer		*/
/*																		*/
/*    Calling Format:													*/
/*																		*/
/*		status = TRANSLATE_ACCENTS (inpbuf, outbuf, outbufsiz,			*/
/*					    			inp_fmt, out_fmt, prtfil_ptr);		*/
/*																		*/
/*    Where:															*/
/*																		*/
/*		status	   = Status of operation (PSP_FALSE if error)			*/
/*		inpbuf     = Pointer to buffer holding record to translate.		*/
/*		outbuf     = Pointer to buffer to hold translated record.		*/
/*		outbufsiz  = Output buffer size									*/
/*		inp_fmt    = Format of accents in input file:					*/
/*				     TRFMT_EXP = Expanded (^xx) format					*/
/*		     		 TRFMT_WORD = Suitable for Word for Windows			*/
/*		    		 TRFMT_LOCUS = Internal form used by Locus			*/
/*		out_fmt    = Format of accents in output file:					*/
/*				     as for inp_fmt +									*/
/*		    		 TRFMT_WDPART = Partial Word for Windows (i.e.		*/
/*						leave unchanged if no translation)				*/
/*		   			 TRFMT_FALLBACK = Always translate as fallback		*/
/*			 		 TRFMT_HTML = HTML									*/
/*		prtfil_ptr = Pointer to diagnostics file (may be NULL)			*/
/*																		*/
/*    This routine looks for all accents of a particular form, if		*/
/*    appropriate checks that the accent is valid, and then translates	*/
/*    it as required.  The only valid format combinations are:			*/
/*																		*/
/*		TRFMT_EXP => TRFMT_EXP (validity check only)					*/
/*		TRFMT_EXP => anything else										*/
/*		TRFMT_LOCUS => TRFMT_EXP or TRFMT_WORD							*/
/*																		*/
/************************************************************************/