-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathMANAGER
1729 lines (1471 loc) · 102 KB
/
MANAGER
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "21-May-2024 18:45:54" {LU}MANAGER.;4 102968
:EDIT-BY "mth"
:CHANGES-TO (FNS Manager.DO.COMMAND)
:PREVIOUS-DATE "20-May-2024 11:16:10" {LU}MANAGER.;3)
(PRETTYCOMPRINT MANAGERCOMS)
(RPAQQ MANAGERCOMS
[
(* ;; "The Manager : a menu based interface to the file manager. ")
(* ;; "Originally written by: Jay Ferguson of Ford Aerospace & Communications Corp and Robert Noble of Intellicorp. ")
(* ;; "Rewritten by Larry Masinter, winter of 1986.")
(* ;;
"Further modifications & significant enhancements by Andrew J. Cameron III, summer of 1987.")
(* ;; "Ongoing maintenance and performance tuning by Ron Fischer at Xerox AI Systems.")
(* ;; "")
(* ;; "There are two patches in here that should be removed if Xerox Lisp is fixed. The first is the advice (MARKASCHANGED :IN DEFAULT.EDITDEFA0001) that removes a (mostly) redundant call to MARKASCHANGED in the editor interface, which otherwise slows down manager updates. Somehow this call is not redundant when editing FILELST (perhaps there's a special case for FILELST or when items are not in any existing files). The second is the fns Manager.REMOVE.DUPLICATE.ADVICE called by the advice on LOAD and LOADFNS, which removes redundant advice which would otherwise pile up and cause massive slow downs in manager updates!")
(* ;; "")
(* ;; "The edit history is now kept in the file MANAGER.HISTORY.")
(* ;; "")
(* ;; "Known bugs and feature requests are now kept in the documentation file MANAGER.TEDIT.")
(* ;; "")
(SPECVARS Manager.ACTIVEFLG MANAGER-CASES MANAGER-ADDTOFILES?)
(GLOBALVARS LAMBDAFONT DEFAULTFONT MENUFONT BOLDMENUFONT MANAGER-WINDOWS LOADDBFLG SAVEDBFLG
MANAGER-ITEM-OPERATION-COMMANDS MANAGER-ITEM-FILE-RELATION-COMMANDS
MANAGER-FILE-OPERATIONS-COMMANDS MANAGER-FILE-FILE-RELATION-COMMANDS
MANAGER-MAIN-MENU-ITEMS MANAGER-ACTIVITY-WINDOW-TITLE MANAGER-MAIN-WINDOW
MANAGER-MAIN-ICONW Manager.WINDOW-ANCHOR MANAGER.BM MANAGER.BM.MASK
BackgroundMenuCommands BackgroundMenu)
(VARS *UNMANAGED-TYPES* MANAGER-ACTIVITY-WINDOW-TITLE (MANAGER-CASES)
(MANAGER-ADDTOFILES?)
MANAGER-FILE-FILE-RELATION-COMMANDS MANAGER-FILE-OPERATIONS-COMMANDS
MANAGER-ITEM-FILE-RELATION-COMMANDS MANAGER-ITEM-OPERATION-COMMANDS
MANAGER-MAIN-MENU-ITEMS MANAGER.BM MANAGER.BM.MASK)
(INITVARS (Manager.ACTIVEFLG NIL)
(Manager.SORTFILELSTFLG T)
(Manager.WINDOW-ANCHOR 'ANCHOR-BL)
(Manager.MENUROWS 20)
(Manager.DATASPACE NIL)
(MANAGER-WINDOWS NIL)
(MANAGER-MAIN-WINDOW NIL)
(MANAGER-MAIN-ICONW (ICONW MANAGER.BM MANAGER.BM.MASK
(create POSITION XCOORD _ 0 YCOORD _ 0)
T))
(MANAGER-OPEN-WINDOWS NIL)
(MANAGER-FILE-MENU NIL)
(MANAGER-FILELST-MENU NIL)
(MANAGER-FILE-OPERATIONS-MENU NIL)
(MANAGER-FILE-FILE-RELATION-MENU NIL)
(MANAGER-MARKED-SHADE BOLDMENUFONT))
(FILES DATABASEFNS FILEBROWSER (FROM LISPUSERS)
COMMON-MAKE)
(* ; "FILEBROWSER for SEE command")
(FNS MANAGER MANAGER.RESET Manager.ADDADV Manager.ADDTOFILES? Manager.ALTERMARKING
Manager.ANCHORED-SET-POSITION Manager.DO.COMMAND Manager.DO.COMMAND.PROCFN
Manager.HIGHLIGHT Manager.PROMPT Manager.WINDOW Manager.insurefilehighlights
Manager.CHANGED? Manager.CHECKFILE Manager.COLLECTCOMS Manager.COMS.WSF Manager.COMSOPEN
Manager.COMSUPDATE Manager.HIGHLIGHTED Manager.INSUREHIGHLIGHTS Manager.FILECHANGES
Manager.FILELSTCHANGED? Manager.FILESUBTYPES Manager.GET.ENVIRONMENT Manager.GETFILE
Manager.INTITLE? Manager.MAIN.WSF Manager.MAINCLOSE Manager.MAINMENUITEMS
Manager.MAINOPEN Manager.MAINUPDATE Manager.MAKEFILE.ADV Manager.MENUCOLUMNS
Manager.MENUHASITEM Manager.MENUITEMS Manager.REMOVE.DUPLICATE.ADVICE
Manager.RESETSUBITEMS Manager.SET-ANCHOR Manager.SORT.COMS Manager.SORTBYCOLUMN)
(ADVISE ADDFILE ADDTOFILES? MAKEFILE MARKASCHANGED UNMARKASCHANGED UPDATEFILES ADDTOCOMS
DELFROMCOMS \ADDTOFILEBLOCK/ADDNEWCOM LOAD LOADFNS (MARKASCHANGED :IN
DEFAULT.EDITDEFA0001))
(MACROS GETDATUM PUTDATUM Manager.TTYCOMMAND)
(PROP MANAGER-DEFINITION-TYPE-COMMANDS ADVICE FNS RECORDS VARS FUNCTIONS)
(ADDVARS (BackgroundMenuCommands (File% Manager (MANAGER)
"Starts the menu driven file manager")))
(P (LSUBST 'Manager NIL BackgroundMenuCommands)
(* ;
"remove old manager entry if it exists")
(SETQ BackgroundMenu NIL)
(* ;
" cause the backGround menu to be rebuilt")
(MANAGER.RESET (CL:SYMBOL-VALUE 'Manager.ACTIVEFLG))
(* ;
"Shutdown any old manager windows and restart if we're already running.")
(if (STREQUAL MANAGER-ACTIVITY-WINDOW-TITLE (WINDOWPROP NIL 'TITLE))
then
(* ; "If we're in the manager activity window, close it, since we dropped the pointer to it in MANAGER.RESET.")
(CLOSEW NIL)))
(PROP (MAKEFILE-ENVIRONMENT FILETYPE)
MANAGER)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
(NLAML)
(LAMA])
(* ;; "The Manager : a menu based interface to the file manager. ")
(* ;;
"Originally written by: Jay Ferguson of Ford Aerospace & Communications Corp and Robert Noble of Intellicorp. "
)
(* ;; "Rewritten by Larry Masinter, winter of 1986.")
(* ;; "Further modifications & significant enhancements by Andrew J. Cameron III, summer of 1987.")
(* ;; "Ongoing maintenance and performance tuning by Ron Fischer at Xerox AI Systems.")
(* ;; "")
(* ;;
"There are two patches in here that should be removed if Xerox Lisp is fixed. The first is the advice (MARKASCHANGED :IN DEFAULT.EDITDEFA0001) that removes a (mostly) redundant call to MARKASCHANGED in the editor interface, which otherwise slows down manager updates. Somehow this call is not redundant when editing FILELST (perhaps there's a special case for FILELST or when items are not in any existing files). The second is the fns Manager.REMOVE.DUPLICATE.ADVICE called by the advice on LOAD and LOADFNS, which removes redundant advice which would otherwise pile up and cause massive slow downs in manager updates!"
)
(* ;; "")
(* ;; "The edit history is now kept in the file MANAGER.HISTORY.")
(* ;; "")
(* ;; "Known bugs and feature requests are now kept in the documentation file MANAGER.TEDIT.")
(* ;; "")
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(SPECVARS Manager.ACTIVEFLG MANAGER-CASES MANAGER-ADDTOFILES?)
)
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS LAMBDAFONT DEFAULTFONT MENUFONT BOLDMENUFONT MANAGER-WINDOWS LOADDBFLG SAVEDBFLG
MANAGER-ITEM-OPERATION-COMMANDS MANAGER-ITEM-FILE-RELATION-COMMANDS
MANAGER-FILE-OPERATIONS-COMMANDS MANAGER-FILE-FILE-RELATION-COMMANDS MANAGER-MAIN-MENU-ITEMS
MANAGER-ACTIVITY-WINDOW-TITLE MANAGER-MAIN-WINDOW MANAGER-MAIN-ICONW Manager.WINDOW-ANCHOR
MANAGER.BM MANAGER.BM.MASK BackgroundMenuCommands BackgroundMenu)
)
(RPAQQ *UNMANAGED-TYPES* (EXPRESSIONS FILES FIELDS FILEVARS-ARE-NOW-OK))
(RPAQQ MANAGER-ACTIVITY-WINDOW-TITLE "Manager Command Activity")
(RPAQQ MANAGER-CASES NIL)
(RPAQQ MANAGER-ADDTOFILES? NIL)
(RPAQQ MANAGER-FILE-FILE-RELATION-COMMANDS
((" Delete " 'DELETE "Delete this file")
("Rename" 'RENAME "Rename this file")
("Copy" 'COPY "Copy this item to another file")
("Mark" 'CHANGED "Mark this file as being changed")
("Unmark" 'UNMARK "Unmark this file as being changed")))
(RPAQQ MANAGER-FILE-OPERATIONS-COMMANDS
[("See" 'SEE "Show file in a window" (SUBITEMS ("Fast" 'SEE "Show file in a window")
(" Scrollable " 'TEDIT-SEE
"Show file in a scrollable window")))
("(Re)Load" 'LOAD "Load the source of this file" (SUBITEMS ("Load" 'LOAD
"Load the source of this file"
)
(" SysLoad " 'SYSLOAD
"SysLoad the file: smashes everything on the way in and is not UNDOable"
)))
("MakeFile" 'MAKEFILE "Dump the source of this file" (SUBITEMS ("MakeFile" 'MAKEFILE
"Dump the source of this file, by remaking it"
)
("New" 'NEW
"Don't copy any definitions from old version"
)
("Fast" 'FAST
"Dump the source without pretty printing"
)
(" CommonLisp " 'COMMON-MAKEFILE
"Create a .LSP file containing plain CommonLisp source
Will load Common-MakeFile if necessary")))
("List" 'LIST "List this file on the default printer")
("CleanUp" 'CLEANUP "Dump, list and recompile this file" (SUBITEMS ("CleanUp" 'CLEANUP
"Dump, list and recompile this file, using the default cleanup compiler"
)
(
" Set default: compile-file "
CLEANUPC
"Change the default cleanup compiler to compile-file; yeilding .dfasl files"
)
("Set default: TCOMPL"
CLEANUPT "Change the default cleanup compiler to TCOMPL; yeilding .LCOM files
This compiler will be going away soon")))
["MasterScope" 'ANALYZE "Analyze the FNS on the selected file with MasterScope"
(SUBITEMS ("Analyze" 'ANALYZE "Analyze the FNS on the selected file with MasterScope")
("Check" 'CHECK "Check the file for problems through MasterScope")
("Show Paths" 'SHOWPATHFILE
"Show all functions called by functions in this file")
(" DataBaseFNS " 'DBFILE
"Display DATABASE property for this file
Will load DataBaseFNS if necessary" (SUBITEMS ("Set to Ask" 'DBFILEASK
"Ask about disposition of MasterScope information when loading and storing this file"
)
("Set to On" 'DBFILEON
"Automatically maintain the MasterScope information for this file"
)
("Set to Off" 'DBFILEOFF
"Do not automatically maintain the MasterScope information for this file"
)
(" Load DB " 'LOADDB
"Load this file's MasterScope information, if it exists and make it's upkeep automatic"
)
("Dump DB" 'DUMPDB
"Dump this file's MasterScope information, if it exists and make it's upkeep automatic"
]
("Compile" 'COMPILE "Compile this file" (SUBITEMS ("Compile" 'COMPILE "InterLisp compiler")
(" CL:COMPILE-FILE " 'CL:COMPILE-FILE
"CommonLisp compiler")))
("Changes" 'CHANGES "Show the changes that have been made to this file."
(SUBITEMS ("Brief" 'CHANGES "Show the changes that have been made to this file.")
(" Everything " 'PL "Display everything on this file's property list")
("Edit PL" 'EDIT "Edit this file's property list"])
(RPAQQ MANAGER-ITEM-FILE-RELATION-COMMANDS
((" Delete " 'DELETE "Delete this item")
("EditAll" 'EDITCALLERS "Edit occurances of this item's name in its file")
("Rename" 'RENAME "Rename this item and update its file with new name"
(SUBITEMS ("Rename" 'RENAME
"Rename this item locally and update its file with new name")
("CopyDef" 'COPYDEF "Make a copy with a new name")
(" Rename All " 'RENAME-ALL "Rename this item in *ALL* loaded files")))
("Move" 'MOVE "Move this item to another file")
("Copy" 'COPY "Copy this item to another file")
("Mark" 'CHANGED "Mark this item as being changed" (SUBITEMS ("Changed" 'CHANGED
"Mark item as being CHANGED"
)
(" Defined " 'DEFINED
"Mark item as being DEFINED"
)
("Deleted" 'DELETED
"Mark item as being DELETED"
)))
("Unmark" 'UNMARK "Unmark this item as being changed")))
(RPAQQ MANAGER-ITEM-OPERATION-COMMANDS
[("Edit" 'EDIT "Edit this item")
(" PrettyPrint " 'SHOWDEF "Show how this item would be written to a file"
(SUBITEMS ("Show" 'SHOWDEF "Show how this item would be written to a file")
("Value" 'PV "Display (Pretty-Print) this item's value")
("Function Def" 'PF "Display (Pretty-Print) this item's function definition")
(" Property List " 'PL "Display this item's property list")))
(" Documentation " 'CLDOC "Show the CommonLisp documentation string for this item"
(SUBITEMS (" Documentation " 'CLDOC
"Show the CommonLisp documentation string for this item")
(" Describe " 'CLDESCRIBE "Show the CommonLisp description of this item"])
(RPAQQ MANAGER-MAIN-MENU-ITEMS
[("MakeFiles" 'MAKEFILE "Update the source of all changed files")
("CleanUp" 'CLEANUP "Dump, list and recompile any changed files" (SUBITEMS
("CleanUp" 'CLEANUP
"Dump, list and recompile any changed files, using the default cleanup compiler"
)
(
" Set default: compile-file "
'CLEANUPC
"Change the default cleanup compiler to compile-file; yielding .dfasl files"
)
("Set default: TCOMPL"
'CLEANUPT "Change the default cleanup compiler to TCOMPL; yielding .LCOM files
This compiler will be going away soon")))
("Changes" 'CHANGES "Prints all the changes that have been made")
["MS DataBaseFNS" 'DB
"Displays the current MasterScope database flags,
Will load DataBaseFNS if necessary" (SUBITEMS ("All" 'DB
"Displays the current MasterScope database flags"
(SUBITEMS (" Set to Ask " 'DBASK
"Ask user when Loading and/or Saving files"
)
("Set to On" 'DBON
"Always maintain MasterScope database information"
)
("Set to Off" 'DBOFF
"Stop maintaining MasterScope database information"
)))
("Load" 'DB
"Displays the current MasterScope database flags"
(SUBITEMS (" Set to Ask " 'DBLOADASK
"Ask user when Loading files")
("Set to On" 'DBLOADON
"Maintain MasterScope database information when Loading"
)
("Set to Off" 'DBLOADOFF
"Don't load MasterScore information from database files"
)))
(" Save " 'DB
"Displays the current MasterScope database flags"
(SUBITEMS (" Set to Ask " 'DBSAVEASK
"Ask user when Saving files")
("Set to On" 'DBSAVEON
"Maintain MasterScope database information when Loading"
)
("Set to Off" 'DBSAVEOFF
"Don't save MasterScore information in database files"
]
("Files?" 'FILES? "Ask for updates and display status of files")
("Add" 'LOADFNSLATER "Add a file to the FileManager's menu"
(SUBITEMS ("LoadFns" 'LOADFNSLATER "Notice a file using LOADFNS"
(SUBITEMS (" LoadFns Later " 'LOADFNSLATER
"Notice a file, but don't load the function defs until needed"
)
("LoadFns Now" 'LOADFNSNOW
"Notice a file and loads all it's function defs")))
("LoadFrom" 'LOADFROMLATER "Notice a file using LOADFROM"
(SUBITEMS (" LoadFrom Later " 'LOADFROMLATER
"Notice a file with side-effects, but don't load the function defs until needed"
)
("LoadFrom Now" 'LOADFROMNOW
"Notice a file with side-effects and load all it's function defs"
)))
("Load" 'LOAD "Notice a file by actually LOADing it")
("AddFile" 'ADDFILE "Notices a file via ADDFILE (buggy)")
("Edit FILELST" 'EDIT
"Edit the variable which lists the files noticed by the file package")))
("Advice" 'SHOWADVICE "Display the list of advised or traced fns and functions.")
("Set Window Anchor" 'ANCHOR-BL
"Set the anchor corner for window growth to Bottom Left (default)"
(SUBITEMS (" Top Left " 'ANCHOR-TL "Set the anchor corner to Top Left")
(" Top Right " 'ANCHOR-TR "Set the anchor corner to Top Right")
(" Bottom Left " 'ANCHOR-BL "Set the anchor corner to Bottom Left")
(" Bottom Right " 'ANCHOR-BR "Set the anchor corner to Bottom Right")))
("Quit" 'QUIT "Shut down all manager windows" (SUBITEMS ("Quit" 'QUIT
"Shut down all manager windows"
)
(" Reset " 'RESET
"Reset the manager, leaving only the main window open"
])
(RPAQQ MANAGER.BM #*(72 40)@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@LIOOOOOOOOL@@@@@@@@@MEAAAAAAOOL@@@@@@@@@MMMEMEEGOOL@@@@@@@@@MMAEAAGGOOL@@@@@@@@@MMAEAMAGOOL@@@@@@@@@OOOOOAOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@H@@@@@@@@HD@@@@@@@@@IK@@@@@@@DD@@@@@@@@@IEGGE@@@@JD@@@@@@@@FIAEEE@@@@EEOOOOOO@@FIADEE@@@@JEOOOOOO@@FIAGEG@@@@DEOGOOOO@@FH@@@@@@@@HENBCOOO@@FOOOOOOOOOOMOFKOOO@@FH@@@@@@@@HEOFKOOO@@FIL@@@B@@@DEOFCOOO@@FIB@@@B@@@JEOOOOOO@@FILNNNN@@@EEOOOOOO@@DIBBLNN@@@JD@@@@@A@@DIBNFHJ@@@DDLIEHMM@@DILNNNN@@@HEAEEEAA@@DH@@@@@@@@@DIEEIAI@@DOOOOOOOOOOLEEEEAA@@DH@@@@@@@@HEHHIDMM@@DI@B@@F@@@DD@@@@@A@@FIGGGGDNNNJEOOOOOO@@DIEBEEFBHJED@@@@@A@@DIEBDDDNHHJD@@@@@A@@DIECGDDNNNDDNJCIJA@@DH@@@@@@@@HDHJBBAA@@DOOOOOOOOOOLLJCCIA@@D@@@@@@@@@@@HJB@IA@@DDANANDDDDHLHKKKBA@@D@@@@@@@@@@@@@@@@A@@GOOOOOOOOOOOOOOOOO@@
)
(RPAQQ MANAGER.BM.MASK #*(72 40)@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@@OOOOOOOOOOL@@@@@@@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@GOOOOOOOOOOOOOOOOO@@
)
(RPAQ? Manager.ACTIVEFLG NIL)
(RPAQ? Manager.SORTFILELSTFLG T)
(RPAQ? Manager.WINDOW-ANCHOR 'ANCHOR-BL)
(RPAQ? Manager.MENUROWS 20)
(RPAQ? Manager.DATASPACE NIL)
(RPAQ? MANAGER-WINDOWS NIL)
(RPAQ? MANAGER-MAIN-WINDOW NIL)
(RPAQ? MANAGER-MAIN-ICONW (ICONW MANAGER.BM MANAGER.BM.MASK (create POSITION XCOORD _ 0 YCOORD _ 0)
T))
(RPAQ? MANAGER-OPEN-WINDOWS NIL)
(RPAQ? MANAGER-FILE-MENU NIL)
(RPAQ? MANAGER-FILELST-MENU NIL)
(RPAQ? MANAGER-FILE-OPERATIONS-MENU NIL)
(RPAQ? MANAGER-FILE-FILE-RELATION-MENU NIL)
(RPAQ? MANAGER-MARKED-SHADE BOLDMENUFONT)
(FILESLOAD DATABASEFNS FILEBROWSER (FROM LISPUSERS)
COMMON-MAKE)
(* ; "FILEBROWSER for SEE command")
(DEFINEQ
(MANAGER
[LAMBDA (POSITION) (* ; "Edited 3-Sep-87 13:58 by raf")
(* ;;; "Turns manager on if its not already on")
(if (OR (NULL Manager.ACTIVEFLG)
(NULL MANAGER-MAIN-WINDOW)
(Manager.FILELSTCHANGED?))
then
(* ;; "If either the manager was off or FILELST changed, rebuild main menu.")
(if Manager.ACTIVEFLG
then (Manager.MAINCLOSE))
(LET ((Manager.ACTIVEFLG NIL))
(UPDATEFILES))
(if FILELST
then (Manager.MAINOPEN POSITION)
else (PROMPTPRINT "FILELST is empty; there are no files to manage."))
else (TOTOPW MANAGER-MAIN-WINDOW])
(MANAGER.RESET
[LAMBDA (RESTARTFLG) (* ; "Edited 21-Aug-87 11:41 by raf")
(* ;;; "Remove all cached menu info, close the main window, clear the global data space. If the RESTARTFLG is true, turn everything on again.")
(* ;; "Delete all of the menu caches")
(for X in FILEPKGCOMSPLST when (LITATOM X) do (REMPROP X 'MANAGER-ITEM-OPERATION-MENU))
(SETQ MANAGER-MAIN-MENU NIL)
(SETQ MANAGER-FILE-OPERATIONS-MENU NIL)
(SETQ MANAGER-ITEM-FILE-RELATION-MENU NIL)
(SETQ MANAGER-ITEM-OPERATION-MENU NIL)
(LET [(REGION (AND RESTARTFLG (WINDOWP MANAGER-MAIN-WINDOW)
(WINDOWPROP MANAGER-MAIN-WINDOW 'REGION]
(* ;
"Save away the old region (if there was one.")
(* ;; "Close the main window and all subwindows.")
(Manager.MAINCLOSE T)
(* ;; "Clear the data space.")
[SETQ Manager.DATASPACE (COPY '((NIL]
(if RESTARTFLG
then
(* ;; "Now turn it all on again.")
[MANAGER (AND REGION (create POSITION
XCOORD _ (fetch (REGION LEFT) of REGION)
YCOORD _ (fetch (REGION BOTTOM) of REGION]
else (SETQ Manager.ACTIVEFLG NIL])
(Manager.ADDADV
[LAMBDA (!VALUE FILECOMS NAME COMSTYPE) (* ; "Edited 16-Aug-87 22:38 by raf")
(* ;;; "Called when any file's COMS are added to or deleted from. For each open subitem window of that file, if we're under ADDTOFILES? save the change, otherwise update the window.")
(PROG (FILE SUBITEMS ITEMS)
(if (OR (NULL !VALUE)
(LISTP FILECOMS))
then (RETURN)
else (if [SETQ FILE (for F in FILELST thereis (EQ FILECOMS (FILECOMS F]
then (for WINDOW in MANAGER-OPEN-WINDOWS bind STUFF
when (AND (OPENWP WINDOW)
(EQ [CDR (SETQ STUFF (GETDATUM (CAR (WINDOWPROP WINDOW
'MENU]
COMSTYPE)
(EQ (CAR STUFF)
FILE)) do (if MANAGER-ADDTOFILES?
then (pushnew MANAGER-CASES STUFF)
else (Manager.COMSOPEN FILE COMSTYPE)))
(Manager.RESETSUBITEMS FILE COMSTYPE])
(Manager.ADDTOFILES?
[LAMBDA NIL (* lmm "16-Nov-86 23:16")
(for CASE in MANAGER-CASES do (Manager.COMSOPEN (CAR CASE)
(CDR CASE)))
(SETQ MANAGER-CASES NIL])
(Manager.ALTERMARKING
[LAMBDA (ITEM TYPE MARKING?) (* ; "Edited 3-Sep-87 16:39 by raf")
(* ;;; "Called from MARKSCHANGED or UNMARKASCHANGED.")
(COND
((EQ MARKING? 'CLISP) (* ; " ignore")
)
((AND (EQ ITEM 'FILELST)
(EQ TYPE 'VARS)) (* ; "FILELST has been edited.")
(MANAGER))
((EQ TYPE 'FILES) (* ; "A whole file has been marked.")
(UPDATEFILES))
(T
(* ;; "For each manager menu window that's open we look to see if it contains the named definition. We can only update a menu if the window is expanded (and can't see the menu when its window is shrunk).")
(for WINDOW in MANAGER-OPEN-WINDOWS bind MENU (UPDATEFILES _ NIL)
when [AND (OPENWP WINDOW)
(SETQ MENU (CAR (WINDOWPROP WINDOW 'MENU]
do (if [AND (Manager.MENUHASITEM ITEM MENU)
(EQ TYPE (CDR (GETDATUM MENU]
then (SELECTQ MARKING?
((DELETED DEFINED)
(SETQ UPDATEFILES T)
(Manager.COMSOPEN (CAR (GETDATUM MENU))
TYPE NIL))
(Manager.HIGHLIGHT ITEM MENU MARKING?))) finally (Manager.MAINUPDATE
UPDATEFILES])
(Manager.ANCHORED-SET-POSITION
[LAMBDA (IW IH) (* ; "Edited 10-Oct-2023 11:22 by mth")
(LET (WREGION XPOS YPOS TEMP)
(SETQ WREGION (WINDOWPROP MANAGER-MAIN-WINDOW 'REGION))
(SETQ YPOS (fetch (REGION BOTTOM) of WREGION))
(if (FMEMB Manager.WINDOW-ANCHOR '(ANCHOR-TL ANCHOR-TR))
then (SETQ YPOS (- (+ YPOS (fetch (REGION HEIGHT) of WREGION))
IH)))
(SETQ TEMP (+ YPOS IH))
(if (>= TEMP SCREENHEIGHT)
then (SETQ YPOS (- SCREENHEIGHT 1)))
(SETQ XPOS (fetch (REGION LEFT) of WREGION))
(if (FMEMB Manager.WINDOW-ANCHOR '(ANCHOR-TR ANCHOR-BR))
then (SETQ XPOS (- (+ XPOS (fetch (REGION WIDTH) of WREGION))
IW)))
(SETQ TEMP (+ XPOS IW))
(if (>= TEMP SCREENWIDTH)
then (SETQ XPOS (- SCREENWIDTH 1)))
(create POSITION
XCOORD _ XPOS
YCOORD _ YPOS])
(Manager.DO.COMMAND
[LAMBDA (COMMAND ITEM COMSTYPE FILE MENU) (* ; "Edited 21-May-2024 17:56 by mth")
(* ; "Edited 17-May-2024 09:41 by mth")
(* ; "Edited 13-Oct-2023 16:28 by mth")
(if (EQ COMSTYPE 'FILEVARS)
then (SETQ COMSTYPE 'VARS) (* ; "The Manager currently does unnatural things with the FILEVARS type, this is a hack to compensate for it. E.g., editing a FILEVARS = editing the VARS, etc.")
)
(SELECTQ COMMAND
(NIL (* ; "Do nothing."))
(EDIT (WITH-READER-ENVIRONMENT (if FILE
then (Manager.GET.ENVIRONMENT FILE)
else (MAKE-READER-ENVIRONMENT *PACKAGE* *READTABLE*
*READ-BASE*))
(* ;; "SEdit does not use *package*. ")
[COND
((EQ COMSTYPE 'FILES)
(ED ITEM 'PROPERTY-LIST))
((NULL COMSTYPE)
(EDITDEF 'FILELST 'VARS))
(T (EDITDEF ITEM COMSTYPE NIL NIL '(:DONTWAIT]))
(ADD.PROCESS `[CL:APPLY #'Manager.DO.COMMAND.PROCFN '(,COMMAND ,ITEM ,COMSTYPE ,FILE
,MENU]
'NAME
'MANAGER-COMMAND))
NIL])
(Manager.DO.COMMAND.PROCFN
[LAMBDA (COMMAND ITEM COMSTYPE FILE MENU) (* ; "Edited 20-May-2024 11:15 by mth")
(WITH-READER-ENVIRONMENT (if FILE
then (Manager.GET.ENVIRONMENT FILE)
else (MAKE-READER-ENVIRONMENT *PACKAGE* *READTABLE* *READ-BASE*))
[LET
((ACTIVITY-WINDOW NIL)
(ACTIVITY-WINDOW-WAS-SHRUNK NIL))
(RESETLST
(RESETSAVE (TTY.PROCESS (THIS.PROCESS)))
[if [NOT (FMEMB COMMAND
'(BREAK TRACE UNBREAK CHANGED DELETED DEFINED UNMARK SEE LIST HARDCOPY
REMOVE NIL]
then (* ; "steal the TTY, if we really need it (there are also further complementary lists at the bottom of the following BLOCK).")
(TTYDISPLAYSTREAM (SETQ ACTIVITY-WINDOW (Manager.WINDOW)))
(SETQ ACTIVITY-WINDOW-WAS-SHRUNK (NOT (OPENWP ACTIVITY-WINDOW]
(CL:BLOCK NIL
(CL:ECASE COMMAND
(READVISE (APPLY* (FUNCTION READVISE)
ITEM))
(UNADVISE (APPLY* (FUNCTION UNADVISE)
ITEM))
(SHOWADVICE
(printout T .FONT LAMBDAFONT "Advised and traced fns and functions:" .FONT
DEFAULTFONT T)
(for ITEM in ADVISEDFNS do (printout T 10 ITEM T)))
(RESET (COND
((MOUSECONFIRM "Reset the Manager destroying all the menus? " NIL T)
(CL:FORMAT T
"Expunging and reconstructing the Manager's menus~%%Please Stand By."
)
(MANAGER.RESET T)
(CL:FORMAT T "~&Done.~%%-----")
(CLOSEW T))))
(QUIT (COND
((MOUSECONFIRM "Quit the Manager? " NIL T)
(Manager.MAINCLOSE T)
(CLOSEW T))))
(RELOAD
(CL:FORMAT T "~&Loading ~A definition of ~S from ~A." ITEM COMSTYPE FILE)
(LOADDEF ITEM COMSTYPE FILE))
(SHOWDEF
(printout T .FONT LAMBDAFONT COMSTYPE " definition of " ITEM .FONT
DEFAULTFONT " (source file format):" T)
(SHOWDEF ITEM COMSTYPE))
(BREAK (APPLY* 'BREAK ITEM))
(TRACE (EVAL (LIST 'TRACE ITEM)))
(UNBREAK (EVAL (LIST 'UNBREAK ITEM)))
(DISASSEMBLE
(printout T .FONT LAMBDAFONT "Compiled code for " ITEM ":" .FONT DEFAULTFONT
T)
(INSPECTCODE ITEM))
(PV (printout T .FONT LAMBDAFONT "Value of " ITEM ":" .FONT DEFAULTFONT T
(if (BOUNDP ITEM)
then (EVAL ITEM)
else "Not bound!")))
(PF
(printout T .FONT LAMBDAFONT "Function definition of " ITEM ":" .FONT
DEFAULTFONT T)
(APPLY* #'PF ITEM))
(PL
(printout T .FONT LAMBDAFONT "Property list for " ITEM ":" .FONT DEFAULTFONT
T)
(PRINTPROPS (if (EQ COMSTYPE 'PROPS)
then (CAR ITEM)
else ITEM)))
(CLDESCRIBE
(printout T .FONT LAMBDAFONT "Description of " ITEM ":" .FONT DEFAULTFONT T)
(CL:DESCRIBE ITEM))
(CLDOC (printout T .FONT LAMBDAFONT "Documentation for " ITEM ":" .FONT
DEFAULTFONT T (CL:DOCUMENTATION ITEM)))
(FIELDS (printout T .FONT LAMBDAFONT "Fields of " ITEM ":" .FONT DEFAULTFONT T
(REVERSE (RECORDFIELDNAMES ITEM))))
(ARGS (printout T .FONT LAMBDAFONT "Arguments of " ITEM ": " .FONT DEFAULTFONT T
10 (SMARTARGLIST ITEM)
T))
(EDITCALLERS (EDITCALLERS ITEM FILE))
(COPYDEF (LET [(FILENAME (Manager.PROMPT (CONCAT "Copy " ITEM " as name: "]
(if FILENAME
then (COPYDEF ITEM FILENAME COMSTYPE))))
(RENAME (LET [(FILENAME (Manager.PROMPT (CONCAT "Rename " ITEM " to: "]
(if FILENAME
then (RENAME ITEM FILENAME COMSTYPE FILE))))
(RENAME-ALL (LET [(FILENAME (Manager.PROMPT (CONCAT
"Rename (in ALL loaded files) "
ITEM " to: "]
(if FILENAME
then (RENAME ITEM FILENAME COMSTYPE FILELST))))
(DELETE (if (MOUSECONFIRM (CONCAT "DELETE the " COMSTYPE " " ITEM " from " FILE
"?"))
then (DELFROMFILES ITEM COMSTYPE FILE)))
(LOAD (LET ((FILENAME (Manager.PROMPT "Filename: ")))
(if FILENAME
then (LOAD FILENAME))))
(LOADFNSLATER [LET ((FILENAME (Manager.PROMPT "Filename: ")))
(if FILENAME
then (LOADFNS NIL FILENAME 'ALLPROP 'VARS])
(LOADFNSNOW [LET ((FILENAME (Manager.PROMPT "Filename: ")))
(if FILENAME
then (LOADFNS T FILENAME 'ALLPROP 'VARS])
(LOADFROMLATER (LET ((FILENAME (Manager.PROMPT "Filename: ")))
(if FILENAME
then (LOADFROM FILENAME))))
(LOADFROMNOW (LET ((FILENAME (Manager.PROMPT "Filename: ")))
(if FILENAME
then (LOADFROM FILENAME T))))
(ADDFILE (LET ((FILENAME (Manager.PROMPT "Filename: ")))
(if FILENAME
then (ADDFILE FILENAME))))
(SYSLOAD [COND
((MOUSECONFIRM (CONCAT "Do you really want to SYSLOAD " FILE "?" NIL
T))
NIL
(LOAD FILE 'SYSLOAD])
(MOVE (LET [(ANSWER (Manager.GETFILE (CONCAT "File to move " COMSTYPE " " ITEM
" to"]
(AND ANSWER (MOVETOFILE ANSWER ITEM COMSTYPE FILE))))
(COPY (LET [(ANSWER (Manager.GETFILE (CONCAT "File to copy " COMSTYPE " " ITEM
" to"]
(AND ANSWER (ADDTOFILE ITEM COMSTYPE ANSWER))))
((CHANGED DELETED DEFINED) (if COMSTYPE
then (MARKASCHANGED ITEM COMSTYPE COMMAND)
else (MARKASCHANGED (FILECOMS ITEM)
'VARS COMMAND)
(UPDATEFILES)
(* ; "This is needed because the main menu is a special case. Its not in the open windows list, nor does it carry %"type%" information (like that it contains filevars).")
))
(UNMARK (if (EQ COMSTYPE 'FILES)
then (* ; "whole file")
(COND
((MOUSECONFIRM (CONCAT "Unmark entire contents of " FILE "?"
NIL T))
(/RPLACD (GETPROP FILE 'FILE)
NIL)
(Manager.insurefilehighlights FILE)
(Manager.HIGHLIGHT FILE MENU)))
else (* ; "single item")
(UNMARKASCHANGED ITEM COMSTYPE)))
(SEE (LET ((FULLNAME (OR (CDAR (GETPROP FILE 'FILEDATES))
FILE)))
(* ;;
"I'm assuming that the CAR of the FILEDATES list is the most recent...")
(FB.FASTSEE.ONEFILE NIL FULLNAME
(LET [(W (CREATEW NIL (CONCAT "Seeing " FULLNAME "..."]
(DSPSCROLL 'ON W)
(WINDOWPROP W 'PAGEFULLFN 'FB.SEEFULLFN)
(TTYDISPLAYSTREAM W)
W))))
(TEDIT-SEE (TEDIT-SEE (OR (CDAR (GETPROP FILE 'FILEDATES))
FILE)))
(LOAD
(printout T .FONT LAMBDAFONT "Loading file " FILE "." .FONT DEFAULTFONT T)
(LOAD FILE))
((MAKEFILE NEW FAST)
(if FILE
then (printout T .FONT LAMBDAFONT "Writing file " FILE "." .FONT
DEFAULTFONT T)
(PRINT (MAKEFILE FILE (if (EQ COMMAND 'MAKEFILE)
then NIL
else COMMAND))
T)
else (printout T .FONT LAMBDAFONT "Writing files ")
[PRINT (MAKEFILES (if (EQ COMMAND 'MAKEFILE)
then NIL
else (LIST COMMAND]
(printout T .FONT DEFAULTFONT T)))
(COMMON-MAKEFILE (if FILE
then (printout T .FONT LAMBDAFONT
"Writing CommonLisp source into " FILE ".LSP"
.FONT DEFAULTFONT T)
(PRINT (COMMON-MAKEFILE FILE)
T)
else (CL:FORMAT T
"~&CommonLispify must be selected separately for each file"
)))
((LIST HARDCOPY) (LISTFILES1 FILE))
((ANCHOR-TL ANCHOR-TR ANCHOR-BL ANCHOR-BR) (Manager.SET-ANCHOR COMMAND))
(CLEANUP
(printout T .FONT LAMBDAFONT "Cleanup..." .FONT DEFAULTFONT T)
(* ;
"These are different, presumably because CLEANUP is an NLAMBDA.")
(if FILE
then (APPLY* (FUNCTION CLEANUP)
FILE)
else (CLEANUP)))
(CLEANUPT (printout T .FONT LAMBDAFONT "Changing default cleanup compiler:"
.FONT DEFAULTFONT T "Old value " *DEFAULT-CLEANUP-COMPILER* T
"New value: " (SETQ *DEFAULT-CLEANUP-COMPILER* 'TCOMPL)
T))
(CLEANUPC (printout T .FONT LAMBDAFONT "Changing default cleanup compiler:"
.FONT DEFAULTFONT T "Old value " *DEFAULT-CLEANUP-COMPILER* T
"New value: " (SETQ *DEFAULT-CLEANUP-COMPILER* 'COMPILE-FILE)
T))
(* ;; " Masterscope stuff")
(ANALYZE
(printout T .FONT LAMBDAFONT "Analyzing the file " FILE
" with MasterScope..." .FONT DEFAULTFONT T)
(MASTERSCOPE `(ANALYZE FNS ON %, FILE)))
(CHECK
(printout T .FONT LAMBDAFONT "Checking the file " FILE " with MasterScope..."
.FONT DEFAULTFONT T)
(MASTERSCOPE `(CHECK %, FILE)))
(DESCRIBE (SELECTQ COMSTYPE
(VARS [CL:FORMAT T "~&~a is used by:~%% ~a" ITEM
(MASTERSCOPE `(WHO USES ',ITEM])
(PROGN NIL (printout T .FONT LAMBDAFONT "MasterScope analysis of "
ITEM ":" .FONT DEFAULTFONT T)
(MSDESCRIBE ITEM))))
(SHOWPATHTO
(printout T .FONT LAMBDAFONT "Showing who calls " ITEM " with MasterScope..."
.FONT DEFAULTFONT T)
(MASTERSCOPE `(SHOW PATHS TO %, ITEM)))
(SHOWPATHFROM
(printout T .FONT LAMBDAFONT "Showing who is called by " ITEM
" with MasterScope..." .FONT DEFAULTFONT T)
(MASTERSCOPE `(SHOW PATHS FROM %, ITEM)))
(SHOWPATHFILE
(printout T .FONT LAMBDAFONT
"Showing who is called by functions in the file " ITEM
" with MasterScope..." .FONT DEFAULTFONT T)
(MASTERSCOPE `(SHOW PATHS FROM ON %, FILE)))
(* ;; "DATABASEFNS stuff")
(DB (CL:FORMAT T "~&Global DataBaseFNS Flags:~%%SAVEDBFLG = ~a, LOADDBFLG = ~a"
SAVEDBFLG LOADDBFLG))
(DBFILE
(CL:FORMAT T "~&The DATABASE prop for ~a is: ~a" FILE (GETPROP FILE
'DATABASE))
(CL:FORMAT T "~&Global DataBaseFNS Flags:~%%SAVEDBFLG = ~a, LOADDBFLG = ~a"
SAVEDBFLG LOADDBFLG))
(DBON
(SETQ LOADDBFLG 'ON)
(SETQ SAVEDBFLG 'ON))
(DBOFF
(SETQ LOADDBFLG 'NO)
(SETQ SAVEDBFLG 'NO))
(DBASK
(SETQ LOADDBFLG 'ASK)
(SETQ SAVEDBFLG 'ASK))
(DBLOADON (SETQ LOADDBFLG 'YES))
(DBSAVEON (SETQ SAVEDBFLG 'YES))
(DBLOADOFF (SETQ LOADDBFLG 'NO))
(DBSAVEOFF (SETQ SAVEDBFLG 'NO))
(DBLOADASK (SETQ LOADDBFLG 'ASK))
(DBSAVEASK (SETQ SAVEDBFLG 'ASK))
(DBFILEON (PUTPROP FILE 'DATABASE 'YES))
(DBFILEOFF (PUTPROP FILE 'DATABASE 'NO))
(DBFILEASK (PUTPROP FILE 'DATABASE 'ASK))
(DUMPDB
(printout T .FONT LAMBDAFONT "Dumping the Masterscope Database for file "
FILE .FONT DEFAULTFONT T)
(DUMPDB FILE))
(LOADDB
(printout T .FONT LAMBDAFONT "Loading the Masterscope Database for file "
FILE .FONT DEFAULTFONT T)
(LOADDB FILE))
(COMPILE
(printout T .FONT LAMBDAFONT "Compiling..." .FONT DEFAULTFONT T)
(if (EQ COMSTYPE 'FILES)
then (APPLY* (FUNCTION COMPILEFILES)
FILE)
(Manager.REMOVE.DUPLICATE.ADVICE FILE)
else (PRINT (CL:COMPILE ITEM)
T)))
(CL:COMPILE-FILE
(printout T .FONT LAMBDAFONT "Compiling using compile-file..." .FONT
DEFAULTFONT T)
(CL:COMPILE-FILE FILE)
(Manager.REMOVE.DUPLICATE.ADVICE FILE))
(REMOVE (DELDEF FILE 'FILE))
(CHANGES (* ; "FILE is NIL from main menu")
(Manager.CHANGED? FILE))
(FILES?
(printout T .FONT LAMBDAFONT "Files and their changes:" .FONT DEFAULTFONT T)
(FILES?)))
(* ;; "Relase the window now, but get ready to shrink it back down unless another manager command comes along and need the window.")
(if [NOT (FMEMB COMMAND
'(BREAK TRACE UNBREAK CHANGED DELETED DEFINED UNMARK SEE LIST
HARDCOPY REMOVE QUIT RESET RENAME COPY NIL]
then (CL:FORMAT T "~&------"))))
(* ;;
"Shink the dialog window after ten seconds so long as its not in use by another manager command.")
(if ACTIVITY-WINDOW-WAS-SHRUNK
then (if (FMEMB COMMAND
'(SHOWDEF SHOWADVICE PV PF PL CLDESCRIBE CLDOC FIELDS ARGS DB DBFILE
MAKEFILE NEW FAST COMMON-MAKEFILE CLEANUPT CLEANUPC CLEANUP
ANALYZE CHECK DESCRIBE CHANGES FILES? COMPILE CL:COMPILE NIL))
then (DISMISS 10000)
else (DISMISS NIL))
(if (EQ ACTIVITY-WINDOW (CAR MANAGER-WINDOWS))
then (SHRINKW T])])
(Manager.HIGHLIGHT
[LAMBDA (ITEM MENU ON) (* ; "Edited 31-Jul-87 17:33 by raf")
(SHADEITEM (SASSOC ITEM (fetch ITEMS of MENU))
MENU
(if ON
then MANAGER-MARKED-SHADE
else 0])
(Manager.PROMPT
[LAMBDA (PROMPT) (* ; "Edited 17-Aug-87 14:31 by raf")
(LET (W (Manager.WINDOW))
(RESETFORM (TTY.PROCESS (THIS.PROCESS))
(PROG1 (MKATOM (PROMPTFORWORD PROMPT NIL NIL W))
(printout W T])
(Manager.WINDOW
[LAMBDA NIL (* ; "Edited 21-Aug-87 12:04 by raf")
(* ;;; "Make a window for manager activity, and set TTYDISPLAYSTREAM into it.")
(LET [(W (OR (pop MANAGER-WINDOWS)
(CREATEW NIL MANAGER-ACTIVITY-WINDOW-TITLE]
(RESETSAVE NIL (LIST [FUNCTION (LAMBDA (W)
(AND (OPENWP W)
(TERPRI W))
(push MANAGER-WINDOWS W]
W))
(TTYDISPLAYSTREAM W)
W])
(Manager.insurefilehighlights
[LAMBDA (FILE) (* ; "Edited 26-Jun-87 16:30 by andyiii")
(* ;
"insures open menus of a file are correctly highlighted")
(SETQ FILE (ROOTFILENAME FILE))
(for WINDOW in MANAGER-OPEN-WINDOWS bind MENU
when (AND (OPENWP WINDOW)
(EQ [CAR (GETDATUM (SETQ MENU (CAR (WINDOWPROP WINDOW 'MENU]
FILE)) do [if (EQUAL (Manager.COLLECTCOMS FILE (CDR (GETDATUM MENU)))
(fetch (MENU ITEMS) of MENU))
then (Manager.COMSUPDATE WINDOW)
(* ; "no change in contents")
else (Manager.COMSOPEN FILE (CDR (GETDATUM MENU]
(* ; "contents changed")])
(Manager.CHANGED?
[LAMBDA (FILES) (* ; "Edited 26-Jun-87 03:42 by andyiii")
(bind CHANGES for FILE inside (OR FILES FILELST) first (TERPRI T)
when [SETQ CHANGES (CDR (GETPROP FILE 'FILE]
do (printout T .FONT LAMBDAFONT "Changes to " FILE .FONT DEFAULTFONT T)
(for CHANGE in CHANGES do (printout T (CAR CHANGE)
":" 10 .PARA 10 0 (CDR CHANGE)
T])
(Manager.CHECKFILE
[LAMBDA (FILE) (* ; "Edited 17-Aug-87 14:26 by raf")
(* ;;; "If called from ADDTOFILES? (special flag indicates this) and the file being checked is on the main menu, checks all of a particular FILE's submenus, otherwise rebuilds the main (FILELST) menu. Called from advice on ADDFILE, ADDTOFILES? and LOAD.")
(if (AND (NULL MANAGER-ADDTOFILES?)
(Manager.MENUHASITEM FILE MANAGER-FILE-MENU))
then (SETQ FILE (ROOTFILENAME FILE))
[for WINDOW in MANAGER-OPEN-WINDOWS bind MENU
when [AND (OPENWP WINDOW)
(EQ [CAR (GETDATUM (SETQ MENU (CAR (WINDOWPROP WINDOW 'MENU]
FILE)
(NOT (EQUAL (Manager.COLLECTCOMS FILE (CDR (GETDATUM MENU)))
(fetch (MENU ITEMS) of MENU]
do (Manager.COMSOPEN FILE (CDR (GETDATUM MENU]
else (MANAGER)
(Manager.RESETSUBITEMS FILE])
(Manager.COLLECTCOMS
[LAMBDA (FILE TYPE) (* ; "Edited 16-Aug-87 22:13 by raf")
(* ;;;
"Collect all the names of a particular type in a file, returning them in correct menu item format.")
(PROG ((COMSLST (FILECOMSLST FILE TYPE)))
(RETURN (Manager.SORTBYCOLUMN (COND
((NULL COMSLST)
(RETURN))
((EQ TYPE 'VARS)
(for VAR in COMSLST
bind (FILEVARS _ (FILECOMSLST FILE 'FILEVARS))
when (NOT (FMEMB VAR FILEVARS))
collect
(* ;;
"List of item to get around menu feature that list's first item is used for display.")
(LIST VAR)))
(T
(* ;;
"List of item to get around menu feature that list's first item is used for display.")
(MAPCAR (INTERSECTION COMSLST COMSLST)
(FUNCTION LIST])
(Manager.COMS.WSF
[LAMBDA (ITEM MENU KEY) (* ; "Edited 25-Jun-87 02:00 by andyiii")
(SETQ ITEM (CAR ITEM)) (* ; "Menu items handed in are list of item to get around menu feature that list has first item used to display!")
(PROG (FILE COMSTYPE COMSLST FILECOMS COMMAND)
(DECLARE (SPECVARS ITEM COMSTYPE))
(if (NULL ITEM)
then (RETURN))
(if (.COPYKEYDOWNP.)
then (RETURN (BKSYSBUF.GENERAL ITEM)))