.* ***********************************************************
.* *                                                         *
.* *                                                         *
.* * Copyright, (C) Honeywell Information Systems Inc., 1981 *
.* *                                                         *
.* *                                                         *
.* ***********************************************************
.*  03/03/77 jaf Modified to handle point pages
.*  07/17/77 jaf Modified to improve error messages, reduce overhead
.*  03/02/81 jaf Added optional digit prefix to specify which index
.*  07/02/81 jaf Removed "before" page and lineno
.*  ???????? jaf need to add =XYZ prefix to rename |->X ~->Y ;->Z
.sr LASTCALLER   ;.sr LASTCALLER_1 ;.sr LASTCALLER_2
.sr LASTCALLER_3 ;.sr LASTCALLER_4 ;.sr LASTCALLER_5
.sr LASTCALLER_6 ;.sr LASTCALLER_7 ;.sr LASTCALLER_8
.sr LASTCALLER_9 ;.sr HIT_STRT "|" ;.sr HIT_END ";"
.sr SCNDX 1
.*
.indctl on
.sr HIT_TYPE "%Parameter% "(1,1)	;.* extract hit type char
.*
.if "%HIT_TYPE%" = "="		;.* delimiter change?
.then	.sr HIT_STRT "%Parameter% "(2,1) ;.* key starter
	.sr HIT_END "%Parameter% "(4,1) ;.* key ender
	.sr HIT_TYPE "%Parameter%  "(5,1) ;.* extract hit type char again
	.sr SCNDX 5		;.* set scan index
.endif
.*
.ur .if %%[index ""0123456789"" "%HIT_TYPE%"]%% ^= 0 ;.* if type is numeric
.then	.sr INDEX_which "_%HIT_TYPE%"	;.* use it for filename suffix
	.sr SCNDX %SCNDX% + 1	;.* step over it
	.sr HIT_TYPE "%Parameter% "(%SCNDX%,1) ;.* extract hit type char again
.else	.sr INDEX_which ""		;.* no filename suffix
.endif
.*
.ur .if %%[index ""ULIANSK"" "%HIT_TYPE%"]%% = 0 ;.* check hit type char
.then	.ur .err Unknown hit type %HIT_TYPE% ;.* report error
	.go ret
.endif
.*
.sr SCNDX %SCNDX% + 1
.sr INDEX_G ("%Parameter% "(%SCNDX%,1) = "%HIT_STRT%") ;.* set key starter flag
.ur .go type_%HIT_TYPE%		;.* go to selected type
.* 
.la type_U          ;.* UPPER case permute
.la type_L          ;.* lower case permute
.la type_I          ;.* initial cap permute
.la type_A          ;.* as-is permute
.ts %INDEX_G%
.go finish          ;.* no text to output
.*
.la type_N          ;.* explicitly omitted reference
.sr INDEX_X "%Parameter% "(%SCNDX%)
.go gen
.* 
.la type_S          ;.* "see" reference
.ts %INDEX_G%
.go finish
.err Format must be "S|...".
.go ret
.*
.la type_K          		;.* keys supplied
.ts %INDEX_G%			;.* are we at the key starter?
.go finish		;.* yep
.*				find it
.ur .srv I %%[index ""%Parameter%%HIT_STRT%""(%SCNDX%) "%HIT_STRT%"]%%
.*
.*  - - - - - Extract the text string found
.sr I %I% - %SCNDX%
.sr INDEX_X "%Parameter% "(%SCNDX%,%I%)
.*
.la gen
.if "%INDEX_X% "(1,1)="."
.then	.ur %PAD%%INDEX_X%
.else	.ur %INDEX_X%
.endif
.la finish
.*				generate hit into .chars file
.ur .if "%%CallingFileName%%" = "%%LASTCALLER%INDEX_which%%%" ;.* same caller?
.else	.ur .wrt %FileName%%INDEX_which%.chars %CallingFileName% ;.* write caller
	.ur .sr LASTCALLER%INDEX_which% "%%CallingFileName%%" ;.* and record him
.endif
.ur .wrt %FileName%%INDEX_which%.chars %CallingLineNo%      .~ HIT %Parameter%%HIT_END%%PageNo% %PageLine%
.*
.la ret
.indctl
.*.ts %INDEX_G%
.*.rt
.*.ts %FillMode%+1
.*.err Not in fill mode.


                                          -----------------------------------------------------------


Historical Background

This edition of the Multics software materials and documentation is provided and donated
to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. 
as a contribution to computer science knowledge.  
This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology,
Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL
and BULL HN Information Systems Inc. to the development of this operating system. 
Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970),
renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership
of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture 
for managing computer hardware properly and for executing programs. Many subsequent operating systems 
incorporated Multics principles.
Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., 
as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. .

                                          -----------------------------------------------------------

Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without
fee is hereby granted,provided that the below copyright notice and historical background appear in all copies
and that both the copyright notice and historical background and this permission notice appear in supporting
documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining
to distribution of the programs without specific prior written permission.
    Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc.
    Copyright 2006 by BULL HN Information Systems Inc.
    Copyright 2006 by Bull SAS
    All Rights Reserved
