;define syntax Add_keyword ; routine add_keyword ; ; parameter P1, prompt="Huh?", value(required),label=option ; parameter P2, label=Conf, prompt="Notes Conference", value(required) ; parameter p3, label=keyword prompt="Keyword", value(required) ; parameter p4, label=note_id prompt="Note Id", value(required) ; ; Qualifier NOTEBOOK,default, Negatable , value(default="Notes$notebook") ; .library /sys$login:peb/ $notesdef $NOTESMSGDEF NOTEITEMS .macro pad_star , list, ?L3 pushr #^m pushaq noautowildcard calls #1,g^cli$present blbs r0,L3 movzwl list, R5 addl2 List+4, R5 decl R5 cmpb #^a/*/, (R5) beql L3 incl R5 incw list movb #^a/*/, (R5) L3: popr #^m .endm pad_star .entry Add_keyword, 0 ; confirm status ? pushaq Confirm calls #1,g^cli$Present blbs r0, 10$ movl #1,confirm_flag 10$: nop ; 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 brw 2300$ 301$: nop 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 pad_star ent_in pushaw ent_out pushaw ent_in pushal notebook_cont calls #3,g^notes$entry_get check r0,error 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 2300$: 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 movl result_spec_len,Descr movab result_spec,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_filn,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl title_len,Descr movab title,Descr+4 ; pushaq Descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_title,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl notice_len,Descr movab notice,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_notice,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output ; try for mod status pushaq try_mod calls #1,g^lib$put_output pushaw open_o pushaw open_m pushal mast_file_cont calls #3,G^Notes$notefile_modify MOVL R0,VEC+4 $PUTMSG_S MSGVEC=VEC ; get note context... movab mast_file_cont, notes_beg_i+4 pushaw null pushaw notes_beg_i pushal mast_note_cont calls #3,G^Notes$note_begin check r0,error pushaw null pushaw notes_beg_i pushal mast_key_cont calls #3,G^Notes$keyword_begin check r0,error pushaq dlm calls #1,g^lib$put_output ; get the note number movl #100,input Pushaw Input pushaq Input pushaq nnote_id calls #3,g^cli$get_value check r0,error ; get that note movw input, get_i movab input+8, get_i+4 pushaw add_add_o pushaw get_i pushal mast_note_cont calls #3,g^notes$note_get check r0,error ; tell us about that note movl #100,out $fao_s ctrstr=ctr_p3,outbuf=out,outlen=out,- p1=note_id_len,- p2=#note_id,- p3=ret_note_author_len,- p4=#ret_note_author,- p5=ret_note_title_len,- p6=#ret_note_title,- p7=number_of_lines pushaq out calls #1,g^lib$put_output ; get the keyword name movl #100,input Pushaw Input pushaq Input pushaq key_nam calls #3,g^cli$get_value check r0,error cmpl #0,Confirm_Flag beql 950$ brw 300$ 950$: nop ; generate the prompt movl #100,out $Fao_s ctrstr=ctr_prompt,outbuf=pmt,outlen=pmt,- p1=#input,- p2=note_id_len,- p3=#note_id movl #100,out pushaw out pushal pmt pushaq out calls #3,g^lib$get_input check r0,error tstl out bneq 49$ pushaq no_add calls #1,g^lib$put_output $exit_s code=#1 49$: nop pushaq out pushaq out calls #2,g^str$upcase cmpb #^a/Y/,Out+8 beql 300$ pushaq no_add calls #1,g^lib$put_output $exit_s code=#1 300$: nop movw input, k_len movw note_id_len, add_key pushaw out_key pushaw add_key pushal mast_key_cont calls #3,G^Notes$keyword_add check r0,error movl #100,out $fao_s ctrstr=ctr_add,outbuf=out,outlen=out,- p1=KEYWORD_NAME_len,- p2=#KEYWORD_NAME pushaq out calls #1,g^lib$put_output error: ret ctr_add: .ascid /Added keyword "!AD"/ out_key: .word 100 .word NOTES$K_KEYWORD_NAME .long KEYWORD_NAME .long KEYWORD_NAME_len ; .long 0 KEYWORD_NAME: .blkb 100 KEYWORD_NAME_len: .blkl 1 ctr_mem_add: .ascid /Member "!AS" modified/ access: .ascid /ACCESS/ acc_li: .long 100 .long acc_li+8 .blkb 100 mail_adr: .ascid /MAIL_ADR/ mail_li: .long 100 .long mail_li+8 .blkb 100 notebook_file_cont: .blkl 1 notebook_spec: .long 100 .long notebook_spec+8 .blkb 100 notebook: .ascid /NOTEBOOK/ notebook_in: .word 0 .word notes$k_notefile_file_name .long notebook_spec+8 .long 0 ; .word notebook_def_len .word notes$k_notefile_default_name .long notebook_def_spec .long 0 ; .long 0 notebook_def_spec: .ascii /SYS$LOGIN:notes$notebook.NOTE/ notebook_def_len = . - notebook_def_spec mast_file_cont: .blkl 1 mast_note_cont: .blkl 1 other_mast_note_cont: .blkl 1 Shadow: .ascid /SHADOW/ shad_file_cont: .blkl 1 shad_note_cont: .blkl 1 Master: .ascid /CONF/ op_msg_mast: .ascid /Opening the Source conference/ op_msg_shad: .ascid /Opening the Target conference/ input: .long 300 .long input+8 .blkb 300 ent_in: .word 0 .word notes$k_entry_name .long 0 .long 0 ; .long 0 ent_out: .word 100 .word notes$k_notefile_file_name .long Notefile_file_name .long Notefile_file_name_len ; .word 4 .word notes$k_entry_last_status .long last_status .long 0 ; .word 4 .word notes$k_entry_unseen_est .long unseen_est .long 0 ; .word 100 .word notes$k_entry_name .long entry_name .long entry_name_len ; .word 3000 .word notes$k_seen_map .long seen_map .long seen_map_len ; .word 100 .word NOTES$K_ENTRY_USER_AREA .long note_user_area .long note_user_area_len ; .word 4 .word notes$k_notefile_entrytotal .long entrytotal .long 0 ; .word 4 .word notes$k_notefile_high_uid .long high_uid .long 0 ; .word 8 .word notes$k_notefile_lastrev .long notefile_lastrev .long 0 ; .word 300 .word notes$k_notefile_moderator .long moderator_st .long moderator_st_len ; .word 100 .word notes$k_notefile_notice .long notice .long notice_len ; .word 4 .word notes$k_notefile_numnotes .long number_of_notes .long 0 ; .word 100 .word notes$k_notefile_title .long title .long title_len ; .word 3000 .word notes$k_seen_map .long seen_map .long seen_map_len ; .long 0 entry_name: .blkb 100 entry_name_len: .blkl 1 last_status: .blkl 1 unseen_est: .blkl 1 descr: .blkl 2 notes_open_i: .word 0 .word notes$k_notefile_file_name .long input+8 .long 0 ; def_l: .word default_name_len .word notes$k_notefile_default_name def_n: .long default_name .long default_name_len ; se_mp: .word 0 .word notes$k_seen_map .long seen_map .long 0 ; .long 0 notes_open_o: .word 100 .word notes$k_notefile_title .long title .long title_len ; .word 150 .word notes$k_notefile_result_spec .long result_spec .long result_spec_len ; .word 100 .word notes$k_notefile_notice .long notice .long notice_len ; .word 4 .word notes$k_notefile_restricted .long is_restricted .long 0 ; .word 300 .word notes$k_notefile_moderator .long moderator_st .long moderator_st_len ; .long 0 is_restricted: .blkl 1 notice: .blkb 100 notice_len: .blkl 1 title: .blkb 100 title_len: .blkl 1 result_spec: .blkb 150 result_spec_len: .blkl 1 l_default_name: .ascii /.Note/ l_default_name_len =. - l_default_name default_name: .ascii /Notes$library:.Note/ default_name_len =. - default_name full_default_name: .ascii /Notes$Library:.Note/ full_default_name_len =. - full_default_name ctr_title: .ascid / Title = "!AS"/ ctr_notice: .ascid /Notice = "!AS"/ ctr_filn: .ascid /Conference file is "!AS"/ ctr_ent: .ascid /Opening notebook entry !AS ............../ ctr_ent1: .ascid /Opening conference !AS ............../ cld_mem: .ascid /MEMBERS/ book_in: .word 4 .word notes$k_notefile_context .long notebook_file_cont .long 0 ; .long 0 notebook_cont: .blkl 1 a_mod: .ascid /MODERATOR/ add_m: .word 0 .word notes$k_noop ;notes$k_user_mail_addr .long mail_addr .long 0 ; m_u: .word 0 .word notes$k_noop ;notes$k_user_name .long user_name .long 0 ; m_a: .word 0 .word notes$k_noop ;notes$k_user_access_list .long user_nodename .long 0 ; m_m: .word 4 .word notes$k_noop ;notes$k_user_moderate .long user_moderate .long 0 ; m_nu: .word 0 .word notes$k_noop .long 0 .long 0 ; .long 0 VEC: .LONG 2 .BLKL 1 .LONG 0 .LONG 0 try_mod: .ascid /Try for moderator priv on the Source conference/ OUT: .long 500 .long out+8 .blkb 500 o_msg_m: .ascid /enable moderator priv/ open_o: .word 8 .word notes$k_notefile_create_time .long create_time .long 0 ; .word 100 .word notes$k_notefile_user_area .long notefile_user_area .long notefile_user_area_len ; .long 0 open_m: .word 4 .word notes$k_notefile_moderate .long moderate .long 0 ; .word 4 .word notes$k_nosignal .long hint .long 0 ; .long 0 notefile_user_area: .blkb 100 notefile_user_area_len: .blkl 1 Null: .word 0 .word 0 .long 0 .long 0 ; .long 0 note_user_area_len: .blkl 1 note_user_area: .blkb 100 notes_beg_i: .word 4 .word notes$k_notefile_context .long 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 NUMBER_OF_NOTES: .blkl 1 no_sig: .long 1 NOTE_CONT: .blkl 1 file_cont: .blkl 1 conf: .ascid /CONF/ notefile_lastrev: .blkl 2 Notefile_file_name: .blkb 100 Notefile_file_name_len: .blkl 1 moderator_st: .blkb 500 moderator_st_len: .blkl 1 k_user_nodename: .blkb 300 k_user_nodename_len: .blkl 1 user_create_keyword: .blkl 1 write_bypass: .blkl 1 user_moderate: .blkl 1 mail_addr: .blkb 255 mail_addr_len: .blkl 1 user_nodename: .blkb 255 user_nodename_len: .blkl 1 user_name: .blkb 255 user_name_len: .blkl 1 high_uid: .blkl 1 entrytotal: .blkl 1 seen_map: .blkb 3000 seen_map_len: .blkl 1 moderate: .long 1 ; we want to be a Goderator !! hint: .long 1 create_time: .blkl 2 new_user: .ascid /NEW_USER/ new_u: .long 100 .long new_u+8 .blkb 100 replace: .ascid /REPLACE/ append: .ascid /... Appending to the existing Access List .../ find_i: .word 0 .word notes$k_noop .long 0 .long 0 ; .long 0 find_o: .word 100 .word notes$k_user_access_list .long old_ac .long old_ac_len ; .long 0 old_ac: .blkb 100 old_ac_len: .blkl 1 key_nam: .ascid /KEYWORD/ note_id: .blkb 50 note_id_len: .blkl 1 ret_note_author: .blkb 100 ret_note_author_len: .blkl 1 ret_note_title: .blkb 100 ret_note_title_len: .blkl 1 number_of_lines: .blkl 1 ret_note_time: .blkl 2 inv_i: .word 5 .word notes$k_note_id .long inv_no .long 0 ; .long 0 inv_no: .ascii /99999999999999999999999999/ add_add_o: .word 20 .word notes$k_note_id .long note_id .long note_id_len ; .word 100 .word notes$k_note_author .long ret_note_author .long ret_note_author_len ; .word 100 .word notes$k_note_title .long ret_note_title .long ret_note_title_len ; .word 4 .word notes$k_note_numrecords .long number_of_lines .long 0 ; .word 8 .word notes$k_note_create_time .long ret_note_time .long 0 ; .word 4 .word notes$k_note_uid .long note_uid .long 0 ; .long 0 note_uid: .blkl 1 get_I: .word 0 .word notes$k_note_id .long 0 .long 0 ; .word 4 .word notes$k_nosignal .long no_sig .long 0 ; .long 0 ctr_p1: .ascid /Note !AD !AD !AD !UL lines/ nnote_id: .ascid /NOTE_ID/ ctr_p3: .ascid /Note !7AD !20AD !30AD !4UL lines/ pmt: .long 100 .long pmt+8 .blkb 100 ctr_prompt: .ascid /ADD KEYWORD "!AS" to note !AD ? [N]: / ctr_prompt1: .ascid /DELETE KEYWORD "!AS" from note !AD ? [N]: / confirm: .ascid /CONFIRM/ CONFIRM_FLAG: .blkl 1 dlm: .ascid /-------------------------------------------------------------------------------/ mast_key_cont: .blkl 1 add_key: .word 0 .word NOTES$K_NOTE_ID .long note_id .long 0 ; k_len: .word 0 .word NOTES$K_KEYWORD_NAME .long input+8 .long 0 ; .long 0 no_add: .ascid /%PAN-I-NOTY, No add will be done / all: .ascid /ALL/ .entry delete_keyword, 0 ; confirm status ? pushaq Confirm calls #1,g^cli$Present blbs r0, 110$ movl #1,confirm_flag 110$: nop ; /ALL ? pushaq all calls #1,g^cli$Present blbc r0, 10$ clrl all 10$: nop ; 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 brw 2300$ 301$: nop 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 pad_star ent_in pushaw ent_out pushaw ent_in pushal notebook_cont calls #3,g^notes$entry_get check r0,error 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 2300$: 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 movl result_spec_len,Descr movab result_spec,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_filn,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl title_len,Descr movab title,Descr+4 ; pushaq Descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_title,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl notice_len,Descr movab notice,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_notice,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output ; try for mod status pushaq try_mod calls #1,g^lib$put_output pushaw open_o pushaw open_m pushal mast_file_cont calls #3,G^Notes$notefile_modify MOVL R0,VEC+4 $PUTMSG_S MSGVEC=VEC ; get note context... movab mast_file_cont, notes_beg_i+4 pushaw null pushaw notes_beg_i pushal mast_note_cont calls #3,G^Notes$note_begin check r0,error pushaw null pushaw notes_beg_i pushal mast_key_cont calls #3,G^Notes$keyword_begin check r0,error pushaq dlm calls #1,g^lib$put_output ; get the note number ; skip if ALL set tstl all bneq 801$ pushaq all_delete calls #1,g^lib$put_output brw 800$ 801$: nop movl #100,input Pushaw Input pushaq Input pushaq nnote_id calls #3,g^cli$get_value check r0,error ; get that note movw input, get_i movab input+8, get_i+4 pushaw add_add_o pushaw get_i pushal mast_note_cont calls #3,g^notes$note_get check r0,error ; tell us about that note movl #100,out $fao_s ctrstr=ctr_p3,outbuf=out,outlen=out,- p1=note_id_len,- p2=#note_id,- p3=ret_note_author_len,- p4=#ret_note_author,- p5=ret_note_title_len,- p6=#ret_note_title,- p7=number_of_lines pushaq out calls #1,g^lib$put_output 800$: nop ; get the keyword name movl #100,input Pushaw Input pushaq Input pushaq key_nam calls #3,g^cli$get_value check r0,error ; skip if ALL set tstl all bneq 3301$ brw 300$ 3301$: nop cmpl #0,Confirm_Flag beql 950$ brw 300$ 950$: nop ; generate the prompt movl #100,out $Fao_s ctrstr=ctr_prompt1,outbuf=pmt,outlen=pmt,- p1=#input,- p2=note_id_len,- p3=#note_id movl #100,out pushaw out pushal pmt pushaq out calls #3,g^lib$get_input check r0,error tstl out bneq 49$ pushaq no_add calls #1,g^lib$put_output $exit_s code=#1 49$: nop pushaq out pushaq out calls #2,g^str$upcase cmpb #^a/Y/,Out+8 beql 300$ pushaq no_add calls #1,g^lib$put_output $exit_s code=#1 300$: nop movw input, del_key movw note_id_len, nid tstl all bneq 123$ movw #notes$k_noop, nid+2 123$: nop pushaw out_key pushaw del_key pushal mast_key_cont calls #3,G^Notes$keyword_delete check r0,error ret all_delete: .ascid /%PAN-I-ALLD, deleting all reference to keyword / del_key: .word 0 .word NOTES$K_KEYWORD_NAME .long input+8 .long 0 ; nid: .word 0 .word NOTES$K_NOTE_ID .long note_id .long 0 ; .long 0 .entry show_conf_key,0 ; 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 brw 2300$ 301$: nop 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 pad_star ent_in pushaw ent_out pushaw ent_in pushal notebook_cont calls #3,g^notes$entry_get check r0,error 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 2300$: 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 movl result_spec_len,Descr movab result_spec,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_filn,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl title_len,Descr movab title,Descr+4 ; pushaq Descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_title,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl notice_len,Descr movab notice,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_notice,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output ; get note context... movab mast_file_cont, notes_beg_i+4 pushaw null pushaw notes_beg_i pushal mast_key_cont calls #3,G^Notes$keyword_begin check r0,error pushaq dlm calls #1,g^lib$put_output loop: nop pushaw out_key pushaw in_key pushal mast_key_cont calls #3,G^Notes$keyword_get check r0,error movw #notes$k_continue, in_key+2 movl #100,out $fao_s ctrstr=ctr_tell,outbuf=out,outlen=out,- p1=KEYWORD_NAME_len,- p2=#KEYWORD_NAME pushaq out calls #1,g^lib$put_output brw loop ret in_key: .word 1 .word NOTES$K_KEYWORD_NAME .long star .long 0 ; .word 4 .word notes$k_nosignal .long hint .long 0 ; .long 0 star: .ascii /*/ ctr_tell: .ascid /Keyword "!AD"/ .entry set_note_id,0 ; confirm status ? pushaq Confirm calls #1,g^cli$Present blbs r0, 110$ clrl confirm 110$: nop ; 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 brw 2300$ 301$: nop 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 pad_star ent_in pushaw ent_out pushaw ent_in pushal notebook_cont calls #3,g^notes$entry_get check r0,error 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 2300$: 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 movl result_spec_len,Descr movab result_spec,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_filn,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl title_len,Descr movab title,Descr+4 ; pushaq Descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_title,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output movl notice_len,Descr movab notice,descr+4 ; pushaq descr ; calls #1,g^lib$put_output movl #100,out $fao_s ctrstr=ctr_notice,outbuf=out,outlen=out,- p1=#Descr pushaq out calls #1,g^lib$put_output ; try for mod status pushaq try_mod calls #1,g^lib$put_output pushaw open_o pushaw open_m pushal mast_file_cont calls #3,G^Notes$notefile_modify MOVL R0,VEC+4 $PUTMSG_S MSGVEC=VEC ; get note context... movab mast_file_cont, notes_beg_i+4 pushaw null pushaw notes_beg_i pushal mast_note_cont calls #3,G^Notes$note_begin check r0,error pushaw null pushaw notes_beg_i pushal other_mast_note_cont calls #3,G^Notes$note_begin check r0,error pushaw null pushaw notes_beg_i pushal other_other_mast_note_cont calls #3,G^Notes$note_begin check r0,error pushaq dlm calls #1,g^lib$put_output ; get the NEW note number movl #100,input_new Pushaw Input_new pushaq Input_new pushaq new_id calls #3,g^cli$get_value check r0,error ; get that note movw Input_new, get_i movab Input_new+8, get_i+4 movw Input_new, mod_in movab Input_new+8, mod_in+4 pushaw add_add_o pushaw get_i pushal mast_note_cont calls #3,g^notes$note_get blbs r0,801$ brw 800$ 801$: nop ; is this the right note ? cmpc3 input_new, Input_new+8, note_id beql 799$ brw 800$ 799$: nop ; tell us about that note movl #100,out $fao_s ctrstr=ctr_p3,outbuf=out,outlen=out,- p1=note_id_len,- p2=#note_id,- p3=ret_note_author_len,- p4=#ret_note_author,- p5=ret_note_title_len,- p6=#ret_note_title,- p7=number_of_lines pushaq out calls #1,g^lib$put_output pushaq al_there calls #1,g^lib$put_output ; $exit_s code=#1 pushaq dlm calls #1,g^lib$put_output 800$: nop get_in: nop ; get the old note id movl #100,input Pushaw Input pushaq Input pushaq nnote_id calls #3,g^cli$get_value blbs r0,10$ $exit_s code=#1 10$: nop movl #100,out $fao_s ctrstr=ctr_ts,outbuf=out,outlen=out,- p1=#Input pushaq out calls #1,g^lib$put_output ; get that note get_note: nop movw #notes$k_note_id, get_i+2 movw Input, get_i movab Input+8, get_i+4 tstl flag beql 300$ movw #notes$k_continue, get_i+2 300$: nop incl flag pushaw add_add_o pushaw get_i pushal other_mast_note_cont calls #3,g^notes$note_get blbs r0,500$ cmpl r0,#NOTES$_NO_MORE_NOTES bneq 501$ clrl flag brw get_in 501$: $exit_s code=#1 500$: nop ; break lock on the target note movw break_range, get_i movab break_range+8, get_i+4 pushaw null pushaw get_i pushal mast_note_cont calls #3,g^notes$note_get check r0,error ; tell us about that note movl #100,out $fao_s ctrstr=ctr_p3,outbuf=out,outlen=out,- p1=note_id_len,- p2=#note_id,- p3=ret_note_author_len,- p4=#ret_note_author,- p5=ret_note_title_len,- p6=#ret_note_title,- p7=number_of_lines pushaq out calls #1,g^lib$put_output movw note_id_len, ntt movab note_id, ntt+4 ; modify it movzwl mod_in, descr movl mod_in+4, descr+4 ; pushaq descr ; calls #1,g^lib$put_output movw #4, get_I movw #notes$k_note_uid, get_i+2 movab note_uid, get_I+4 ; confirm ??? tstl confirm beql 5000$ clrl out+8 movl #100,out pushaw out pushal Mpmt pushaq out calls #3,g^lib$get_input check r0,error cmpb #^a/y/, out+8 beql 5000$ cmpb #^a/Y/, out+8 beql 5000$ brw get_note 5000$: nop pushaw mod_out pushaw mod_in pushal mast_note_cont calls #3,g^notes$note_modify check r0,error ; tell us the returned note id pushaw add_add_o pushaw get_i pushal other_other_mast_note_cont calls #3,g^notes$note_get check r0,error movl #100,out $fao_s ctrstr=ctr_ret,outbuf=out,outlen=out,- p1=note_id_len,- p2=#note_id pushaq out calls #1,g^lib$put_output brw get_note ret ctr_ret: .ascid /Note is now !AD/ mod_out: .word 100 .word notes$k_note_id .long ret_note .long ret_note_len ; .long 0 ret_note_len: .blkl 1 ret_note: .blkb 100 mod_in: .word 0 .word NOTES$K_NOTE_NEW_ID .long 0 .long 0 ; ntt: .word 0 .word NOTES$K_NOTE_id .long 0 .long 0 ; .long 0 new_id: .ascid /NEW_ID/ Input_new: .long 100 .long Input_new+8 .blkb 100 al_there: .ascid /%PAN-I-ALREXISTS_N, Target note already exists/ break_range: .ascid /1.*-9999.*/ other_other_mast_note_cont: .blkl 1 ctr_ts: .ascid /%PAN-I-CURSEL, Working on selection !AS/ flag: .blkl 1 Mpmt: .ascid /Move this note ? [N]: / .end