[comp.bugs.4bsd] Tip to a hayes modem doesn't provide a pause character. +Fix

gww@marduk.UUCP (Gary Winiger) (09/05/87)

Subject: Tip to a hayes modem doesn't allow a pause character +Fix
Index:	usr.bin/tip/aculib/hayes.c 4.3BSD +Fix

Description:
	The code in tip (acu.c) stops a phone number on a ',' character
	as documented in phone(5), thus not allowing the ``normal''
	Hayes pause character in a number.  Neither of the documented
	characters, '=' and '*', affect a pause.  '=' works correctly
	for a USR (courier) modem.
Repeat-By:
	Try to have tip dial a hayes modem type with a ',', '=', or '*'
	indicating a pause.  None will work.
Fix:
	Choose '=' as the pause character for hayes modem type.
	The attached code solves this problem at Elxsi.

Gary..
{ucbvax!sun,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww
--------- cut --------- snip --------- :.,$w diff -------------
*** /tmp/,RCSt1002249	Fri Jul  3 16:24:27 1987
--- hayes.c	Fri Jul  3 16:22:57 1987
***************
*** 1,5 ****
--- 1,8 ----
  /*
   * $Log:	hayes.c,v $
+  * Revision 1.2  87/07/03  16:22:32  gww
+  * Translate '=' to ',' for pause character.
+  * 
   * Revision 1.1  87/07/02  17:02:42  gww
   * Initial revision
   * 
***************
*** 11,17 ****
   */
  
  #ifndef lint
! static char *ERcsId = "$Header: hayes.c,v 1.1 87/07/02 17:02:42 gww Exp $ ENIX BSD";
  static char sccsid[] = "@(#)hayes.c	5.1 (Berkeley) 4/30/85";
  #endif not lint
  
--- 14,20 ----
   */
  
  #ifndef lint
! static char *ERcsId = "$Header: hayes.c,v 1.2 87/07/03 16:22:32 gww Exp $ ENIX BSD";
  static char sccsid[] = "@(#)hayes.c	5.1 (Berkeley) 4/30/85";
  #endif not lint
  
***************
*** 76,81 ****
--- 79,88 ----
  	gobble("\r");
  	gobble("\r");
  	write(FD, "ATTD", 4);	/* send dial command */
+ 	/* translate pause character */
+ 	for (cp = num; *cp; cp++)
+ 		if (*cp == '=')
+ 			*cp = ',';
  	write(FD, num, strlen(num));
  	state = DIALING;
  	write(FD, "\r", 1);