Relay-Version: version nyu B notes v1.6 9/18/89; site acf4.NYU.EDU From: lrb@rrivax.rri.uwo.ca (Lance R. Bailey) Date: 27 Aug 90 06:50 EDT Date-Received: 27 Aug 90 12:52 EDT Subject: schedular part 1 of 6 Message-ID: <910@ria.ccs.uwo.ca> Path: acf4!cmcl2!phri!rutgers!cs.utexas.edu!news-server.csri.toronto.edu!utgpu!watserv1!ria!rrivax.rri.uwo.ca!lrb Newsgroups: vmsnet.sources Organization: Robarts Research Institute -- London Canada Earth Sender: news@ria.ccs.uwo.ca Reply-To: lrb@rrivax.rri.uwo.ca Lines: 465 News-Software: VAX/VMS VNEWS 1.3-4 $! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 27-AUG-1990 11:39:53.50 By user LRB $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $!+ THIS PACKAGE DISTRIBUTED IN 6 PARTS, TO KEEP EACH PART $! BELOW 30 BLOCKS $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. MAKE.COM;12 $! 2. ONLINE.HLP;13 $! 3. QUO_VADIS.C;485 $! 4. QUO_VADIS.H;15 $! 5. QUO_VADIS.HLP;13 $! 6. QV.COM;21 $! 7. QV.RELEASE_NOTES;1 $! 8. QV.REMARKS;1 $! 9. READIT.C;114 $! 10. SHOW_DAY.C;51 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ ve=f$getsyi("version") $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ if .not. f$verify() then $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:= CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b)); LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1); IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE; MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1; ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")= 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF"; POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r); ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1; COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE, "output_file"));ENDPROCEDURE;Unpacker;QUIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create 'f' X$! make.com X$! compile what is needed and then link X$! X$ filename = "''P1'" X$ gosub check_for_compile X$ X$ filename = "''P2'" X$ gosub check_for_compile X$ X$ filename = "''P3'" X$ gosub check_for_compile X$ X$ filename = "''P4'" X$ gosub check_for_compile X$ X$ filename = "''P5'" X$ gosub check_for_compile X$ X$ filename = "''P6'" X$ gosub check_for_compile X$ X$ filename = "''P7'" X$ gosub check_for_compile X$ X$ write sys$output "link ''LINKPARAM'" X$ link 'LINKPARAM' X$`20 X$ exit X$! X$ check_for_compile: X$ if "''filename'" .eqs. "" then return X$ if f$search("''filename'") .eqs. "" X$ then X$ write sys$output "cannot find ''filename'" X$ exit X$ endif X$ X$ fname = f$parse("''filename'",,,"NAME") X$ ftype = f$parse("''filename'",,,"TYPE") X$ if "''LINKPARAM'" .eqs. "" X$ then LINKPARAM = "''fname'.obj" X$ else LINKPARAM = LINKPARAM + ",''fname'.obj" X$ endif X$! X$ if "''ftype'" .eqs. ".C" then comp = "cc" X$ on error then exit $status X$ set on X$ if f$search("''fname'.obj") .nes. "" X$ then X$ if f$cvtime(f$file_attributes("''filename'","RDT")) .gts. - X f$cvtime(f$file_attributes("''fname'.obj","RDT")) X$ then X$ write sys$output "''comp' ''fname'" X$ 'comp' 'fname' X$ endif X$ else X$ write sys$output "''comp' ''fname'" X$ 'comp' 'fname' X$ endif X$ set noon X$ return X$! X$! EOF $ CALL UNPACK MAKE.COM;12 657277076 $ create 'f' X1 version XThis implementation version 2.0 (August 24,1990) X X X1 5day_menu XThis menu is displayed when screen is showing five days at once. X XThe commands available are listed at the bottom of the screen. You merely Xhave to press the first letter of the command. As an aid, the "command Xletters" are highlighted. X XYou have the following choices: X Quit Redraw Show_time Edit Print 1day Last_5days Next_5days X X X2 Quit XExit the quo_vadis program. X X2 Redraw XErase and repaint the screen. X X2 Show_time Xdisplay the current time. If there is a booking at this time, then the Xentry will be displayed. In addition the next booking for the day, if any Xwill be displayed. The time will remain for five seconds and then the screen Xwill return to it's previous state. X X2 Edit XThis allows you to add and remove entries from the schedule. X X2 Print XThis entry allows you to print `5Bup to`5D seven days of data on the laser. X X2 1day XThis toggles from the five day view to view which displays the entries for Xonly one day. X X2 Last_5days XThis moves the data displayed to the previous five days. If there is no more Xdata, an error message "End of File" is displayed. X X2 Next_5days XThis moves the data displayed to the next five days. If there is no more dat Va, Xan error message "End of File" is displayed. X X2 Change_Data XIf you are supporting many schedules, this command allows you to change the Xschedule with which you are working.`20 X X X1 1day_menu XThis menu is displayed when screen is showing the entries for only one Xday. X XThe commands available are listed at the bottom of the screen. You merely Xhave to press the first letter of the command. As an aid, the "command Xletters" are highlighted. X XYou have the following choices: X Quit Redraw Show_time Edit Print 5day Up Down Tommorrow Yesterday X X2 Quit XExit the quo_vadis program. X X2 Redraw XErase and repaint the screen. X X2 Show_time Xdisplay the current time. If there is a booking at this time, then the Xentry will be displayed. In addition the next booking for the day, if any Xwill be displayed. The time will remain for five seconds and then the screen Xwill return to it's previous state. X X2 Edit XThis allows you to add and remove entries from the schedule. X X2 Print XThis entry allows you to print `5Bup to`5D seven days of data on the laser. X X2 5day XThis toggles from the one day view to view which displays the entries for Xfive days at a time. X X2 Down XThe one day view only shows up to twenty entries at a time. The Down command Xwill move to the next 20 entries. If there are no more entries an error`20 Xmessage "No further entries" will be displayed. X X2 Up XThe one day view only shows up to twenty entries at a time. The Up command Xwill move to the previous 20 entries. If there are no more entries an error` V20 Xmessage "No further entries" will be displayed. X X2 Tommorrow XThis moves the data displayed to the next day. If there is no more Xdata, an error message "End of File" is displayed. X X2 Yesterday XThis moves the data displayed to the previous day. If there is no more Xdata, an error message "End of File" is displayed. X X2 Change_Data XIf you are supporting many schedules, this command allows you to change the Xschedule with which you are working.`20 X X X1 Editing_menu XThis allows you to add and remove entries from the schedule. XYou have the following choices: X Delete_entry Add_entry Quit `20 X X2 Delete_entry XThe Delete_entry command is used when you wish to delete an entry from Xthe schedule. X X2 Add Entry XThe Add_entry command is used when you wish to add or change an entry in Xthe schedule. X X2 Quit XThis will quit you from the editing menu to your previous screen. X X X1 Printing_help XYou must specify the Month (1 - 12) and day (1 through 31) to be printed. XSeven days, beginning with the day entered will be printed. The place Xwhere the printout is generated is site specific. X XType the digits of the number desired and then press the ENTER key. X XIf you wish to quit back to the previous screen (that is, either the Xfive day or one day view) and not print the schedule, then enter Q Xand press the ENTER key. X X X1 Editing_help XYou must specify the Month (1 - 12) and day (1 through 31) to be edited. XThe full name of the month will be displayed automatically. The year is Xalso automatically displayed. X XYou must also enter the start and end time of the booking. NOTE WELL that Xthe hours are in the '24-hour' clock. Because a start and stop time Xis specified, you may book a range of time or delete a number of entries Xin one action. X XThe range of legal hours is 7 to 23 (7 am to 11 pm). X XThe range of legal minutes is 00, 05, 10, 15, ... , 45, 50, 55 , with the Xexception of hour 23. Only 00 is legal for hour 23. This allows you to`20 Xbook from 7:00 to 23:00 inclusivly. X XType the digits of the number desired and then press the ENTER key. X XIf you wish to quit back to the previous screen (that is, either the Xfive day or one day view) and not print the schedule, then enter Q Xand press the ENTER key. X XIf adding/changing an entry, then you must enter the information for that Xbooking. X X X1 Edit_check XWhen all the information for an edit (delete or add/change) has been entered V, Xthe information is displayed and you can exit out if any is incorrect. X XYou have the following choices: X Confirm_entry Quit`20 X X2 Confirm_entry XEnter the Confirm_entry choice if you wish this edit to occur. X X2 Quit XEnter the Quit choice if you do NOT wish this edit to occur. X X X1 Deletion_check XAs a safety feature, if you try to delete an entry in the schedule, the Xcontents of the entry are displayed and you must confirm the deletion. X XYou have the following choices: X Delete_entry Keep_entry Abort_entire_delete_task Stop_confirming X X2 Delete_entry XEnter the Delete_entry choice if you wish the displayed entry to be Xremoved from the schedule. X X2 Keep_entry`20 XEnter the Keep_entry choice if you wish to keep the displayed entry in the Xschedule. X X2 Abort_entire_delete_task XEnter the Abort_entire_delete_task choice if you wish to abort the whole Xedit operation and make no changes to the schedule. X X2 Stop_confirming XEnter the Stop_confirming choice if you wish to delete the range of Xschedule bookings specified and NOT be asked to confirm any double`20 Xbookings encountered. X X X1 Double_booking XIf you attempt to make a booking into a schedule that conflicts with Xa previous entry, then you will be shown the previous entry and asked Xwhat to do. You have the following choices: X Overwrite_original Keep_original Abort_entire_booking Stop_confirming X X2 Overwrite_original XEnter the Overwrite_original choice if you wish to remove the old entry Xand put in the new entry. This is how you change entries in a schedule. X X2 Keep_original XEnter the Keep_original choice if you wish to keep the old entry. X X2 Abort_entire_booking XEnter the Abort_entire_booking choice if you wish to abort the whole Xedit operation and make no changes to the schedule. X X2 Stop_confirming XEnter the Stop_confirming choice if you wish to make the schedule booking Xand NOT be asked to confirm any double bookings encountered. X X X1 Change_datafile XIf you are supporting many schedules, you can change the schedule with Xwhich you are working. You must specify which schedule you wish to access.`2 V0 XThe current choice is highlighted. Schedules over which you have editing Xcontrol are marked with the phrase 'you may edit'. X XYou have the following choices: X Up Down Quit `20 X X2 Up XThis moves the current `5Bhighlighted`5D choice up one. X X2 Down XThis moves the current `5Bhighlighted`5D choice down one. X X2 Quit XThis will quit you from the editing menu to your previous screen. X $ CALL UNPACK ONLINE.HLP;13 90437885 $ create 'f' X#include stdlib X#include descrip `20 X#include ctype`20 X#include time`20 X#include "quo_vadis.h" X X#include stat X#include signal X#include curses X X Xchar *mstrcpy(); Xchar *julian2day(); Xint DaysInMonth; X Xchar (dates`5BMAXDAYS`5D)`5BDATESIZE`5D; Xchar ((daytimer`5BMAXDAYS`5D)`5BNUMSLOTS`5D)`5BSLOTSIZE`5D; X X#define DAYS_ON_SCREEN 5 X Xchar *weekdays`5B`5D = `7B "Sunday", "Monday", "Tuesday", "Wednesday", "Thur Vsday", X "Friday", "Saturday", 0 `7D; X Xchar *monthnames`5B`5D = `7B "January", "February", "March", "April", "May", X "June", "July","August","September","October", X "November","December","foobar",0`7D; X Xint juliancounts`5B`5D = `7B0, 31, 59, 90, 120, 151, 181, 212, 243, 273,304, V334,366`7D; X X#define HELPCOM "HELP/NOINSTRUCT/LIBRARY=quovadis$root:ONLINE.HLB" X X#define NUMTOPICS 9 Xchar *topics`5BNUMTOPICS`5D = X `7B "5day_menu", X "1Day_menu",`20 X "Editing_menu",`20 X "Printing_help", X "Editing_help", X "Edit_check", X "Deletion_check",`20 X "Double_booking",`20 X "Change_datafile",`20 X `7D; X Xint NDAYS; X Xint CurrentDay =0; X X#define MAXNAME 80 X#define MAXLINE 1024 X X/* X * windows, X * message along bottom X * the one day window X * the one week window (a week is 5 days, did you not know that ?) X */ X XWINDOW *Message, *OneDay, *OneWeek, *BlankOW; X X#define MWEEKCOMMANDS " ? Quit Redraw Show_time Edit Print 1day Last_5days N Vext_5days" X#define MDAYCOMMANDS " ? Quit Redraw Show_time Edit Print 5day Up Down Tommo Vrrow Yesterday" X X#define SWEEKCOMMANDS " ? Quit Redraw Show_time 1day Last_5days Next_5days" X#define SDAYCOMMANDS " ? Quit Redraw Show_time 5day Up Down Tommorrow Yester Vday" X X/* X * usage:: +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-