fab: $fab fac=,shr= rab: $rab usz=10000,rsz=10000,ubf=buffer,rbf=buffer,rac=key,- ksz=4,kbf=uid,fab=fab buffer: .blkb 10000 .library /sys$login:peb/ .library /sys$library:lib/ $prvdef $Maildef $hlpdef $notesdef $NOTESMSGDEF NOTEITEMS $ttdef $tt2def $brkdef $Fscndef fpmt: .ascid /Command (Copy) > / cpmt: .ascid /Cli Pmt > / ; --------------------------------------------------------------- .entry Copy_uid,0 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 brw 300$ 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 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 movl max_uid_in_high_uid, maximum_uid 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 ; -------------------------------------------------------------- pushaq dlm calls #1,g^lib$put_output pushaq op_msg_shad calls #1,g^lib$put_output ; get the shadow conf name movl #100,input Pushaw Input pushaq Input pushaq Shadow 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,1301$ ; skip if NOnotebook brw 1300$ 1301$: 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 tstl notebook_file_cont bneq 557799$ 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 557799$: nop ; 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, shad_entry_len movc3 entry_name_len, entry_name, shad_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 1300$: nop movw #default_name_len, def_l movab default_name, def_n pushaw notes_open_o pushaw notes_open_i pushal shad_file_cont calls #3,G^Notes$notefile_begin check r0,error 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 ; enable mod priv !! pushaq mod_en calls #1,g^lib$put_output pushaw open_o pushaw open_m pushal shad_file_cont calls #3,G^Notes$notefile_modify 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 movb descr,fab+fab$b_fns movl descr+4,fab+fab$l_fna pushaq dlm calls #1,g^lib$put_output pushaq o_msg calls #1,g^lib$put_output $open fab=fab check r0,error $connect rab=rab check r0,error pushaq dlm calls #1,g^lib$put_output movl #100,out $Fao_s ctrstr=ctr_max_u,outbuf=out,outlen=out,- p1=maximum_uid,- p2=max_uid_in_high_uid pushaq out calls #1,g^lib$put_output ; make sure it is a max uid we are about to set cmpl max_uid_in_high_uid,maximum_uid bleqU 588$ pushaq not_a_high calls #1,g^lib$put_output $exit_s code=#1 588$: nop ; get the conf header record $get rab=rab check r0,error cmpl max_uid_in_high_uid, buffer+92 beql 10$ pushaq san_fail calls #1,g^lib$put_output $exit_s code=#ss$_abort 10$: nop ; change the next uid field movl maximum_uid, buffer+92 $update rab=rab check r0,error error: ret 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 first_end: .ascid /%PAN-I-DONE, Scan terminated, first UID in master reached/ ctr_fire: .ascid /%PAN-I-RANGE, UID range !XL (note !AD) to !XL (last note)/ no_up_done: .ascid /%PAN-F-NSHAD, No shadow update has been done/ op_msg_mast: .ascid /%PAN-I-OPEN_SC, Opening the Master conference/ op_msg_shad: .ascid /%PAN-I-OPEN_TC, Opening the Shadow conference/ o_msg: .ascid /%PAN-I-OPEN_R, Opening file for RMS access/ result_spec: .blkb 150 result_spec_len: .blkl 1 Shadow: .ascid /SHADOW/ shad_entry_len: .blkl 1 shad_entry: .blkb 300 shad_file_cont: .blkl 1 title: .blkb 100 title_len: .blkl 1 uid: .blkl 1 OUT: .long 500 .long out+8 .blkb 500 out_len = . - out tmp_OUT: .long 500 .long tmp_out+8 .blkb 500 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 Null: .word 0 .word 0 .long 0 .long 0 ; .long 0 notice: .blkb 100 notice_len: .blkl 1 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 ; .word 4 .word notes$k_notefile_high_uid .long max_uid_in_high_uid .long 0 ; .word 100 .word notes$k_notefile_user_area .long notefile_user_area .long notefile_user_area_len ; .word 8 .word notes$k_notefile_create_time .long create_time .long 0 ; .long 0 master_create_time: .blkl 2 Notefile_file_name: .blkb 100 Notefile_file_name_len: .blkl 1 notebook_spec: .long 100 .long notebook_spec+8 .blkb 100 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 notebook_file_cont: .blkl 1 notebook: .ascid /NOTEBOOK/ book_in: .word 4 .word notes$k_notefile_context .long notebook_file_cont .long 0 ; .long 0 notebook_cont: .blkl 1 mod_en: .ascid /%PAN-I-MODP, Enable moderator privileges on the Target conference/ mast_file_cont: .blkl 1 master_entry_len: .blkl 1 master_entry: .blkb 300 Master: .ascid /MASTER/ input: .long 300 .long input+8 .blkb 300 full_default_name: .ascii /Notes$Library:.Note/ full_default_name_len =. - full_default_name 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 dlm: .ascid /-------------------------------------------------------------------------------/ descr: .blkl 2 ctr_title: .ascid /%PAN-I-TI, Title = "!AS"/ ctr_notice: .ascid /%PAN-I-NO, Notice = "!AS"/ ctr_filn: .ascid /%PAN-I-CONF, Conference file is "!AS"/ ctr_ent: .ascid /%PAN-I-ENTO, Opening notebook entry !AS ............../ ctr_ent1: .ascid /%PAN-I-CONO, Opening conference !AS ............../ unseen_est: .blkl 1 seen_map: .blkb 3000 seen_map_len: .blkl 1 NUMBER_OF_NOTES: .blkl 1 note_user_area_len: .blkl 1 note_user_area: .blkb 100 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 notefile_user_area: .blkb 100 notefile_user_area_len: .blkl 1 notefile_lastrev: .blkl 2 moderator_st: .blkb 500 moderator_st_len: .blkl 1 moderate: .long 1 ; we want to be a Goderator !! max_uid_in_high_uid: .blkl 1 last_status: .blkl 1 is_restricted: .blkl 1 hint: .long 1 high_uid: .blkl 1 ent_in: .word 0 .word notes$k_entry_name .long 0 .long 0 ; .word default_name_len cl_xy: .word notes$k_noop ;notes$k_notefile_default_name .long default_name .long default_name_len ; .long 0 entrytotal: .blkl 1 default_name: .ascii /Notes$library:.Note/ default_name_len =. - default_name create_time: .blkl 2 ctr_max_u: .ascid /Copy the input maximum UID (!XL) to the output conf (!XL)/ maximum_uid: .blkl 1 not_a_high: .ascid /*** This is __NOT__ a higher UID than exists ***/ san_fail: .ascid />>> failed to understand the file structure <<,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 << nop nop movl (ap), R2 movl @4(ap), R3 ; number of notes written movl 8(ap), R4 ; address of return info structure movl @12(ap), R8 ; create a DCL symbol for notes written PAN$EXTRACT_NOTES_WRITTEN movl #100,out $fao_s ctrstr=ctr_rep10,outbuf=out,outlen=out,- p1=R3 PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ p_wrt ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error ; default the other symbols clrl out PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ e_noI ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ e_noA ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ e_noT ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error cmpl #^x3fd19, R8 beql 456$ pushaq sym_cre calls #1,g^lib$put_output 456$: nop movl @4(ap), R3 ; number of notes written cmpl #1, R3 beql 10$ ret 10$: nop ;0 (itmcod = notes$k_note_id, ;12 (itmcod = notes$k_note_author, ;24 (itmcod = notes$k_note_pen_name, ;36 (itmcod = notes$k_note_title, ; (itmcod = notes$k_note_create_time, ; (itmcod = notes$k_note_numresponses, ; (itmcod = notes$k_note_numrecords, ; (itmcod = notes$k_note_hidden, ; (itmcod = notes$k_note_blink_id, ; (itmcod = notes$k_note_blink_title, ; (itmcod = notes$k_notefile_file_name, ; ------------------------------------------------------------- movl 8(ap), R9 ; address of return info structure cmpw #notes$k_note_id, 2(R9) beql 20$ pushaq struc_q calls #1,g^lib$put_output $exit_s code=#1 20$: nop movl 4(R9), R4 movl @8(R9), R5 movl #100,out $fao_s ctrstr=ctr_s1,outbuf=out,outlen=out,- p1=R5,- p2=R4 PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ e_noI ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error ; ------------------------------------------------------------- movl 8(ap), R9 ; address of return info structure addl2 #12, R9 cmpw #notes$k_note_author, 2(R9) beql 21$ pushaq struc_q calls #1,g^lib$put_output $exit_s code=#1 21$: nop movl 4(R9), R4 movl @8(R9), R5 movl #100,out $fao_s ctrstr=ctr_s1,outbuf=out,outlen=out,- p1=R5,- p2=R4 PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ e_noA ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error ; ------------------------------------------------------------- movl 8(ap), R9 ; address of return info structure addl2 #36, R9 cmpw #notes$k_note_title, 2(R9) beql 22$ pushaq struc_q calls #1,g^lib$put_output $exit_s code=#1 22$: nop movl 4(R9), R4 movl @8(R9), R5 locc #0, #100 , (R4) subl3 R0, #100, R5 movl #100,out $fao_s ctrstr=ctr_s1,outbuf=out,outlen=out,- p1=R5,- p2=R4 PUSHAL DCLFLAG PUSHAQ out ; value of symbol PUSHAQ e_noT ; symbol to set CALLS #3,G^LIB$SET_SYMBOL check r0,error ret ctr_s1: .ascid /!AD/ struc_q: .ascid /%PAN-F-INERR, Internal structure error/ .entry do_pan_enable_mod,^m pushaq mod calls #1,g^Cli$Present blbc r0,10$ cmpl #^x3fd19, @8(ap) beql 456$ pushaq mod_en calls #1,g^lib$put_output 456$: nop movl @4(ap), shad_file_cont pushaw null pushaw open_m pushal shad_file_cont calls #3,G^Notes$notefile_modify blbs r0,10$ MOVL R0,VEC+4 $PUTMSG_S MSGVEC=VEC 10$: nop movl #1, r0 ret mod: .ascid /MODERATOR/ ent_this: .ascid /******* do_pan_enable_mod *******/ VEC: .LONG 2 .BLKL 1 .LONG 0 .LONG 0 last_shadow_update: .blkl 2 ctr_word: .ascid /word 7 !UW / blank: .ascid / / missing: .blkl 1 ny: .ascii /not yet copied/ ny_len = . - ny none: .ascii /**None**/ none_len = . - none report: .ascid /REPORT_ONLY/ base_fnd: .ascid /this is a base note/ ask_out: .word 4 .word notes$k_note_uid .long note_uid .long 0 ; .word 20 .word notes$k_note_id .long mast_note_id .long mast_note_id_len ; .long 0 ask_in: .word 0 .word notes$k_note_id .long 0 .long 0 ; .long 0 save: .blkl 500 save_point: .long save saved: .blkl 1 ask_out_iw: .word 4 .word notes$k_note_uid .long iw_note_uid .long 0 ; .word 20 .word notes$k_note_id .long iw_note_id .long iw_note_id_len ; .long 0 iw_note_uid: .blkl 1 iw_note_id: .blkb 50 iw_note_id_len: .blkl 1 ctr_iw1: .ascid /The target note_id !AD exists in the shadow,as UID !XL/ ctr_cb: .ascid /!AS.0/ other_mast_note_cont: .blkl 1 fred: .blkl 1 master_name_flag: .ascid +/NOnotebook + master_name: .long 100 .long master_name+8 .blkb 100 shadow_name_flag: .ascid +/NOnotebook + shadow_name: .long 100 .long shadow_name+8 .blkb 100 ctr_am: .ascid +$ Pan Copy Note !AS!AS !AS!AS /Range=!AD /NOlog !AS+ ctr_am1: .ascid +$ Pan Copy Note !AS!AS !AS!AS /NOlog /Limit=100 !AS+ am: .ascid +Do the following (or use SYNC/COPY) to get this note+ am1: .ascid /Spawning PAN to copy this note/ S_FLAG: .LONG 0 m_pad: .ascid / / s_pad: .ascid / / .entry cond_hand, ^m ; get pointer to signal array movl chf$l_sigarglst(ap),r5 movl chf$l_sig_name(r5),R5 cmpl R5,#NOTES$_NO_SUCH_NOTE beql 10$ movl #ss$_resignal, r0 ret 10$: movl #ss$_continue, r0 ret symbol: .ascid /PAN$TO_BE_COPIED/ DCLFLAG: .LONG LIB$K_CLI_GLOBAL_SYM def_tbc: .ascid /-1/ keyword_cnx: .blkl 1 keyword: .ascii /PAN$DATA_STORE/ keyword_len = . - keyword key_out: .word 100 .word NOTES$K_KEYWORD_USER_AREA .long KEYWORD_USER_AREA .long KEYWORD_USER_AREA_len ; .long 0 KEYWORD_USER_AREA: .blkb 100 KEYWORD_USER_AREA_len: .blkl 1 key_in: .word 0 .word NOTES$K_KEYWORD_NAME .long 0 .long 0 ; .word 4 .word notes$k_nosignal .long no_sig .long 0 ; .long 0 keyword_add: .ascid /Adding keyword PAN$DATA_STORE/ ctr_wm1: .ascid /Master conf creation date is !%D/ ctr_wm2: .ascid /Master conf creation date is !%D (Stored in the shadow conf)/ key_add: .word 0 .word NOTES$K_KEYWORD_USER_AREA .long KEYWORD_USER_AREA .long 0 ; .word keyword_len .word NOTES$K_KEYWORD_NAME .long keyword .long 0 ; .long 0 p_wrt: .ascid /PAN$EXTRACT_NOTES_WRITTEN/ e_noI: .ascid /PAN$EXTRACT_NOTE_ID/ e_noA: .ascid /PAN$EXTRACT_NOTE_AUTHOR/ e_noT: .ascid /PAN$EXTRACT_NOTE_TITLE/ sym_cre: .ascid /%PAN-I-SYMC, DCL symbols PAN$EXTRACT_* created/ time: .ascid /0 00:00:30/ quad: .blkl 2 break_in: .word 10 .word notes$k_note_id .long break_range .long 0 ; .long 0 break_range: .ascii /1.*-999999.*/ no_base_m: .ascid /asking the master for this base note did not find it/ limit_done: .ascid / **** LIMIT time has expired ****/ id_ch: .blkl 1 limit: .ascid /LIMIT_TIME/ ctr_tell_uI: .ascid /master note !AD, shadow note is now !AD/ .entry limit_ast,^m pushaq limit_done calls #1,g^lib$put_output clrl limit_done ret .end