Dfab: $fab fac=, Rat= Drab: $rab fab=Dfab,usz=500,rsz=500 .MACRO put_de , mmm movw mmm, Drab+rab$w_rsz movw mmm, Drab+rab$w_usz movl mmm+4, Drab+rab$l_Rbf movl mmm+4, Drab+rab$l_Ubf $Put Rab=Drab check r0,error .endm put_de .library /sys$login:peb/ .library /sys$library:lib/ $notesdef $NOTESMSGDEF NOTEITEMS .entry Search,0 movl #100,input Pushaw Input pushaq Input pushaq debug calls #3,g^cli$get_value check r0,error movb input,Dfab+fab$b_fns movl input+4,Dfab+fab$l_fna $create fab=Dfab check r0,error $connect rab=Drab check r0,error pushaq op_msg_mast calls #1,g^lib$put_output ; get the master conf name movl #100,input Pushaw Input pushaq Input pushaq Master calls #3,g^cli$get_value check r0,error movw input,notes_open_i ; should we treat this as being a notebook entry ? pushaq notebook calls #1,g^Cli$Present blbs r0,301$ ; skip if NOnotebook movl #12, master_name_flag brw 300$ 301$: nop clrl master_name_flag movl #100,notebook_spec Pushaw notebook_spec pushaq notebook_spec pushaq notebook calls #3,g^cli$get_value check r0,error movw notebook_spec, notebook_in movl #100,out $Fao_s ctrstr=ctr_ent,outbuf=out,outlen=out,- p1=#Input pushaq out calls #1,g^lib$put_output ; open notebook (if its not open already!) pushaw null pushaw notebook_in pushal notebook_file_cont calls #3,G^Notes$notefile_begin check r0,error ; begin pushaw null pushaw book_in pushal notebook_cont calls #3,g^notes$entry_begin check r0,error ; get the entry movw input, ent_in movl input+4, ent_in+4 pushaw ent_out pushaw ent_in pushal notebook_cont calls #3,g^notes$entry_get check r0,error movl entry_name_len, master_entry_len movc3 entry_name_len, entry_name, master_entry movl Notefile_file_name_len, descr movab Notefile_file_name, descr+4 movl #100,out $Fao_s ctrstr=ctr_ent1,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl Descr, Input movc3 Input, @Descr+4, Input+8 movw input,notes_open_i 300$: nop movw #full_default_name_len, def_l movab full_default_name, def_n pushaw notes_open_o pushaw notes_open_i pushal mast_file_cont calls #3,G^Notes$notefile_begin check r0,error ; context to first note pushaw notes_beg_O pushaw notes_beg_I pushal first_note_cont calls #3,G^Notes$note_begin check r0,error ; get the notes range Pushaw range_i pushaq range_i pushaq range calls #3,g^cli$get_value check r0,error ; get search string Pushaw string_i pushaq string_i pushaq string calls #3,g^cli$get_value check r0,error movl string_i, flag pushaq string_i pushaq string_i calls #2,g^str$upcase check r0,error movw range_i, note_in movab range_i+8, note_in+4 movw string_i, note_in+12 movab string_i+8, note_in+16 ; begin the search pushaq st_msg calls #1,g^lib$put_output Sloop: nop pushaw mast_note_out pushaw note_in pushal first_note_cont calls #3,g^notes$note_get check r0,error ; movw #notes$k_noop, note_in+2 movc3 #contI_len, contI, note_in put_de fdlm movl #100,out $fao_s ctrstr=ctr_tu,outbuf=out,outlen=out,- p1=mast_note_id_len,- p2=#mast_note_id,- p3=mast_author_len,- p4=#mast_author,- p5=mast_note_title_len,- p6=#mast_note_title put_de out 10$: nop pushaw Get_txt_o pushaw Get_txt_i pushal first_note_cont calls #3,g^notes$note_get_text blbs r0,1$ cmpl r0,#notes$_no_more_text bneq 2$ brw Sloop 2$: $exit_s code=r0 1$: nop movl rec_len, tmp MOVAB REC, tmp+4 ; pushaq tmp ; calls #1,g^lib$put_output movl rec_len, out pushaq tmp pushaq out calls #2,g^str$upcase check r0,error matchc string_i, @string_i+4, out, @out+4 ; bneq 100$ beql 99$ brw 100$ 99$: nop subl3 r2, out, dlm subl2 string_i, dlm put_de tmp movl #100,out $fao_s ctrstr=ctr_p,outbuf=out,outlen=out,- p1=#dlm,- p2=#flag put_de out 100$: nop brw 10$ error: ret debug: .ascid /OUT/ ctr_p: .ascid /!AS!AS/ ctr_tu: .ascid /Note !AD, by !AD, "!AD"/ st_msg: .ascid / ... begin search .../ get_txt_i: .word 4 .word notes$k_nosignal .long hint .long 0 ; .long 0 get_txt_o: .word 1000 .word notes$k_text_string .long rec .long rec_len ; .long 0 got_txt_typ: .blkl 1 do_c_o: .ascid /%PAN-I-DO_CO, PAN will now copy the new notes/ report_only: .ascid +(As this pass was done /REPORT_ONLY)+ report_only1: .ascid +(*_NO_* changes have been made))+ contI: .word 4 .word NOTES$K_CONTINUE .long 0 .long 0 ; .long 0 contI_len = . - contI note_in: .word 4 .word notes$k_note_id .long 0 .long 0 ; .word 0 .word NOTES$K_NOTE_SEARCH_STRING .long 0 .long 0 ; .word 4 .word notes$k_nosignal .long no_sig .long 0 ; .word 4 .word NOTES$K_NOTE_HINT_GET_TEXT .long no_sig .long 0 ; .long 0 note_uid: .long 0 first_note_in: .word 4 .word notes$k_nosignal .long no_sig .long 0 ; .word 4 .word notes$k_note_next_unseen .long no_sig .long 0 ; .long 0 first_uid: .blkl 1 first_note_cont: .blkl 1 first_char: .ascid /8-SEP-1954/ first_date: .blkl 2 notes_beg_i: .word 4 .word notes$k_notefile_context .long mast_file_cont .long 0 ; .word 4 .word notes$k_nosignal .long no_sig .long 0 ; .long 0 notes_beg_o: .word 4 .word notes$k_notefile_numnotes .long number_of_notes .long 0 ; .long 0 shad_note_cont: .blkl 1 mast_note_cont: .blkl 1 no_sig: .long 1 mast_note_out: .word 20 .word notes$k_note_id .long mast_note_id .long mast_note_id_len ; .word 100 .word notes$k_note_title .long mast_note_title .long mast_note_title_len ; .word 8 .word notes$k_note_create_time .long mast_note_time .long 0 ; .word 100 .word notes$k_note_author .long mast_author .long mast_author_len ; .word 4 .word notes$k_note_numrecords .long mast_number_of_lines .long 0 ; .long 0 mast_number_of_lines: .blkl 1 shad_number_of_lines: .blkl 1 mast_note_id: .blkb 50 mast_note_id_len: .blkl 1 mast_uid: .blkl 1 mast_note_title: .blkb 200 mast_note_title_len: .blkl 1 mast_note_time: .blkl 2 mast_hidden: .blkl 1 ctr_tell_u: .ascid /Working on UID !XL/ shad_note_out: .word 20 .word notes$k_note_id .long shad_note_id .long shad_note_id_len ; .word 4 .word notes$k_note_uid .long shad_uid .long 0 ; .word 100 .word notes$k_note_title .long shad_note_title .long shad_note_title_len ; .word 8 .word notes$k_note_create_time .long shad_note_time .long 0 ; .word 4 .word notes$k_note_hidden .long shad_hidden .long 0 ; .word 100 .word notes$k_note_author .long shad_author .long shad_author_len ; .word 4 .word notes$k_note_numrecords .long shad_number_of_lines .long 0 ; .long 0 shad_author: .blkb 100 mast_author: .blkb 100 shad_author_len: .blkl 1 mast_author_len: .blkl 1 shad_note_id: .blkb 50 shad_note_id_len: .blkl 1 shad_uid: .blkl 1 shad_note_title: .blkb 200 shad_note_title_len: .blkl 1 shad_note_time: .blkl 2 shad_hidden: .blkl 1 mast_note_flag: .blkl 1 shad_note_flag: .blkl 1 no_same: .Ascid /%PAN-F-DATE_MISMATCH, Same UID notes have not same time stamp/ wrg_mst: .ascid /%PAN-F-WRG_MAST, This is not the right master file for this shadow / ctr_ns2: .ascid /Shadow, UID !XL, note !12AD, time !%D/ ctr_ns1: .ascid /Master, UID !XL, note !12AD, time !%D/ ctr_tell_u1: .ascid /!ASUID !XL:Master !12,Shadow !12 @!%D/ ctr_tell_u2: .ascid /!ASUID !XL:Master !12,Shadow !12 @/ neither: .blkl 1 nei_exit: .ascid /%PAN-I-LIMEX, Scan exit after 30 "no notes"/ last_uid: .blkl 1 indent: .ascid /####################################################/ un_hid_nol: .ascid />>> WARNING! Unhiding note we did not get the text for <<>> the master has the missing base note !AD, as UID !XL<<>> this topic does not exist <<>> loop detected , move stack dumped <<>> Shadow note !AD is UID !XL<<>> Master note !UL lines, Shadow note !UL lines<<>> Same notes have not the same number of lines <<>> base note deleted in the master, but not in the shadow <<>> Master note is missing from the shadow <<>> Note authors are different <<>> Delete shadow note (not in the master) <<>> Note ID has changed <<>> Note Title has changed <<>> Note hidden status has changed <<>> failed to understand the file structure <<