home *** CD-ROM | disk | FTP | other *** search
- From: rogers@sud509.ed.ray.com (Andrew Rogers)
- Newsgroups: alt.sources
- Subject: Patch for PCAL (problems finding ~/calendar)
- Message-ID: <1818@sud509.ed.ray.com>
- Date: 20 Jul 90 19:02:21 GMT
-
- It has come to my attention that the newest Pcal doesn't work on all Un*x
- systems - apparently because not all file systems automatically translate "~".
- If this is the case with yours (symptoms: calendar data file must be explicitly
- included with the -f option in order to be found), patch it as follows:
-
- Andrew
- ------------------------------- cut here --------------------------------
- #
- ed pcal.c << 'EOF'
- 277a
- #else
- else if (nocal == FALSE) {
- char buf[80], *p;
- extern char *getenv();
-
- *buf = '\0';
- if ((p = getenv("HOME")) != NULL) {
- strcpy(buf, p);
- strcat(buf, "/");
- }
- strcat(buf, INFILE);
- cfp = fopen(buf, "r");
- }
- #endif
- .
- 275a
- #ifdef VMS
- .
- 69c
- #define INFILE "calendar"
- .
- w
- q
- 'EOF'
-