Vcalendar (part 2 of 3) is available upon request.
James Pierre Lewis
james at yunexus.UUCP
Wed Feb 1 12:57:11 AEST 1989
Vcalendar is a calendar/schedule keeping program that allows one to
keep track of appointments, classes, meetings, and dates, etc. It is
posted upon request from panetta at duphy4.drexel.edu. Vcalendar is
written in C running on VAX/VMS 4.xx or higher. It is free.
If you are interested, please cut the three parts - VCAL1.SHAR,
VCAL2.SHAR and VCAL3.SHAR; follow the instructions in 0REAME.1ST and
have fun.
-----CUT-----CUT-----CUT-----CUT-----CUT-----CUT-----CUT-----CUT-----CUT-----
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
# olddo-appts.c
# olddo-calls.c
# oldvcal-purge.c
# oldvcal-sum.c
# smgtrmptr.h
# vcal-msg.msg
# This archive created: Tue Jan 31 21:49:02 1989
export PATH; PATH=/bin:$PATH
echo shar: extracting "'olddo-appts.c'" '(25422 characters)'
if test -f 'olddo-appts.c'
then
echo shar: will not over-write existing file "'olddo-appts.c'"
else
sed 's/^ X//' << \SHAR_EOF > 'olddo-appts.c'
X/*
X * -------------------------------------------------------
X * Neither York University, Department of Computer
X * Science nor the author assume any responsibility
X * for the use or reliability of this software.
X *
X * Copyright (C) 1987, York University
X * Department of Computer Science
X *
X * General permission to copy or modify, but not for
X * profit, is hereby granted, provided that the above
X * copyright notice is included and reference made to
X * the fact that reproduction privileges were granted
X * by the York University, Department of Computer Science.
X * -------------------------------------------------------
X *
X * Written by: James Pierre Lewis
X * Department of Computer Science
X * York University
X * 1987 - Version V1.0
X */
X
X#include <ctype.h>
X#include <descrip.h>
X#include <smgdef.h>
X#include <stdio.h>
X#include <time.h>
X#include "vcal.h"
X
Xchar *msgdata[MAX_ENT]; /* message pointers */
X
Xchar dayw[] =
X {
X " S M T W T F S "
X };
X
Xchar *smon[] =
X {
X "JANUARY ", "FEBRUARY ", "MARCH ", "APRIL ",
X "MAY ", "JUNE ", "JULY ", "AUGUST ",
X "SEPTEMBER ", "OCTOBER ", "NOVEMBER ", "DECEMBER "
X };
X
Xint active[33], /* active day */
X daydata[MAX_ENT], /* day data */
X dayindex[MAX_MSG], /* day index to day, month, year */
X monthdata[MAX_ENT], /* month data */
X msgcnt = NULL, /* entries count */
X notclear = FALSE, /* clear flag */
X tmonth, /* current month */
X tday, /* current day */
X tyear, /* current year */
X xposition[32], /* x coordinate */
X yposition[32], /* y coordinate */
X yeardata[MAX_ENT]; /* year data */
X
Xint mon[] =
X {
X 0,
X 31, 29, 31, 30,
X 31, 30, 31, 31,
X 30, 31, 30, 31
X };
X
Xdo_appts()
X{
X extern int reset_tty(),
X updatedata();
X int day,
X i,
X j,
X key,
X month,
X stat,
X year;
X
X timeset();
X month = tmonth;
X day = tday;
X year = tyear;
X
X loaddata();
X exit_handler(updatedata, __);
X exit_handler(reset_tty, __);
X cal(day, month, year);
X help_one();
X movcur(day);
X
X while ((key = get_key(vcal_id)) != SMG$K_TRM_CTRLZ)
X {
X switch(key) {
X
X case 'P' & CHAR_MASK: /* previous month */
X case 'p' & CHAR_MASK:
X if (--month < 1)
X {
X month = 12;
X year--;
X }
X
X if (notclear)
X clearmsgs();
X clearcar();
X
X if ((month == tmonth) && (year == tyear))
X day = tday;
X else day = 1;
X
X cal(day, month, year);
X break;
X
X case 'N' & CHAR_MASK: /* next month */
X case 'n' & CHAR_MASK:
X if (++month == 13)
X {
X month = 1;
X year++;
X }
X
X if (notclear)
X clearmsgs();
X clearcar();
X
X if ((month == tmonth) && (year == tyear))
X day = tday;
X else day = 1;
X
X cal(day, month, year);
X break;
X
X case 'D' & CHAR_MASK: /* display notes */
X case 'd' & CHAR_MASK:
X notes(day, month, year);
X break;
X
X case 'E' & CHAR_MASK: /* erase a day's notes */
X case 'e' & CHAR_MASK:
X clearday(day, month, year);
X
X if (notclear)
X clearmsgs();
X break;
X
X case 'M' & CHAR_MASK: /* make appointments */
X case 'm' & CHAR_MASK:
X help_two();
X notes(day, month, year);
X modnotes(day, month, year);
X help_one();
X break;
X
X case SMG$K_TRM_UP: /* up a day */
X if ((day -= 7) <= NULL)
X {
X day += 35;
X day = (day > mon[month]) ? day - 7 : day;
X }
X
X if (notclear)
X clearmsgs();
X break;
X
X case SMG$K_TRM_DOWN: /* down a day */
X if ((day += 7) > mon[month])
X {
X day %= 7;
X day = (day == NULL) ? 7 : day;
X }
X
X if (notclear)
X clearmsgs();
X break;
X
X case SMG$K_TRM_LEFT: /* left a day */
X day = (--day <= NULL) ? mon[month] : day;
X
X if (notclear)
X clearmsgs();
X break;
X
X case SMG$K_TRM_RIGHT: /* right a day */
X day = (++day > mon[month]) ? 1 : day;
X
X if (notclear)
X clearmsgs();
X break;
X
X case SMG$K_TRM_CTRLW: /* refresh screen */
X stat = smg$repaint_screen(&pstbrd_id);
X break;
X }
X
X movcur(day); /* day right now */
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xloaddata()
X{
X char basedata[MAX_BUF],
X key[MAX_BUF],
X tmp[MAX_BUF];
X int field,
X i,
X j,
X k,
X l;
X FILE *fptr;
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X daydata[i] = monthdata[i] = yeardata[i] = msgdata[i] = NULL;
X }
X
X if (access(APPTS_FILE, __) == -1)
X {
X warng(VCAL_FILE, 1, 1);
X }
X
X fptr = fopen(APPTS_FILE, "r");
X i = NULL;
X cuserid(key);
X strcat(key, "-VCAL");
X
X while(fgets(basedata, MAX_BUF, fptr) != NULL)
X {
X basedata[strlen(basedata) - 1] = NULL;
X crypt_it(basedata, key);
X j = k = field = NULL;
X
X while(basedata[j] != NULL )
X {
X if (basedata[j] != ',')
X tmp[k++] = basedata[j];
X else
X {
X switch(field) {
X
X case 0 :
X tmp[k] = NULL;
X monthdata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 1 :
X tmp[k] = NULL;
X daydata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 2 :
X tmp[k] = NULL;
X yeardata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 3 :
X tmp[k++] = ' ';
X tmp[k++] = ' ';
X break;
X }
X field++;
X }
X j++;
X }
X
X tmp[k] = NULL;
X msgdata[i] = malloc(MAX_BUF);
X strcpy(msgdata[i], tmp);
X msgdata[MAX_BUF - 1] = NULL;
X
X if (++i >= MAX_ENT)
X {
X CHK_STAT("", __, OWN_MSG, VCAL_PURGE);
X break;
X }
X }
X
X fclose(fptr);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xwarng(msg_id, xpos, ypos)
X
Xint msg_id,
X xpos,
X ypos;
X{
X char tmp[MSG_BUF];
X short msg_len;
X int stat;
X $DESCRIPTOR(msg_buf, tmp);
X $DESCRIPTOR(wait_buf, WAIT_MSG);
X
X stat = sys$getmsg(msg_id, &msg_len, &msg_buf, __, __);
X tmp[msg_len] = NULL;
X stat = smg$put_line(&vcal_id, &msg_buf, __, __, __, &WRAP, __, __);
X stat = smg$put_chars(&vcal_id, &wait_buf, __, __, __,__, __, __);
X
X if (get_key(vcal_id) == SMG$K_TRM_CTRLZ)
X sys$exit(SS$_NORMAL);
X else stat = smg$erase_display(&vcal_id, __, __, __, __);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xcal(day, month, year)
X
Xint day,
X month,
X year;
X{
X char tmp[MAX_BUF];
X int d,
X i,
X j,
X k,
X stat;
X $DESCRIPTOR(blank, " ");
X
X stat = smg$put_chars(&vcal_id, mkdesc(VCAL_TITLE), &1, &1, __,
X &(SMG$M_REVERSE|SMG$M_BOLD), __, __);
X stat = smg$put_chars(&vcal_id, mkdesc(EXIT_MSG), &1, &46, __,
X &SMG$M_BOLD, __, __);
X stat = smg$draw_line(&vcal_id, &2, &1, &2, &VCAL_WID);
X sprintf(tmp, "\t\t\t\t%s%u", smon[month-1], year);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), &3, &1, __,
X &SMG$M_REVERSE, __, __);
X stat = smg$draw_line(&vcal_id, &4, &1, &4, &VCAL_WID);
X stat = smg$put_chars(&vcal_id, mkdesc(dayw), &6, &1, __, __, __, __);
X stat = smg$set_cursor_abs(&vcal_id, &TXT_ROW, &1);
X
X d = jan1(year);
X mon[2] = 29;
X mon[9] = 30;
X
X for (i = 1; i <= 32; active[i] = FALSE, i++);
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X if ((yeardata[i] == year) && (monthdata[i] == month))
X active[daydata[i]] = TRUE;
X }
X
X switch((jan1(year + 1) + 7 - d) % 7) {
X
X case 1: /* non-leap year */
X mon[2] = 28;
X break;
X
X default: /* 1752 */
X mon[9] = 19;
X break;
X
X case 2: /* leap year */
X ;
X }
X
X for (i = 1; i < month; d += mon[i], i++); /* day begin of year */
X
X for (i = NULL, d %= 7; i < (5 * d); i++) /* first day of week */
X {
X stat = smg$set_cursor_rel(&vcal_id, __, &1);
X }
X
X for (j = 1, k = NULL, i = d; j <= 31; j++)
X {
X xposition[j] = (i*5) + 2;
X yposition[j] = (k*2) + 7;
X
X if (++i == 7)
X {
X i = NULL;
X k++;
X }
X }
X
X for (i = 1; i <= mon[month]; i++)
X {
X if (i == 3 && mon[month] == 19)
X {
X i += 11;
X mon[month] += 11;
X }
X
X if (active[i] == TRUE)
X {
X if (i > 9)
X {
X stat = smg$set_cursor_rel(&vcal_id, __, &1);
X sprintf(tmp, "%d", i / 10);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), __,
X __, __, &SMG$M_REVERSE, __, __);
X }
X else
X {
X stat = smg$set_cursor_rel(&vcal_id, __, &1);
X stat = smg$put_chars(&vcal_id, &blank, __,
X __, __, &SMG$M_REVERSE, __, __);
X }
X
X sprintf(tmp, "%d", i % 10);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), __,
X __, __, &SMG$M_REVERSE, __, __);
X stat = smg$set_cursor_rel(&vcal_id, __, &2);
X }
X else
X {
X if (i > 9)
X {
X sprintf(tmp, " %d", i / 10);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), __,
X __, __, __, __, __);
X }
X else stat = smg$set_cursor_rel(&vcal_id, __, &2);
X
X sprintf(tmp, "%d ", i % 10);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), __,
X __, __, __, __, __);
X
X }
X
X if (++d == 7)
X {
X d = NULL;
X stat = smg$put_line(&vcal_id, &blank, &2, __,
X __, __, __, __);
X
X }
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xjan1(year)
X
Xint year;
X{
X register int y,
X d;
X
X y = year;
X d = 4 + y + (y + 3) / 4;
X
X if (y > 1800)
X {
X d -= (y - 1701) / 100;
X d += (y - 1601) / 400;
X }
X
X d = (y > 1752) ? d + 3 : d;
X
X return (d % 7);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xhelp_one()
X{
X char *txt[4] = {
X { "Cursors : Up, Down, Left, Right" },
X { "P/p, N/n : Previous, Next month" },
X { "D/d, E/e : Display, Erase appointments" },
X { "M/m : Make appointments" }
X };
X int i,
X stat;
X
X stat = smg$unpaste_virtual_display(&hlp_id, &pstbrd_id);
X stat = smg$erase_display(&hlp_id, __, __, __, __);
X stat = smg$change_virtual_display(&hlp_id, &4, &38, __, __, __);
X
X for (i = NULL; i < 4; i++)
X {
X stat = smg$put_line(&hlp_id, mkdesc(txt[i]), &1, __,
X __, __, __, __);
X }
X
X stat = smg$paste_virtual_display(&hlp_id, &pstbrd_id, &20, &2);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xhelp_two()
X{
X char *txt[4] = {
X { "Cursors : Up, Down" },
X { "I/i : Input an appointment" },
X { "E/e : Erase an appointment" },
X { "P/p : Pick another day" }
X };
X int i,
X stat;
X
X stat = smg$unpaste_virtual_display(&hlp_id, &pstbrd_id);
X stat = smg$erase_display(&hlp_id, __, __, __, __);
X stat = smg$change_virtual_display(&hlp_id, &4, &30, __, __, __);
X
X for (i = NULL; i < 4; i++)
X {
X stat = smg$put_line(&hlp_id, mkdesc(txt[i]), &1, __,
X __, __, __, __);
X }
X
X stat = smg$paste_virtual_display(&hlp_id, &pstbrd_id, &20, &2);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xhelp_three()
X{
X char *txt[4] = {
X { "Cursors : Left, Right" },
X { "<CR> : End inputing an appointment" },
X { "<CTRL-A> : Toggle overtrike/insert" },
X { "<CTRL-U> : Start inputing again" }
X };
X int i,
X stat;
X
X stat = smg$unpaste_virtual_display(&hlp_id, &pstbrd_id);
X stat = smg$erase_display(&hlp_id, __, __, __, __);
X stat = smg$change_virtual_display(&hlp_id, &4, &38, __, __, __);
X
X for (i = NULL; i < 4; i++)
X {
X stat = smg$put_line(&hlp_id, mkdesc(txt[i]), &1, __,
X __, __, __, __);
X }
X
X stat = smg$paste_virtual_display(&hlp_id, &pstbrd_id, &20, &2);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xhelp_four()
X{
X char *txt[4] = {
X { " A T T E N T I O N " },
X { "* Appointments file is now full *" },
X { "* Please purge old appointments *" }
X };
X int i,
X stat;
X $DESCRIPTOR(wait_buf, WAIT_MSG);
X
X stat = smg$unpaste_virtual_display(&hlp_id, &pstbrd_id);
X stat = smg$erase_display(&hlp_id, __, __, __, __);
X stat = smg$change_virtual_display(&hlp_id, &4, &33, __, __, __);
X
X for (i = NULL; i < 3; i++)
X {
X stat = smg$put_line(&hlp_id, mkdesc(txt[i]), &1, __,
X __, __, __, __);
X }
X
X stat = smg$paste_virtual_display(&hlp_id, &pstbrd_id, &20, &2);
X stat = smg$put_chars(&hlp_id, &wait_buf, &4, &1, __,
X &SMG$M_BOLD, __, __);
X
X if (get_key(hlp_id) == SMG$K_TRM_CTRLZ)
X sys$exit(SS$_NORMAL);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xtimeset()
X{
X int tloc;
X struct tm *localtime(),
X *tp;
X
X time(&tloc);
X tp = localtime(&tloc);
X
X tyear = tp->tm_year;
X tmonth = tp->tm_mon + 1;
X tday = tp->tm_mday;
X tyear += LYEAR;
X}
X
X/*----------------------------------------------------------------------------*/
X
Xmovcur(day)
X
Xint day;
X{
X int col = xposition[day] + 1,
X row = yposition[day] + 1,
X stat;
X
X stat = smg$set_cursor_abs(&vcal_id, &row, &col);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xclearmsgs()
X{
X int i,
X stat;
X
X notclear = FALSE;
X
X for (i = 5; i < 25; i++)
X {
X stat = smg$erase_chars(&vcal_id, &TXT_LEN, &i, &TXT_COL);
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xclearcar()
X{
X int i,
X j = TXT_COL - 1,
X stat;
X
X stat = smg$erase_line(&vcal_id, &3, &1);
X
X for (i = TXT_ROW; i < 19; i++)
X {
X stat = smg$erase_chars(&vcal_id, &j, &i, &1);
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xnotes(day, month, year)
X
Xint day,
X month,
X year;
X{
X char tmp[MAX_BUF];
X int i,
X j,
X k,
X stat;
X $DESCRIPTOR(blank, " ");
X
X notclear = TRUE;
X
X for (i = NULL; i <= MAX_MSG; dayindex[i] = -1, i++);
X
X sprintf(tmp, "%s", "Time Message");
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), &5, &TXT_COL,
X __, __, __, __);
X sprintf(tmp, "%-3.3s %2.2d, %2.2d", smon[month - 1], day, year);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), &5, &69, __, __, __, __);
X sprintf(tmp, "%s", "hhhh <------------------------------->");
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), &6, &TXT_COL,
X __, __, __, __);
X
X for (i = j = NULL; i < MAX_ENT; i++)
X {
X if ((yeardata[i] == year) &&
X (monthdata[i] == month) && (daydata[i] == day))
X {
X dayindex[j++] = i;
X }
X
X if (j > MAX_MSG)
X break;
X }
X
X sort(j - 1);
X
X for (i = NULL, k = TXT_ROW; i < j; i++, k++)
X {
X sprintf(tmp, "%-*.*s", MAX_TXT, MAX_TXT, msgdata[dayindex[i]]);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), &k,
X &TXT_COL, __, __, __, __);
X }
X
X for (msgcnt = i = NULL; i < MAX_ENT; i++)
X {
X if (daydata[i] == NULL)
X {
X dayindex[j++] = i;
X
X if (j > MAX_MSG)
X break;
X }
X else msgcnt++;
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xclearday(day, month, year)
X
Xint day,
X month,
X year;
X{
X int i,
X stat;
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X if ((yeardata[i] == year) &&
X (monthdata[i] == month) && (daydata[i] == day))
X {
X msgcnt--;
X active[day] = FALSE;
X daydata[i] = monthdata[i] = yeardata[i] = NULL;
X
X if (msgdata[i])
X {
X free(msgdata[i]);
X msgdata[i] = NULL;
X }
X }
X }
X
X i = yposition[day] + 1;
X stat = smg$change_rendition(&vcal_id, &i, &xposition[day], &1, &2,
X &SMG$M_REVERSE, &SMG$M_REVERSE);
X
X}
X
X/*----------------------------------------------------------------------------*/
X
Xupdatedata(final_stat)
X
Xint *final_stat;
X{
X char *c,
X key[MAX_BUF],
X tmp1[MAX_BUF],
X tmp2[MAX_BUF],
X tmpnam[MAX_BUF];
X int i,
X stat;
X FILE *tptr;
X
X c = mktemp("SYS$LOGIN:TMPXXXXXX");
X sprintf(tmpnam, "%s.DAT", c);
X
X tptr = fopen(tmpnam, "w", "fop = cif", "mrs = 80", "rat = cr",
X "rfm = var, stm");
X cuserid(key);
X strcat(key, "-VCAL");
X
X stat = lib$disable_ctrl(&LIB$M_CLI_CTRLY, __);
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X if (daydata[i] != NULL)
X {
X strcpy(tmp1, msgdata[i]);
X tmp1[4] = NULL;
X sprintf(tmp2, "%d,%d,%d,%4.4s,%s",
X monthdata[i], daydata[i], yeardata[i],
X tmp1, &tmp1[6]);
X crypt_it(tmp2, key);
X fprintf(tptr, "%s\n", tmp2);
X }
X }
X
X fclose(tptr);
X delete(APPTS_FILE);
X stat = lib$rename_file(mkdesc(tmpnam), mkdesc(APPTS_FILE), __,
X __, __, __, __, __, __, __, __, __);
X
X stat = lib$enable_ctrl(&LIB$M_CLI_CTRLY, __);
X stat = sys$exit(*final_stat); /* exit normally */
X}
X
X/*----------------------------------------------------------------------------*/
X
Xmodnotes(day, month, year)
X
Xint day,
X month,
X year;
X{
X int i,
X key = NULL,
X stat,
X upbound,
X xcoord = TXT_COL,
X ycoord = TXT_ROW;
X
X stat = smg$set_cursor_abs(&vcal_id, &ycoord, &xcoord);
X
X for (i = NULL; i < MAX_MSG && dayindex[i] != -1; i++);
X
X if (i == MAX_MSG)
X upbound = VCAL_LEN - TXT_ROW;
X else upbound = i - 1;
X
X i = NULL;
X
X while ((key != 'P' & CHAR_MASK) && (key != 'p' & CHAR_MASK))
X {
X switch(key = get_key(vcal_id)) {
X
X case SMG$K_TRM_DOWN: /* down a line */
X i++;
X
X if (++ycoord > (upbound + TXT_ROW))
X {
X ycoord = TXT_ROW;
X i = NULL;
X }
X break;
X
X case SMG$K_TRM_UP: /* up a line */
X i--;
X
X if (--ycoord < TXT_ROW)
X {
X ycoord = upbound + TXT_ROW;
X i = upbound;
X }
X break;
X
X case SMG$K_TRM_CTRLW: /* refresh screen */
X stat = smg$repaint_screen(&pstbrd_id);
X break;
X
X case SMG$K_TRM_CTRLZ: /* ctrl-z to exit */
X stat = sys$exit(SS$_NORMAL);
X break;
X
X case 'I' & CHAR_MASK: /* input a line */
X case 'i' & CHAR_MASK:
X if (msgcnt < MAX_ENT)
X {
X help_three();
X get_txt(xcoord, ycoord, i, day, month, year);
X
X help_two();
X }
X else
X {
X help_four();
X help_two();
X }
X break;
X
X case 'E' & CHAR_MASK: /* erase a line */
X case 'e' & CHAR_MASK:
X daydata[dayindex[i]] = NULL;
X monthdata[dayindex[i]] = NULL;
X yeardata[dayindex[i]] = NULL;
X
X if (msgdata[dayindex[i]])
X {
X msgcnt--;
X free(msgdata[dayindex[i]]);
X msgdata[dayindex[i]] = NULL;
X }
X
X stat = smg$erase_chars(&vcal_id, &TXT_LEN,
X &ycoord, &TXT_COL);
X break;
X
X case 'P' & CHAR_MASK: /* pick another day */
X case 'p' & CHAR_MASK:
X if (notclear)
X clearmsgs();
X break;
X }
X
X stat = smg$set_cursor_abs(&vcal_id, &ycoord, &xcoord);
X }
X
X active[day] = FALSE;
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X if ((yeardata[i] == year) && (monthdata[i] == month))
X active[daydata[i]] = TRUE;
X }
X
X i = yposition[day] + 1;
X
X if (active[day] == NULL)
X {
X stat = smg$change_rendition(&vcal_id, &i, &xposition[day],
X &1, &2, &SMG$M_REVERSE, &SMG$M_REVERSE);
X }
X else
X {
X stat = smg$change_rendition(&vcal_id, &i, &xposition[day],
X &1, &2, &SMG$M_REVERSE, __);
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xget_txt(xcoord, ycoord, i, day, month, year)
X
Xint day,
X i,
X month,
X xcoord,
X ycoord,
X year;
X{
X static char *c,
X *d,
X hnum[3],
X mnum[3],
X num[5],
X tmp[MAX_BUF];
X char s[2];
X static int cnt,
X k,
X ovr_stk = TRUE;
X int j,
X l,
X m,
X key,
X stat;
X $DESCRIPTOR(blank, " ");
X
X if (msgdata[dayindex[i]])
X fill_fld(msgdata[dayindex[i]], tmp, MAX_TXT + 1);
X else fill_fld("", tmp, MAX_TXT + 1);
X
X cnt = k = NULL;
X stat = smg$change_rendition(&vcal_id, &ycoord, &xcoord,
X &1, &TXT_LEN, &SMG$M_REVERSE, __);
X
X while ((key = get_key(vcal_id)) != SMG$K_TRM_CR)
X {
X switch(key) {
X
X case SMG$K_TRM_LEFT: /* move left */
X if (cnt <= R_MAR)
X {
X if (cnt > NULL)
X {
X if (--cnt == 5)
X {
X cnt = 3;
X stat = smg$set_cursor_rel(
X &vcal_id, __, &-3);
X }
X else
X {
X stat = smg$set_cursor_rel(
X &vcal_id, __, &-1);
X }
X }
X }
X else
X {
X stat = smg$return_cursor_pos(&vcal_id, &l, &m);
X
X if (--cnt == R_MAR)
X {
X k = NULL;
X stat = smg$put_chars(&vcal_id,
X mkdesc(tmp), __, &TXT_COL,
X __, &SMG$M_REVERSE, __, __);
X m = TXT_COL + cnt;
X }
X else
X {
X k--;
X m--;
X }
X
X stat = smg$set_cursor_abs(&vcal_id, &l, &m);
X }
X break;
X
X case SMG$K_TRM_RIGHT: /* move right */
X if (cnt < R_MAR)
X {
X if (++cnt == 4)
X {
X cnt = 6;
X stat = smg$set_cursor_rel(&vcal_id, __,
X &3);
X }
X else stat = smg$set_cursor_rel(&vcal_id, __,
X &1);
X }
X else if (cnt < MAX_TXT)
X {
X stat = smg$return_cursor_pos(&vcal_id, &l, &m);
X cnt++;
X k++;
X
X if (m == TXT_COL + R_MAR)
X {
X d = tmp + k;
X stat = smg$put_chars(&vcal_id,
X mkdesc(d), __, &TXT_COL,
X __, &SMG$M_REVERSE, __, __);
X }
X else
X {
X m++;
X stat = smg$set_cursor_abs(&vcal_id,
X &l, &m);
X }
X }
X break;
X
X case SMG$K_TRM_CTRLA: /* insert, overstrike */
X ovr_stk = ovr_stk ? FALSE : TRUE;
X break;
X
X case SMG$K_TRM_CTRLU: /* input again */
X cnt = NULL;
X fill_fld("", tmp, MAX_TXT + 1);
X stat = smg$erase_chars(&vcal_id, &TXT_LEN,
X &ycoord, &TXT_COL);
X stat = smg$change_rendition(&vcal_id, &ycoord, &xcoord,
X &1, &TXT_LEN, &SMG$M_REVERSE, __);
X stat = smg$set_cursor_abs(&vcal_id, &ycoord,
X &TXT_COL);
X break;
X
X case SMG$K_TRM_CTRLW: /* refresh screen */
X stat = smg$repaint_screen(&pstbrd_id);
X break;
X
X case SMG$K_TRM_DELETE: /* delete a char */
X del_char(tmp, &cnt, &k);
X break;
X
X case NULL: /* nothing return */
X break;
X
X default: /* input text in */
X if ((*s = (char *) key) > QST_MARK)
X {
X s[1] = NULL;
X ins_char(s, tmp, &cnt, &k, ovr_stk);
X }
X break;
X }
X }
X
X for (c = tmp + MAX_TXT - 1; *c == ' '; c--);
X
X *++c = NULL;
X
X for (c = tmp; *c == ' '; c++);
X
X if (*c)
X {
X if (msgdata[dayindex[i]] == NULL)
X {
X msgcnt++;
X msgdata[dayindex[i]] = malloc(MAX_BUF);
X }
X
X for (j = NULL; j < 4 && isdigit(c[j]); num[j] = c[j], j++);
X
X if (j != 4)
X {
X for (j = NULL; j < 4; c[j++] = '0');
X }
X else
X {
X num[4] = NULL;
X hnum[0] = num[0]; hnum[1] = num[1]; hnum[2] = NULL;
X mnum[0] = num[2]; mnum[1] = num[3]; mnum[2] = NULL;
X
X if ((j = atoi(hnum)) < NULL || j > 24)
X {
X for (j = NULL; j < 2; c[j++] = '0');
X }
X
X if ((j = atoi(mnum)) < NULL || j > 60)
X {
X for (j = 2; j < 4; c[j++] = '0');
X }
X }
X
X strcpy(msgdata[dayindex[i]], c);
X daydata[dayindex[i]] = day;
X monthdata[dayindex[i]] = month;
X yeardata[dayindex[i]] = year;
X }
X else
X {
X daydata[dayindex[i]] = NULL;
X monthdata[dayindex[i]] = NULL;
X yeardata[dayindex[i]] = NULL;
X
X if (msgdata[dayindex[i]])
X {
X msgcnt--;
X free(msgdata[dayindex[i]]);
X msgdata[dayindex[i]] = NULL;
X }
X }
X
X stat = smg$erase_chars(&vcal_id, &TXT_LEN, &ycoord, &TXT_COL);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp), &ycoord, &xcoord,
X __, __, __, __);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xdel_char(tmp, cnt, l_mar)
X
Xchar *tmp;
Xint *cnt,
X *l_mar;
X{
X char *c,
X s[2];
X int i,
X j,
X k,
X stat;
X $DESCRIPTOR(blank, " ");
X
X if ((*cnt <= R_MAR) && (*cnt > NULL))
X {
X switch(--(*cnt)) {
X
X case 0:
X case 1:
X case 2:
X case 3:
X stat = smg$set_cursor_rel(&vcal_id, __, &-1);
X
X for (i = *cnt; i <= 3; i++)
X {
X tmp[i] = tmp[i + 1];
X s[0] = tmp[i]; s[1] = NULL;
X stat = smg$put_chars(&vcal_id, mkdesc(s),
X __, __, __, &SMG$M_REVERSE, __, __);
X }
X
X i = TXT_COL + *cnt;
X stat = smg$set_cursor_abs(&vcal_id, __, &i);
X break;
X
X case 5:
X *cnt = 3;
X stat = smg$set_cursor_rel(&vcal_id, __, &-3);
X stat = smg$put_chars(&vcal_id, &blank,
X __, __, __, &SMG$M_REVERSE, __, __);
X stat = smg$set_cursor_rel(&vcal_id, __, &-1);
X tmp[*cnt] = ' ';
X break;
X
X default:
X for (i = *cnt; i < MAX_TXT; tmp[i] = tmp[i + 1], i++);
X
X stat = smg$return_cursor_pos(&vcal_id, &j, &k);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp),
X __, &TXT_COL, __, &SMG$M_REVERSE, __, __);
X k--;
X stat = smg$set_cursor_abs(&vcal_id, &j, &k);
X break;
X }
X }
X else if (*cnt > R_MAR)
X {
X for (--(*cnt), i = *cnt; i < MAX_TXT; tmp[i] = tmp[i + 1], i++);
X
X if (*cnt == R_MAR)
X *l_mar = NULL;
X else --(*l_mar);
X
X c = tmp + (*cnt - R_MAR);
X stat = smg$put_chars(&vcal_id, mkdesc(c), __,
X &TXT_COL, __, &SMG$M_REVERSE, __, __);
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xins_char(s, tmp, cnt, l_mar, ovr_stk)
X
Xchar *s,
X *tmp;
Xint *cnt,
X *l_mar,
X ovr_stk;
X{
X char *c;
X int i,
X j,
X k,
X stat;
X
X if (ovr_stk)
X {
X if (*cnt < R_MAR)
X {
X tmp[*cnt] = s[0];
X stat = smg$put_chars(&vcal_id, mkdesc(s), __,
X __, __, &SMG$M_REVERSE, __, __);
X
X if (++(*cnt) == 4)
X {
X *cnt = 6;
X stat = smg$set_cursor_rel(&vcal_id, __, &2);
X tmp[4] = tmp[5] = ' ';
X }
X }
X else if (*cnt < MAX_TXT)
X {
X tmp[*cnt] = s[0];
X stat = smg$return_cursor_pos(&vcal_id, &j, &k);
X
X (*cnt)++;
X (*l_mar)++;
X
X if (k == TXT_COL + R_MAR)
X {
X c = tmp + *l_mar;
X stat = smg$put_chars(&vcal_id, mkdesc(c), __,
X &TXT_COL, __, &SMG$M_REVERSE, __, __);
X }
X else
X {
X stat = smg$put_chars(&vcal_id, mkdesc(s), __,
X &k, __, &SMG$M_REVERSE, __, __);
X }
X }
X }
X else
X {
X if (*cnt < R_MAR)
X {
X if (*cnt <= 3)
X {
X for (i = 3; i > *cnt; tmp[i] = tmp[i - 1], --i);
X }
X else
X {
X for (i = MAX_TXT - 1; i > *cnt; --i)
X tmp[i] = tmp[i - 1];
X }
X
X tmp[*cnt] = s[0];
X stat = smg$return_cursor_pos(&vcal_id, &j, &k);
X stat = smg$put_chars(&vcal_id, mkdesc(tmp),
X __, &TXT_COL, __, &SMG$M_REVERSE, __, __);
X k++;
X stat = smg$set_cursor_abs(&vcal_id, &j, &k);
X
X if (++(*cnt) == 4)
X {
X *cnt = 6;
X stat = smg$set_cursor_rel(&vcal_id, __, &2);
X tmp[4] = tmp[5] = ' ';
X }
X }
X else if (*cnt < MAX_TXT)
X {
X for (i = MAX_TXT - 1; i > *cnt; --i)
X tmp[i] = tmp[i - 1];
X
X tmp[*cnt] = s[0];
X stat = smg$return_cursor_pos(&vcal_id, &j, &k);
X
X (*cnt)++;
X (*l_mar)++;
X
X if (k == TXT_COL + R_MAR)
X {
X c = tmp + *l_mar;
X stat = smg$put_chars(&vcal_id, mkdesc(c), __,
X &TXT_COL, __, &SMG$M_REVERSE, __, __);
X }
X else
X {
X stat = smg$put_chars(&vcal_id, mkdesc(s), __,
X &k, __, &SMG$M_REVERSE, __, __);
X }
X }
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xsort(upbound)
X
Xint upbound;
X{
X int i,
X j,
X k;
X
X for (i = upbound; i > NULL; i--)
X {
X for (j = NULL; j < i; j++)
X {
X if (strncmp(msgdata[dayindex[j]],
X msgdata[dayindex[j + 1]], 4) > NULL)
X {
X k = dayindex[j];
X dayindex[j] = dayindex[j + 1];
X dayindex[j + 1] = k;
X }
X }
X }
X}
SHAR_EOF
if test 25422 -ne "`wc -c < 'olddo-appts.c'`"
then
echo shar: error transmitting "'olddo-appts.c'" '(should have been 25422 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'olddo-calls.c'" '(6063 characters)'
if test -f 'olddo-calls.c'
then
echo shar: will not over-write existing file "'olddo-calls.c'"
else
sed 's/^ X//' << \SHAR_EOF > 'olddo-calls.c'
X/*
X * -------------------------------------------------------
X * Neither York University, Department of Computer
X * Science nor the author assume any responsibility
X * for the use or reliability of this software.
X *
X * Copyright (C) 1987, York University
X * Department of Computer Science
X *
X * General permission to copy or modify, but not for
X * profit, is hereby granted, provided that the above
X * copyright notice is included and reference made to
X * the fact that reproduction privileges were granted
X * by the York University, Department of Computer Science.
X * -------------------------------------------------------
X *
X * Written by: James Pierre Lewis
X * Department of Computer Science
X * York University
X * 1987 - Version V1.0
X */
X
X#include <descrip.h>
X#include <lnmdef.h>
X#include <iodef.h>
X#include <stdio.h>
X#include <time.h>
X#include "vcal.h"
X
Xchar *msgdata[MAX_ENT]; /* message pointers */
Xint ampm, /* am or pm */
X day, /* day */
X daydata[MAX_ENT], /* day data */
X dayindex[MAX_MSG], /* day index to day, month, year */
X dow, /* dow */
X hour, /* hour */
X mhour, /* mhour */
X min, /* minute */
X month, /* month */
X monthdata[MAX_ENT], /* month data */
X year, /* year */
X yeardata[MAX_ENT], /* year data */
X sec, /* second */
X timedata[MAX_ENT]; /* time data */
X
Xmain()
X{
X int cnt,
X i,
X j,
X nowtime,
X timeout,
X tmin,
X stat;
X $DESCRIPTOR(tty, "TT");
X
X stat = sys$assign(&tty, &tty_chan, __, __);
X
X if (!((stat & STS$M_SUCCESS) >> STS$V_SUCCESS))
X warng(stat);
X
X get_data(&tmin);
X tmin = tmin * 60;
X loaddata();
X timeset();
X
X for (i = j = NULL; i < MAX_ENT; i++)
X {
X if ((yeardata[i] == year) &&
X (monthdata[i] == month) && (daydata[i] == day))
X {
X dayindex[j++] = i;
X }
X
X if (j > MAX_MSG)
X break;
X }
X
X sort(j - 1);
X timeset();
X
X for (i = NULL; i < j; i++)
X {
X nowtime = (mhour * 60) + min;
X
X if (timedata[dayindex[i]] > nowtime)
X {
X timeout = (timedata[dayindex[i]] - nowtime) * 60;
X timeout = timeout > tmin ? timeout - tmin : NULL;
X ringer(timeout, msgdata[dayindex[i]],
X timedata[dayindex[i]]);
X }
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xget_data(tmin)
X
Xint *tmin;
X{
X char eqv_str[MAX_BUF];
X int stat;
X $DESCRIPTOR(log_nam, VCAL_MIN);
X $DESCRIPTOR(tab_nam, "LNM$JOB");
X ITEM_LST item_lst[] =
X {
X { 2, LNM$_STRING, eqv_str, 0 },
X { 0, 0, 0, 0 }
X };
X
X stat = sys$trnlnm(__, &tab_nam, &log_nam, __, &item_lst);
X
X *tmin = atoi(eqv_str);
X *tmin = (*tmin < 5 || *tmin > 20) ? 5 : *tmin;
X}
X
X/*----------------------------------------------------------------------------*/
X
Xloaddata()
X{
X char basedata[MAX_BUF],
X key[MAX_BUF],
X tmp[MAX_BUF];
X int field,
X i,
X j,
X k,
X l,
X msgtime;
X FILE *fptr;
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X daydata[i] = monthdata[i] = yeardata[i] = msgdata[i] = NULL;
X }
X
X if (access(APPTS_FILE, __) == -1)
X warng(VCAL_ACCESS);
X
X fptr = fopen(APPTS_FILE, "r");
X i = NULL;
X cuserid(key);
X strcat(key, "-VCAL");
X
X while(fgets(basedata, MAX_BUF, fptr) != NULL)
X {
X basedata[strlen(basedata) - 1] = NULL;
X crypt_it(basedata, key);
X j = k = field = NULL;
X
X while(basedata[j] != NULL )
X {
X if (basedata[j] != ',')
X tmp[k++] = basedata[j];
X else
X {
X switch(field) {
X
X case 0 :
X tmp[k] = NULL;
X monthdata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 1 :
X tmp[k] = NULL;
X daydata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 2 :
X tmp[k] = NULL;
X yeardata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 3 :
X tmp[k] = NULL;
X msgtime = atoi(tmp);
X timedata[i] = ((msgtime / 100) * 60) +
X (msgtime % 100);
X k = NULL;
X break;
X }
X field++;
X }
X j++;
X }
X
X tmp[k] = NULL;
X msgdata[i] = malloc(MAX_BUF);
X strncpy(msgdata[i], tmp, MAX_BUF);
X msgdata[MAX_BUF - 1] = NULL;
X
X if (++i >= MAX_ENT)
X break;
X }
X
X fclose(fptr);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xwarng(msg_id)
X
Xint msg_id;
X{
X char tmp[MSG_BUF];
X short msg_len;
X int car_ret = 0x00000020, /* ret, <message>, ret */
X func = IO$_WRITEVBLK | IO$M_BREAKTHRU |
X IO$M_REFRESH | IO$M_CANCTRLO,
X stat;
X $DESCRIPTOR(msg_buf, tmp);
X
X stat = sys$getmsg(msg_id, &msg_len, &msg_buf, __, __);
X tmp[msg_len] = NULL;
X stat = sys$qiow(__, tty_chan, func, __, __, __, tmp, strlen(tmp),
X __, car_ret, __, __);
X stat = sys$exit(SS$_NORMAL);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xtimeset()
X{
X struct tm *localtime();
X
X struct tm *tp;
X int tloc;
X
X time(&tloc);
X tp = localtime(&tloc);
X dow = tp->tm_wday;
X year = tp->tm_year;
X month = tp->tm_mon + 1;
X day = tp->tm_mday;
X hour = tp->tm_hour;
X mhour = tp->tm_hour;
X min = tp->tm_min;
X sec = tp->tm_sec;
X year += LYEAR;
X
X if (sec >= 30)
X {
X if (++min == 60)
X {
X ++mhour;
X ++hour;
X min = 0;
X }
X }
X
X hour = hour > 12 ? hour - 12 : hour;
X ampm = mhour >= 12 ? TRUE : FALSE;
X}
X
X/*----------------------------------------------------------------------------*/
X
Xringer(delay, message, at)
X
Xchar *message;
Xint at,
X delay;
X{
X char tmp[MAX_BUF];
X int car_ret = 0x00000020, /* ret, <message>, ret */
X func = IO$_WRITEVBLK | IO$M_BREAKTHRU |
X IO$M_REFRESH | IO$M_CANCTRLO,
X stat;
X
X sleep(delay);
X timeset();
X sprintf(tmp, "%c%s - Time %d:%02d %2s - %s",
X BEL, "*VCAL*", at / 60, at % 60, (ampm) ? "PM" : "AM", message);
X stat = sys$qiow(__, tty_chan, func, __, __, __, tmp, strlen(tmp),
X __, car_ret, __, __);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xsort(upbound)
X
Xint upbound;
X{
X int i,
X j,
X k;
X
X for (i = upbound; i > NULL; i--)
X {
X for (j = NULL; j < i; j++)
X {
X if (timedata[dayindex[j]] > timedata[dayindex[j + 1]])
X {
X k = dayindex[j];
X dayindex[j] = dayindex[j + 1];
X dayindex[j + 1] = k;
X }
X }
X }
X}
SHAR_EOF
if test 6063 -ne "`wc -c < 'olddo-calls.c'`"
then
echo shar: error transmitting "'olddo-calls.c'" '(should have been 6063 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'oldvcal-purge.c'" '(3877 characters)'
if test -f 'oldvcal-purge.c'
then
echo shar: will not over-write existing file "'oldvcal-purge.c'"
else
sed 's/^ X//' << \SHAR_EOF > 'oldvcal-purge.c'
X/*
X * -------------------------------------------------------
X * Neither York University, Department of Computer
X * Science nor the author assume any responsibility
X * for the use or reliability of this software.
X *
X * Copyright (C) 1987, York University
X * Department of Computer Science
X *
X * General permission to copy or modify, but not for
X * profit, is hereby granted, provided that the above
X * copyright notice is included and reference made to
X * the fact that reproduction privileges were granted
X * by the York University, Department of Computer Science.
X * -------------------------------------------------------
X *
X * Written by: James Pierre Lewis
X * Department of Computer Science
X * York University
X * 1987 - Version V1.0
X */
X
X#include <descrip.h>
X#include <stdio.h>
X#include <time.h>
X#include "vcal.h"
X
Xchar *msgdata[MAX_ENT]; /* message pointers */
X
Xint daydata[MAX_ENT], /* day data */
X monthdata[MAX_ENT], /* month data */
X tmonth, /* current month */
X tday, /* current day */
X tyear, /* current year */
X yeardata[MAX_ENT]; /* year data */
X
Xmain()
X{
X timeset();
X loaddata();
X updatedata();
X}
X
X/*----------------------------------------------------------------------------*/
X
Xtimeset()
X{
X int tloc;
X struct tm *localtime(),
X *tp;
X
X time(&tloc);
X tp = localtime(&tloc);
X
X tyear = tp->tm_year;
X tmonth = tp->tm_mon + 1;
X tday = tp->tm_mday;
X tyear += LYEAR;
X}
X
X/*----------------------------------------------------------------------------*/
X
Xloaddata()
X{
X char basedata[MAX_BUF],
X key[MAX_BUF],
X tmp[MAX_BUF];
X int field,
X i,
X j,
X k,
X l;
X FILE *fptr;
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X daydata[i] = monthdata[i] = yeardata[i] = msgdata[i] = NULL;
X }
X
X if (access(APPTS_FILE, __) == -1)
X {
X CHK_STAT("", __, OWN_MSG, VCAL_ACCESS);
X }
X
X fptr = fopen(APPTS_FILE, "r");
X i = NULL;
X cuserid(key);
X strcat(key, "-VCAL");
X
X while(fgets(basedata, MAX_BUF, fptr) != NULL)
X {
X basedata[strlen(basedata) - 1] = NULL;
X crypt_it(basedata, key);
X j = k = field = NULL;
X
X while(basedata[j] != NULL )
X {
X if (basedata[j] != ',')
X tmp[k++] = basedata[j];
X else
X {
X switch(field) {
X
X case 0 :
X tmp[k] = NULL;
X monthdata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 1 :
X tmp[k] = NULL;
X daydata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 2 :
X tmp[k] = NULL;
X yeardata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 3 :
X tmp[k++] = ' ';
X tmp[k++] = ' ';
X break;
X }
X field++;
X }
X j++;
X }
X
X tmp[k] = NULL;
X msgdata[i] = malloc(MAX_BUF);
X strncpy(msgdata[i], tmp, MAX_BUF);
X msgdata[MAX_BUF - 1] = NULL;
X
X if (++i >= MAX_ENT)
X break;
X }
X
X fclose(fptr);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xupdatedata(final_stat)
X
Xint *final_stat;
X{
X char *c,
X key[MAX_BUF],
X tmp1[MAX_BUF],
X tmp2[MAX_BUF],
X tmpnam[MAX_BUF];
X int i,
X stat;
X FILE *fptr;
X
X c = mktemp("SYS$LOGIN:TMPXXXXXX");
X sprintf(tmpnam, "%s.DAT", c);
X fptr = fopen(tmpnam, "w", "fop = cif", "mrs = 80", "rat = cr",
X "rfm = var, stm");
X cuserid(key);
X strcat(key, "-VCAL");
X
X stat = lib$disable_ctrl(&LIB$M_CLI_CTRLY, __);
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X
X if ((daydata[i] != NULL) &&
X ((monthdata[i] >= tmonth) && (yeardata[i] >= tyear)))
X {
X strcpy(tmp1, msgdata[i]);
X tmp1[4] = NULL;
X sprintf(tmp2, "%d,%d,%d,%4.4s,%s",
X monthdata[i], daydata[i], yeardata[i],
X tmp1, &tmp1[6]);
X crypt_it(tmp2, key);
X fprintf(fptr, "%s\n", tmp2);
X }
X }
X
X fclose(fptr);
X delete(APPTS_FILE);
X stat = lib$rename_file(mkdesc(tmpnam), mkdesc(APPTS_FILE), __,
X __, __, __, __, __, __, __, __, __);
X
X stat = lib$enable_ctrl(&LIB$M_CLI_CTRLY, __);
X}
SHAR_EOF
if test 3877 -ne "`wc -c < 'oldvcal-purge.c'`"
then
echo shar: error transmitting "'oldvcal-purge.c'" '(should have been 3877 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'oldvcal-sum.c'" '(7830 characters)'
if test -f 'oldvcal-sum.c'
then
echo shar: will not over-write existing file "'oldvcal-sum.c'"
else
sed 's/^ X//' << \SHAR_EOF > 'oldvcal-sum.c'
X/*
X * -------------------------------------------------------
X * Neither York University, Department of Computer
X * Science nor the author assume any responsibility
X * for the use or reliability of this software.
X *
X * Copyright (C) 1987, York University
X * Department of Computer Science
X *
X * General permission to copy or modify, but not for
X * profit, is hereby granted, provided that the above
X * copyright notice is included and reference made to
X * the fact that reproduction privileges were granted
X * by the York University, Department of Computer Science.
X * -------------------------------------------------------
X *
X * Written by: James Pierre Lewis
X * Department of Computer Science
X * York University
X * 1987 - Version V1.0
X */
X
X#include <climsgdef.h>
X#include <descrip.h>
X#include <stdio.h>
X#include <time.h>
X#include "vcal.h"
X
Xchar *msgdata[MAX_ENT]; /* message pointers */
X
Xint cday, /* current day */
X cmonth, /* current month */
X cyear, /* current year */
X daydata[MAX_ENT], /* day data */
X dayindex[MAX_MSG], /* day index to day, month, year */
X monthdata[MAX_ENT], /* month data */
X yeardata[MAX_ENT]; /* year data */
X
Xmain()
X{
X char file_nam[FILE_LEN];
X int month,
X year;
X
X timeset();
X year = cyear;
X month = cmonth;
X get_data(&month, &year, file_nam);
X
X if (*file_nam)
X stdout = freopen(file_nam, "w", stdout, "shr = nil");
X
X if (stdout == NULL)
X {
X CHK_STAT("", __, OWN_MSG, VCAL_INVFILE);
X }
X
X loaddata();
X fprintf(stdout,
X " A P P O I N T M E N T S L I S T\n");
X repeat('-', 78);
X table(month, year);
X repeat('-', 78);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xget_data(month, year, file_nam)
X
Xchar *file_nam;
Xint *month,
X *year;
X{
X char month_tmp[MAX_BUF],
X year_tmp[MAX_BUF];
X short len = NULL;
X int stat;
X struct {
X int : 32;
X struct {
X char *month_nam;
X int : 32;
X } month_tbl[12];
X } key_tbl =
X {
X 24,
X {
X { "7JANUARY", 1 },
X { "8FEBRUARY", 2 },
X { "5MARCH", 3 },
X { "5APRIL", 4 },
X { "3MAY", 5 },
X { "3JUN", 6 },
X { "4JULY", 7 },
X { "6AUGUST", 8 },
X { "9SEPTEMBER", 9 },
X { "8OCTOBER", 10 },
X { "8NOVEMBER", 11 },
X { "8DECEMBER", 12 }
X }
X };
X $PTR_DESCRIPTOR(FILE_LEN, file_inp, file_nam);
X $DESCRIPTOR(file_lbl, OUT_FILE);
X $DESCRIPTOR(month_inp, month_tmp);
X $DESCRIPTOR(month_lbl, MONTH);
X $DESCRIPTOR(year_inp, year_tmp);
X $DESCRIPTOR(year_lbl, YEAR);
X
X if ((stat = cli$present(&month_lbl)) == CLI$_PRESENT)
X {
X stat = cli$get_value(&month_lbl, &month_inp, &len);
X month_tmp[len] = NULL;
X stat = lib$lookup_key(mkdesc(month_tmp), &key_tbl, month,
X __, __);
X CHK_STAT("", stat, SS$_NORMAL, VCAL_INVMONTH);
X }
X
X if ((stat = cli$present(&year_lbl)) == CLI$_PRESENT)
X {
X stat = cli$get_value(&year_lbl, &year_inp, &len);
X year_tmp[len] = NULL;
X *year = atoi(year_tmp);
X
X if (*year == NULL || *year > UYEAR || *year < LYEAR)
X {
X CHK_STAT("", __, OWN_MSG, VCAL_INVYEAR);
X }
X }
X
X if ((stat = cli$present(&file_lbl)) == CLI$_PRESENT)
X {
X stat = cli$get_value(&file_lbl, &file_inp, &len);
X file_nam[len] = NULL;
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xrepeat(c, num)
X
Xchar c;
Xint num;
X{
X char tmp[MAX_BUF];
X int i;
X
X for (i = NULL; i < num; tmp[i] = c, i++);
X
X tmp[0] = tmp[num - 1] = '+';
X tmp[i] = NULL;
X fprintf(stdout, "%s\n", tmp);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xtable(month, year)
X
Xint month,
X year;
X{
X char *dayw[] =
X {
X "Sat ", "Sun ", "Mon ", "Tue ",
X "Wed ", "Thu ", "Fri "
X };
X char *smon[] =
X {
X "JANUARY ", "FEBRUARY ", "MARCH ", "APRIL ",
X "MAY ", "JUNE ", "JULY ", "AUGUST ",
X "SEPTEMBER ", "OCTOBER ", "NOVEMBER ", "DECEMBER "
X };
X int dow,
X first,
X i,
X j,
X monthday = NULL;
X
X fprintf(stdout,
X "| %-10.10s %4.4u \
X |\n", smon[month-1], year);
X
X while (++monthday <= 31)
X {
X first = TRUE;
X
X for (i = j = NULL; i <= MAX_ENT; i++)
X {
X if ((yeardata[i] == year) && (monthdata[i] == month) &&
X (daydata[i] == monthday))
X {
X dayindex[j++] = i;
X }
X
X if (j > MAX_MSG)
X break;
X }
X
X sort(j - 1);
X
X for (i = NULL; i < j; i++)
X {
X if (first == TRUE)
X {
X dow = getdow(monthday, month, year);
X first = FALSE;
X fprintf(stdout,
X "| \
X |\n");
X fprintf(stdout,
X "| %-7.7s%2d %-64.64s|\n", dayw[dow],
X monthday, msgdata[dayindex[i]]);
X }
X else fprintf(stdout,
X "| %-64.64s|\n",
X msgdata[dayindex[i]]);
X }
X }
X}
X
X/*----------------------------------------------------------------------------*/
X
Xgetdow(tday, tmonth, tyear)
X
Xint tday,
X tmonth,
X tyear;
X{
X
X static int mdays[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
X int day = 1,
X days,
X mcnt,
X month = 1,
X year = 79;
X
X
X if ((tmonth == month) && (tyear == year))
X days = abs(day - tday);
X else
X {
X days = mdays[month] - day;
X
X if (tyear == year)
X {
X while (++month < tmonth)
X {
X days += mdays[month];
X days = ((month == 2) && ((year % 4) == 0)) ?
X days + 1 : days;
X }
X }
X else
X {
X while (++month < 13)
X {
X days += mdays[month];
X days = ((month == 2) && ((year % 4) == 0)) ?
X days + 1 : days;
X }
X
X while (++year < tyear)
X {
X days += 365;
X days = ((year % 4) == 0) ? days + 1 : days;
X }
X
X for (mcnt = 1; mcnt < tmonth; mcnt++)
X {
X days += mdays[mcnt];
X days = ((mcnt == 2) && ((tyear % 4) == 0)) ?
X days + 1 : days;
X }
X }
X
X days += tday;
X }
X
X return (days % 7);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xloaddata()
X{
X char basedata[MAX_BUF],
X key[MAX_BUF],
X tmp[MAX_BUF];
X int field,
X i,
X j,
X k,
X l;
X FILE *fptr;
X
X for (i = NULL; i < MAX_ENT; i++)
X {
X daydata[i] = monthdata[i] = yeardata[i] = msgdata[i] = NULL;
X }
X
X if (access(APPTS_FILE, __) == -1)
X {
X CHK_STAT("", __, OWN_MSG, VCAL_ACCESS);
X }
X
X fptr = fopen(APPTS_FILE, "r");
X i = NULL;
X cuserid(key);
X strcat(key, "-VCAL");
X
X while(fgets(basedata, MAX_BUF, fptr) != NULL)
X {
X basedata[strlen(basedata) - 1] = NULL;
X crypt_it(basedata, key);
X j = k = field = NULL;
X
X while(basedata[j] != NULL )
X {
X if (basedata[j] != ',')
X tmp[k++] = basedata[j];
X else
X {
X switch(field) {
X
X case 0 :
X tmp[k] = NULL;
X monthdata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 1 :
X tmp[k] = NULL;
X daydata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 2 :
X tmp[k] = NULL;
X yeardata[i] = atoi(tmp);
X k = NULL;
X break;
X
X case 3 :
X tmp[k++] = ' ';
X tmp[k++] = ' ';
X break;
X }
X field++;
X }
X j++;
X }
X
X tmp[k] = NULL;
X msgdata[i] = malloc(MAX_BUF);
X strncpy(msgdata[i], tmp, MAX_BUF);
X msgdata[MAX_BUF - 1] = NULL;
X
X if (++i >= MAX_ENT)
X break;
X }
X
X fclose(fptr);
X}
X
X/*----------------------------------------------------------------------------*/
X
Xtimeset()
X{
X int tloc;
X struct tm *localtime(),
X *tp;
X
X time(&tloc);
X tp = localtime(&tloc);
X
X cyear = tp->tm_year;
X cmonth = tp->tm_mon + 1;
X cday = tp->tm_mday;
X cyear += LYEAR;
X}
X
X/*----------------------------------------------------------------------------*/
X
Xsort(upbound)
X
Xint upbound;
X{
X int i,
X j,
X k;
X
X for (i = upbound; i > NULL; i--)
X {
X for (j = NULL; j < i; j++)
X {
X if (strncmp(msgdata[dayindex[j]],
X msgdata[dayindex[j + 1]], 4) > NULL)
X {
X k = dayindex[j];
X dayindex[j] = dayindex[j + 1];
X dayindex[j + 1] = k;
X }
X }
X }
X}
SHAR_EOF
if test 7830 -ne "`wc -c < 'oldvcal-sum.c'`"
then
echo shar: error transmitting "'oldvcal-sum.c'" '(should have been 7830 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'smgtrmptr.h'" '(7309 characters)'
if test -f 'smgtrmptr.h'
then
echo shar: will not over-write existing file "'smgtrmptr.h'"
else
sed 's/^ X//' << \SHAR_EOF > 'smgtrmptr.h'
X/* SMGTRMPTR.H Definitions */
X
X#define SMG$K_ADVANCED_VIDEO 1
X#define SMG$K_ANSI_CRT 2
X#define SMG$K_AUTO_MARGIN 3
X#define SMG$K_BACKSPACE 4
X#define SMG$K_BLOCK_MODE 5
X#define SMG$K_DEC_CRT 6
X#define SMG$K_EDIT 7
X#define SMG$K_EIGHT_BIT 8
X#define SMG$K_FULLDUP 9
X#define SMG$K_IGNORE_NEWLINE 10
X#define SMG$K_INSERT_MODE_NULLS 11
X#define SMG$K_LOWERCASE 12
X#define SMG$K_NO_ERASE 13
X#define SMG$K_NO_SCROLL 14
X#define SMG$K_OVERSTRIKE 15
X#define SMG$K_PRINTER_PORT 16
X#define SMG$K_REGIS 17
X#define SMG$K_SCOPE 18
X#define SMG$K_SIXEL_GRAPHICS 19
X#define SMG$K_SOFT_CHARACTERS 20
X#define SMG$K_PHYSICAL_TABS 21
X#define SMG$K_PHYSICAL_FF 22
X#define SMG$K_UNDERLINE 23
X#define SMG$K_CURSOR_REPORT_ANSI 24
X#define SMG$K_DEC_CRT_2 25
X#define SMG$K_DEC_CRT_3 26
X#define SMG$K_SET_CURSOR_COL_ROW 27
X#define SMG$K_PRIVATE_BOO_1 211
X#define SMG$K_PRIVATE_BOO_2 212
X#define SMG$K_PRIVATE_BOO_3 213
X#define SMG$K_PRIVATE_BOO_4 214
X#define SMG$K_PRIVATE_BOO_5 215
X#define SMG$K_PRIVATE_BOO_6 216
X#define SMG$K_PRIVATE_BOO_7 217
X#define SMG$K_PRIVATE_BOO_8 218
X#define SMG$K_PRIVATE_BOO_9 219
X#define SMG$K_PRIVATE_BOO_10 220
X#define SMG$K_MAX_BOOLEAN_CODE 220
X#define SMG$K_COLUMNS 221
X#define SMG$K_CR_FILL 222
X#define SMG$K_FRAME 223
X#define SMG$K_LF_FILL 224
X#define SMG$K_NUMBER_FN_KEYS 225
X#define SMG$K_ROWS 226
X#define SMG$K_VMS_TERMINAL_NUMBER 227
X#define SMG$K_WIDE_SCREEN_COLUMNS 228
X#define SMG$K_PRIVATE_NUM_1 431
X#define SMG$K_PRIVATE_NUM_2 432
X#define SMG$K_PRIVATE_NUM_3 433
X#define SMG$K_PRIVATE_NUM_4 434
X#define SMG$K_PRIVATE_NUM_5 435
X#define SMG$K_PRIVATE_NUM_6 436
X#define SMG$K_PRIVATE_NUM_7 437
X#define SMG$K_PRIVATE_NUM_8 438
X#define SMG$K_PRIVATE_NUM_9 439
X#define SMG$K_PRIVATE_NUM_10 440
X#define SMG$K_MAX_NUMERIC_CODE 440
X#define SMG$K_BEGIN_ALTERNATE_CHAR 441
X#define SMG$K_BEGIN_BLINK 442
X#define SMG$K_BEGIN_BOLD 443
X#define SMG$K_BEGIN_DELETE_MODE 444
X#define SMG$K_BEGIN_INSERT_MODE 445
X#define SMG$K_BEGIN_LINE_DRAWING_CHAR 446
X#define SMG$K_BEGIN_REVERSE 447
X#define SMG$K_BEGIN_UNDERSCORE 448
X#define SMG$K_BOTTOM_T_CHAR 449
X#define SMG$K_CLEAR_TAB 450
X#define SMG$K_CROSS_CHAR 451
X#define SMG$K_CURSOR_DOWN 452
X#define SMG$K_CURSOR_LEFT 453
X#define SMG$K_CURSOR_RIGHT 454
X#define SMG$K_CURSOR_UP 455
X#define SMG$K_DARK_SCREEN 456
X#define SMG$K_DELETE_CHAR 457
X#define SMG$K_DELETE_LINE 458
X#define SMG$K_DEVICE_ATTRIBUTES 459
X#define SMG$K_DOUBLE_HIGH_BOTTOM 460
X#define SMG$K_DOUBLE_HIGH_TOP 461
X#define SMG$K_DOUBLE_WIDE 462
X#define SMG$K_DUPLICATE 463
X#define SMG$K_END_ALTERNATE_CHAR 464
X#define SMG$K_END_BLINK 465
X#define SMG$K_END_BOLD 466
X#define SMG$K_END_DELETE_MODE 467
X#define SMG$K_END_INSERT_MODE 468
X#define SMG$K_END_LINE_DRAWING_CHAR 469
X#define SMG$K_END_REVERSE 470
X#define SMG$K_END_UNDERSCORE 471
X#define SMG$K_ERASE_TO_END_DISPLAY 472
X#define SMG$K_ERASE_TO_END_LINE 473
X#define SMG$K_ERASE_WHOLE_DISPLAY 474
X#define SMG$K_ERASE_WHOLE_LINE 475
X#define SMG$K_HOME 476
X#define SMG$K_HORIZONTAL_BAR 477
X#define SMG$K_INIT_STRING 478
X#define SMG$K_INSERT_CHAR 479
X#define SMG$K_INSERT_LINE 480
X#define SMG$K_INSERT_PAD 481
X#define SMG$K_KEY_0 482
X#define SMG$K_KEY_1 483
X#define SMG$K_KEY_2 484
X#define SMG$K_KEY_3 485
X#define SMG$K_KEY_4 486
X#define SMG$K_KEY_5 487
X#define SMG$K_KEY_6 488
X#define SMG$K_KEY_7 489
X#define SMG$K_KEY_8 490
X#define SMG$K_KEY_9 491
X#define SMG$K_KEY_BACKSPACE 492
X#define SMG$K_KEY_COMMA 493
X#define SMG$K_KEY_DOWN_ARROW 494
X#define SMG$K_KEY_E1 495
X#define SMG$K_KEY_E2 496
X#define SMG$K_KEY_E3 497
X#define SMG$K_KEY_E4 498
X#define SMG$K_KEY_E5 499
X#define SMG$K_KEY_E6 500
X#define SMG$K_KEY_ENTER 501
X#define SMG$K_KEY_F1 502
X#define SMG$K_KEY_F2 503
X#define SMG$K_KEY_F3 504
X#define SMG$K_KEY_F4 505
X#define SMG$K_KEY_F5 506
X#define SMG$K_KEY_F6 507
X#define SMG$K_KEY_F7 508
X#define SMG$K_KEY_F8 509
X#define SMG$K_KEY_F9 510
X#define SMG$K_KEY_F10 511
X#define SMG$K_KEY_F11 512
X#define SMG$K_KEY_F12 513
X#define SMG$K_KEY_F13 514
X#define SMG$K_KEY_F14 515
X#define SMG$K_KEY_F15 516
X#define SMG$K_KEY_F16 517
X#define SMG$K_KEY_F17 518
X#define SMG$K_KEY_F18 519
X#define SMG$K_KEY_F19 520
X#define SMG$K_KEY_F20 521
X#define SMG$K_KEY_LEFT_ARROW 522
X#define SMG$K_KEY_MINUS 523
X#define SMG$K_KEY_PERIOD 524
X#define SMG$K_KEY_PF1 525
X#define SMG$K_KEY_PF2 526
X#define SMG$K_KEY_PF3 527
X#define SMG$K_KEY_PF4 528
X#define SMG$K_KEY_RIGHT_ARROW 529
X#define SMG$K_KEY_UP_ARROW 530
X#define SMG$K_LABEL_F1 531
X#define SMG$K_LABEL_F2 532
X#define SMG$K_LABEL_F3 533
X#define SMG$K_LABEL_F4 534
X#define SMG$K_LABEL_F5 535
X#define SMG$K_LABEL_F6 536
X#define SMG$K_LABEL_F7 537
X#define SMG$K_LABEL_F8 538
X#define SMG$K_LABEL_F9 539
X#define SMG$K_LABEL_F10 540
X#define SMG$K_LABEL_F11 541
X#define SMG$K_LABEL_F12 542
X#define SMG$K_LABEL_F13 543
X#define SMG$K_LABEL_F14 544
X#define SMG$K_LABEL_F15 545
X#define SMG$K_LABEL_F16 546
X#define SMG$K_LABEL_F17 547
X#define SMG$K_LABEL_F18 548
X#define SMG$K_LABEL_F19 549
X#define SMG$K_LABEL_F20 550
X#define SMG$K_LEFT_T_CHAR 551
X#define SMG$K_LIGHT_SCREEN 552
X#define SMG$K_LOWER_LEFT_CORNER 553
X#define SMG$K_LOWER_RIGHT_CORNER 554
X#define SMG$K_NAME 555
X#define SMG$K_NEWLINE_CHAR 556
X#define SMG$K_PAD_CHAR 557
X#define SMG$K_RESTORE_CURSOR 558
X#define SMG$K_RIGHT_T_CHAR 559
X#define SMG$K_SAVE_CURSOR 560
X#define SMG$K_SCROLL_FORWARD 561
X#define SMG$K_SCROLL_REVERSE 562
X#define SMG$K_SEL_ERASE_TO_END_DISPLAY 563
X#define SMG$K_SEL_ERASE_TO_END_LINE 564
X#define SMG$K_SEL_ERASE_WHOLE_DISPLAY 565
X#define SMG$K_SEL_ERASE_WHOLE_LINE 566
X#define SMG$K_SET_APPLICATION_KEYPAD 567
X#define SMG$K_SET_CHAR_NOT_SEL_ERASE 568
X#define SMG$K_SET_CHAR_SEL_ERASE 569
X#define SMG$K_SET_CURSOR_ABS 570
X#define SMG$K_SET_NUMERIC_KEYPAD 571
X#define SMG$K_SET_SCROLL_REGION 572
X#define SMG$K_SET_TAB 573
X#define SMG$K_SINGLE_HIGH 574
X#define SMG$K_TAB_CHAR 575
X#define SMG$K_TOP_T_CHAR 576
X#define SMG$K_UNDERLINE_CHAR 577
X#define SMG$K_UPPER_LEFT_CORNER 578
X#define SMG$K_UPPER_RIGHT_CORNER 579
X#define SMG$K_VERTICAL_BAR 580
X#define SMG$K_WIDTH_NARROW 581
X#define SMG$K_WIDTH_WIDE 582
X#define SMG$K_CURSOR_POSITION_REPORT 583
X#define SMG$K_REQUEST_CURSOR_POSITION 584
X#define SMG$K_CR_GRAPHIC 585
X#define SMG$K_FF_GRAPHIC 586
X#define SMG$K_LF_GRAPHIC 587
X#define SMG$K_HT_GRAPHIC 588
X#define SMG$K_VT_GRAPHIC 589
X#define SMG$K_TRUNCATION_ICON 590
X#define SMG$K_CURSOR_NEXT_LINE 591
X#define SMG$K_CURSOR_PRECEDING_LINE 592
X#define SMG$K_INDEX 593
X#define SMG$K_REVERSE_INDEX 594
X#define SMG$K_BEGIN_NORMAL_RENDITION 595
X#define SMG$K_BEGIN_AUTOWRAP_MODE 596
X#define SMG$K_END_AUTOWRAP_MODE 597
X#define SMG$K_BEGIN_AUTOREPEAT_MODE 598
X#define SMG$K_END_AUTOREPEAT_MODE 599
X#define SMG$K_SET_ORIGIN_RELATIVE 600
X#define SMG$K_SET_ORIGIN_ABSOLUTE 601
X#define SMG$K_ERASE_LINE_TO_CURSOR 602
X#define SMG$K_NEXT_LINE 603
X#define SMG$K_BEGIN_AUTOPRINT_MODE 604
X#define SMG$K_END_AUTOPRINT_MODE 605
X#define SMG$K_PRINT_SCREEN 606
X#define SMG$K_SET_CURSOR_ON 607
X#define SMG$K_SET_CURSOR_OFF 608
X#define SMG$K_SET_PRINTER_OUTPUT 609
X#define SMG$K_SET_SCREEN_OUTPUT 610
X#define SMG$K_ERASE_DISPLAY_TO_CURSOR 611
X#define SMG$K_PRIVATE_STR_1 651
X#define SMG$K_PRIVATE_STR_2 652
X#define SMG$K_PRIVATE_STR_3 653
X#define SMG$K_PRIVATE_STR_4 654
X#define SMG$K_PRIVATE_STR_5 655
X#define SMG$K_PRIVATE_STR_6 656
X#define SMG$K_PRIVATE_STR_7 657
X#define SMG$K_PRIVATE_STR_8 658
X#define SMG$K_PRIVATE_STR_9 659
X#define SMG$K_PRIVATE_STR_10 660
SHAR_EOF
if test 7309 -ne "`wc -c < 'smgtrmptr.h'`"
then
echo shar: error transmitting "'smgtrmptr.h'" '(should have been 7309 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'vcal-msg.msg'" '(619 characters)'
if test -f 'vcal-msg.msg'
then
echo shar: will not over-write existing file "'vcal-msg.msg'"
else
sed 's/^ X//' << \SHAR_EOF > 'vcal-msg.msg'
X.TITLE vcal_mssg
X.FACILITY vcal,1/PREFIX=VCAL_
X
X.SEVERITY INFORMATIONAL
X
XFILE <Appointments file did not exist. It has just been created>
X
X.SEVERITY WARNING
X
X
X.SEVERITY ERROR
X
XACCESS <Appointments file cannot be accessed at the moment>
XINVFILE <File could not be created. Check the file specification>
XINVMIN <Invalid minutes before a scheduled event. Min from 5 up to 20>
XINVMONTH <Invalid month>
XINVYEAR <Invalid year. Start from year 1900 up to year 9999 only>
XNOT_COMP <TTY is not VT100 compatible>
XNOT_TRM <TTY is not a terminal>
XPURGE <Old appointments should be purged. Appointments file is full>
X
X.END
SHAR_EOF
if test 619 -ne "`wc -c < 'vcal-msg.msg'`"
then
echo shar: error transmitting "'vcal-msg.msg'" '(should have been 619 characters)'
fi
fi # end of overwriting check
# End of shell archive
exit 0
More information about the Alt.sources
mailing list