[comp.sources.bugs] vcal on SCO Xenix

jl42+@andrew.cmu.edu (Jay Mathew Libove) (10/20/87)

I FTP'd "vcal" from eddie.mit.edu (src/local/vcal/) and attempted to port
it to SCO Xenix. I am having trouble in two areas:

1) the terminal modes are set by a system() call - the BSD version does
a system("stty -cbreak -echo"). Xenix doesn't have cbreak. The closest I
have so far got it to working was to do a "stty -icanon -echo" but this
only updates the screen every fourth character, though it does retain
all the characters typed. However, upon exit, doing "stty sane echoe"
leaves the terminal in screwey mode (no echo, ignore 3 of 4 whitespaces...)
Any thoughts on this one world? Is there maybe a Sys5 version of vcal
around? Is the one from eddie.mit.edu really old or something? Thanks!

2) Upon exit, the program gets an error trying to write (null) file - 
is there a directory that doesn't exist under Sys5 that does exist by
default under BSD where calendar files might go?

Thanks for all help!

Jay Libove
Arpa:   jl42@andrew.cmu.edu	Bitnet: jl42@drycas.bitnet
UUCP:   ...!{uunet, ucbvax, harvard}!andrew.cmu.edu!jl42
UUCP:   ...!{pitt | bellcore} !darth!libove!libove

Disclaimer: I don't tell my employers what I think...

tbertels@ncrlnk.Dayton.NCR.COM (Tom Bertelson CTSP) (10/20/87)

In article <EVSfujy00VoDVs40=u@andrew.cmu.edu> jl42+@andrew.cmu.edu (Jay Mathew Libove) writes:
>I FTP'd "vcal" from eddie.mit.edu (src/local/vcal/) and attempted to port
>it to SCO Xenix. I am having trouble in two areas:
>
>1) the terminal modes are set by a system() call - the BSD version does
>a system("stty -cbreak -echo"). Xenix doesn't have cbreak. The closest I
>have so far got it to working was to do a "stty -icanon -echo" but this
>only updates the screen every fourth character, though it does retain
>all the characters typed. However, upon exit, doing "stty sane echoe"
>leaves the terminal in screwey mode (no echo, ignore 3 of 4 whitespaces...)
>Any thoughts on this one world?

I had the same problem.  Try "stty -icanon -echo min '^a' to go into
cbreak mode, and "stty icanon echo eof '^d'" to return to normal.  The
min-eof business is what controls the number of characters read before
processing.  See termio(7).

>        Is the one from eddie.mit.edu really old or something? Thanks!

Yes, vcal is old.  Somewhere there's a rewrite called "month".  I
never ported it to Xenix, but it looked a little cleaner and had some
additional features.  Try the comp.sources.unix archives for that
one.

>2) Upon exit, the program gets an error trying to write (null) file - 
>is there a directory that doesn't exist under Sys5 that does exist by
>default under BSD where calendar files might go?

Hmmm...  I don't remember that one.  Try touching $HOME/.appointments
before running vcal.

Hope this helps.
-- 
Tom Bertelson
Tom.Bertelson@Dayton.NCR.COM
...!ncr-sd!ncrlnk!tbertels

decot@hpisod2.HP.COM (Dave Decot) (10/20/87)

> I FTP'd "vcal" from eddie.mit.edu (src/local/vcal/) and attempted to port
> it to SCO Xenix. I am having trouble in two areas:
> 
> 1) the terminal modes are set by a system() call - the BSD version does
> a system("stty -cbreak -echo"). Xenix doesn't have cbreak. The closest I
> have so far got it to working was to do a "stty -icanon -echo" but this
> only updates the screen every fourth character, though it does retain
> all the characters typed. However, upon exit, doing "stty sane echoe"
> leaves the terminal in screwey mode (no echo, ignore 3 of 4 whitespaces...)
> Any thoughts on this one world? Is there maybe a Sys5 version of vcal
> around? Is the one from eddie.mit.edu really old or something? Thanks!

For SystemV-based machines, change this to "stty -icanon -echo eof=\01 eol=\01".
To return to normal, do "stty icanon echo eof='^D' eol='^@'".

To see the reason behind these shenanigans: look for "MIN and TIME" on
the man page that describes the terminal driver's non-canonical mode.

Sorry, I don't know what is causing the other problem.

Dave Decot	 Hewlett-Packard Company		hpda!decot

ries@trwrb.UUCP (Marc Ries) (10/21/87)

[vcal problems deleted]
>
>Yes, vcal is old.  Somewhere there's a rewrite called "month".  I
>never ported it to Xenix, but it looked a little cleaner and had some
>additional features.  Try the comp.sources.unix archives for that
>one.

 Even  the  "month"  program  in  comp.sources.unix  archives  is
 (unfortunately)  outdated  [and I don't see a repost in the near
 future].

 The newest month sources have been rewritten to for  portability
 to  compilers  with  6-character variable restrictions.  It does
 compile under XENIX (and BSD and SYSV).

 The known bugs that exist in the comp.sources.unix version  have
 been fixed.  In  addition  to  improvements  in  the  code  that
 outputs  calendar  and  appt  schedules, one can now check other
 user's schedules for "meeting" openings and/or conflicts.

 Any one who wants a copy of the month  sources  (or  the  useful
 "appt" routines) should send mail to me with a valid UUCP return
 address.

-- 
		Marc A. Ries

		sdcrdcf!---\ 
                ihnp4!------\----- trwrb! --- ries

rbj@icst-cmr.arpa (Root Boy Jim) (10/26/87)

   From: Jay Mathew Libove <jl42+@andrew.cmu.EDU>
   Newsgroups: comp.sources.bugs
   Date: 20 Oct 87 01:38:55 GMT

   I FTP'd "vcal" from eddie.mit.edu (src/local/vcal/) and attempted to port
   it to SCO Xenix. I am having trouble in two areas:

   1) the terminal modes are set by a system() call - the BSD version does
   a system("stty -cbreak -echo"). Xenix doesn't have cbreak. The closest I
   have so far got it to working was to do a "stty -icanon -echo" but this
   only updates the screen every fourth character ...

I don't know much about the System V tty driver, but they overloaded
the EOF char field with something called VMIN & VTIME (or similar, I forget
the exact name), that tell the driver to return after VMIN chars and/or
VTIME time units. Your EOF char is probably ^D which has a value of four.
You can probably get away with setting your EOF char to ^A, which has a value
of one, to get every character. Better solutions probably exist. Have fun!

   Thanks for all help!

   Jay Libove
   Arpa:   jl42@andrew.cmu.edu	Bitnet: jl42@drycas.bitnet
   UUCP:   ...!{uunet, ucbvax, harvard}!andrew.cmu.edu!jl42
   UUCP:   ...!{pitt | bellcore} !darth!libove!libove

   Disclaimer: I don't tell my employers what I think...

Turnabout is fair play.

	(Root Boy) Jim Cottrell	<rbj@icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
I love ROCK 'N ROLL!  I memorized the all WORDS to ``WIPE-OUT'' in 1965!!