Routines in Titl_rtn.c

The file contains the following routines:


COMPACT_TITLE: Routine to compact a title for sorting

/************************************************************************/
/*																		*/
/*    COMPACT_TITLE - compact a book/story title for sorting			*/
/*																		*/
/*    Calling Format:													*/
/*																		*/
/*		status = COMPACT_TITLE (outbuf_ptr, inpbuf_ptr);				*/
/*																		*/
/*    Where:															*/
/*																		*/
/*		status     = Status of Operation								*/
/*				   = PSPSTS_OK is all OK								*/
/*				   = PSPSTS_FAIL if a fatal error occurred				*/
/*		outbuf_ptr = Pointer to buffer to hold compacted title			*/
/*		inpbuf_ptr = Pointer to title to be compacted					*/
/*																		*/
/*    Note that no error messages are output by this routine.			*/
/*																		*/
/************************************************************************/

CONVERT_TITLE: Routines to convert title to Locus format

/************************************************************************/
/*																		*/
/*    CONVERT_TITLE - convert a title into Locus format					*/
/*																		*/
/*    Calling Format:													*/
/*																		*/
/*		CONVERT_TITLE (buff_ptr, curtitlad_ptr, title_ptr, title_len,	*/
/*				       titlad_ptr, titlad_len);							*/
/*																		*/
/*    Where:															*/
/*																		*/
/*		buff_ptr   = Pointer to input buffer							*/
/*		curtitlad_ptr = Pointer to current title additional field;		*/
/*				(only used when routine is called for validation)		*/
/*		title_ptr  = Pointer to buffer to hold title					*/
/*		title_len  = Size of buffer pointed to by title_ptr				*/
/*		titlad_ptr = Pointer to buffer to hold title additional info	*/
/*		titlad_len = Size of buffer pointed to by titlad_ptr			*/
/*																		*/
/*    This routine tries to remove the "title additional information"	*/
/*    from the start of a normal title. This consists of any non-		*/
/*    alphanumeric characters and/or a single occurrence of any of		*/
/*    "A ", "An ", "The ", "Le ", "La ", "Un ", "Une ", "L'" or "Les "	*/
/*    and/or any further non-alphanumeric characters.					*/
/*																		*/
/************************************************************************/

CXX_CONVERT_TITLE: Routines to convert title to Locus format

/************************************************************************/
/*																		*/
/*    CXX_CONVERT_TITLE - C++ shell around CONVERT_TITLE				*/
/*																		*/
/*    Calling Format:													*/
/*																		*/
/*		CXX_CONVERT_TITLE (buff_ptr, titlptr_ptr, ttadptr_ptr);			*/
/*																		*/
/*    Where:															*/
/*																		*/
/*		buff_ptr    = Pointer to input buffer							*/
/*		titlptr_ptr = Pointer to char* to hold ptr to title				*/
/*		ttadptr_ptr = Pointer to char* to hold ptr to title additional	*/
/*																		*/
/*    This routine is just a shell around CONVERT_TITLE which can		*/
/*	  be called from a C++ routine.										*/
/*																		*/
/************************************************************************/

PARSE_TITLE: Routine to parse an item title

/************************************************************************/
/*																		*/
/*		PARSE_TITLE - Parse a "Locus" item title						*/
/*																		*/
/*    Calling Format:													*/
/*																		*/
/*		PARSE_TITLE (buff_ptr, serialpart_ptr, serialpart_len,			*/
/*							   serialmax_ptr, serialmax_len,			*/
/*							   origtitl_ptr, origtitl_len,				*/
/*							   origtitlad_ptr, origtitlad_len,			*/
/*							   byline_ptr, byline_len, 					*/
/*							   note_ptr, note_len,						*/
/*							   diagflg, prtfil_ptr);					*/
/*																		*/
/*    Where:															*/
/*																		*/
/*		buff_ptr	  = Pointer to input string							*/
/*		serialpart_ptr = Pointer to char[6] to hold part number			*/
/*		serialpart_len = Length of buffer pointed to by serialpart_ptr	*/
/*		serialmax_ptr = Pointer to char[6] to hold part maximum			*/
/*		serialmax_len = Length of buffer pointed to by serialmax_ptr	*/
/*		origtitl_ptr = Pointer to buffer for original title (if diff)	*/
/*		origtitl_len = Length of buffer pointed to by origtitl_ptr		*/
/*		origtitlad_ptr = Pointer to buffer for orig title additional	*/
/*		origtitlad_len = Length of buffer pointed to by origtitlad_ptr	*/
/*		byline_ptr   = Pointer to buffer for original byline (if diff)	*/
/*		byline_len   = Length of buffer pointed to by byline_ptr		*/
/*		note_ptr     = Pointer to buffer for extra notes (if any)		*/
/*		note_len     = Length of buffer pointed to by note_ptr			*/
/*		diagflg      = PSP_TRUE if validation diagnostics required		*/
/*					 = PSP_FALSE otherwise								*/
/*		prtfil_ptr   = Diagnostics file pointer							*/
/*																		*/
/*    This routine parses an item title into its constituent parts		*/
/*																		*/
/************************************************************************/