[comp.sources.bugs] fep

lee@uhccux.uhcc.hawaii.edu (Greg Lee) (11/13/88)

Here are a couple minor changes to the fep program that was just
posted in comp.sources.unix.  (1) re#defines CTRL to what the
code apparently supposes it to mean, (2) changes an error check
of the malloc return value from '<= 0' to '== 0'.

Fep has support for Kanji entry and I'm wondering if I can
use it.  The program notes say you have to have "ASCII UNIX".
What's this?  Can someone explain?

		Greg, lee@uhccux.uhcc.hawaii.edu

*** orig.fep_defs.h	Sat Nov 12 20:04:05 1988
--- fep_defs.h	Fri Nov 11 09:58:17 1988
***************
*** 5,10
      "$Header: fep_defs.h,v 4.0 88/08/05 20:21:51 utashiro Rel $ (SRA)"
  #endif lint
  
  #define	MAXCOMLEN		512	/* maximum command length */
  #define MAXARGS			64	/* maximum number of arguments */
  #define ON			1	/* on switch */

--- 5,14 -----
      "$Header: fep_defs.h,v 4.0 88/08/05 20:21:51 utashiro Rel $ (SRA)"
  #endif lint
  
+ /* changed CTRL: -- gl */
+ #undef  CTRL
+ #define CTRL(c)		('c'-64)
+ 
  #define	MAXCOMLEN		512	/* maximum command length */
  #define MAXARGS			64	/* maximum number of arguments */
  #define ON			1	/* on switch */
*** orig.fep_main.c	Sat Nov 12 20:02:59 1988
--- fep_main.c	Fri Nov 11 10:08:52 1988
***************
*** 243,249
       * Initialize output buffer.
       */
      output_buffer->buf = (char *) malloc (5120);
!     if (output_buffer->buf <= 0) {
  	fprintf (stderr, "Can't allocate enough momory\n");
  	kill_process ();
  	exit (1);

--- 243,250 -----
       * Initialize output buffer.
       */
      output_buffer->buf = (char *) malloc (5120);
! /*    if (output_buffer->buf <= 0) {  changed -- gl */
!     if (output_buffer->buf == 0) {
  	fprintf (stderr, "Can't allocate enough momory\n");
  	kill_process ();
  	exit (1);

utashiro@sran84.sra.JUNET (Kazumasa Utashiro) (11/18/88)

In article <2626@uhccux.uhcc.hawaii.edu>
	lee@uhccux.uhcc.hawaii.edu (Greg Lee) writes:

>> Here are a couple minor changes to the fep program that was just
>> posted in comp.sources.unix.  (1) re#defines CTRL to what the
>> code apparently supposes it to mean, (2) changes an error check
>> of the malloc return value from '<= 0' to '== 0'.

Thank you Lee. I'm very glad to hear someone is using my tool.
However, according to your definition of CTRL ('c'-64),
CTRL(D) makes 004 (control-D) but CTRL(d) makes 044 ($).  Is
this a correct definition for CTRL?

Your fix for malloc's return value is correct. I didn't find
it because compiler of my UNIX system doesn't complain about
it.  It is fixed in current version of fep.  I already sent 3
patches of fep to Mr. Rich Salz.

Note that this program assumes that the negative address in
32bit integer should be kernel address space, and using the
MSB of address for indirect flag in binding table.  So,
probably fep won't work on the system that uses negative
value for user address space anyway.  It might be better to
cast malloced value to signed integer and make sure it has
positive value. (ugly? yes it is.)

>> Fep has support for Kanji entry and I'm wondering if I can
>> use it.  The program notes say you have to have "ASCII UNIX".
>> What's this?  Can someone explain?

Sorry for confusion.  I wrote "ASCII UNIX" as "ASCII Corp's
Japanese enhanced UNIX system", which can handle Japanese
character set in it.  Official name for it, probably, is
"ASCII UX/4.3bsd system".  Supporting "ASCII UNIX" means fep
is using its libraries like iskanji(3) and some special
ioctrls for tty driver.  Unfortunately, there are no
standard for these kind of Japanization (Sigma? Who are you?).

Kazumasa Kayo Utashiro
Software Research Associates, Inc.
1-1-1 Hirakawa-cho, Chiyoda-ku, Tokyo 102, Japan
	UUCP:	kddlab!srava.sra.junet!utashiro
	ARPA:	utashiro%sra.junet@uunet.uu.net
	JUNET:	utashiro@sra.junet

cck@deneb.ucdavis.edu (Earl H. Kinmonth) (11/20/88)

In article <754@sragwa.sra.JUNET> utashiro%sra.junet@uunet.uu.net writes:
>>> Fep has support for Kanji entry and I'm wondering if I can
>>> use it.  The program notes say you have to have "ASCII UNIX".
>>> What's this?  Can someone explain?
>
>Sorry for confusion.  I wrote "ASCII UNIX" as "ASCII Corp's
>Japanese enhanced UNIX system", which can handle Japanese
>character set in it.  Official name for it, probably, is
>"ASCII UX/4.3bsd system".  Supporting "ASCII UNIX" means fep
>is using its libraries like iskanji(3) and some special
>ioctrls for tty driver.  Unfortunately, there are no
>standard for these kind of Japanization (Sigma? Who are you?).

Can you supply information on this system?  I tried writing ASCII
(in Japanese) about kanji software for AT systems (I run XENIX
now) and did not get replies to either of two letters.  Right now
my only kanji capability is on a NEC Bungo 5gx word processor.

Earl H. Kinmonth, History Department, University of California,
Davis, California, 95616

916-752-1636/0776

Disclaimer: This is AmeriKa!  Who needs a disclaimer!

Internet:   ucdked!cck@ucdavis.edu

UUCP:       {ucbvax, lll-crg}!ucdavis!ucdked!cck