h03131
s 00063/00000/00000
d D 1.1 83/03/23 16:18:38 bog 1 0
c date and time created 83/03/23 16:18:38 by bog
e
u
4
U
t
T
I 1
#############################################################################
#									    #
#	This material is confidential and is furnished under		    #
#	a written license agreement.  It may not be used,		    #
#	copied or disclosed to others except in accordance		    #
#	with the terms of that agreement.				    #
#									    #
#	Copyright (C) 1982 Graphic Software Systems, Inc.		    #
#	All rights reserved.						    #
#									    #
#############################################################################
#									    #
#	Function:  							    #
#		Integer Function EmMStr (String)			    #
#			Input	String:	CHARACTER array of Ascii text	    #
#					terminated with a NUL.		    #
#			Output	EmMStr:	Integer number of chars displayed   #
#		    Show the string in MenStr in menu common pointed to by  #
#		    String.  NUL terminates the string; an ETX indicates    #
#		    the next character should be used as a space count.	    #
#									    #
#	Called By:							    #
#									    #
#	Routines Called:						    #
#									    #
#############################################################################
 
INTEGER Function EmMStr(Chars)
CHARACTER Chars(1)
 
CHARACTER Ch
INTEGER I
 
BEGINCOMMON
COMMON(DRIVER)
COMMON(SPECIALKEYS)
ENDCOMMON
 
EmMStr = 0				# No chars shown yet
 
DdCntl(4) = 0				# Nothing in text buffer
 
I = 1					# Point to first character
Ch = Chars(1)				# Preload first character
While (Ch != 0) {			# Show all chars of string
  If (Ch == ETX) {			# <n> spaces
    I = I+1				# Point to SPACE count
    For (Ch = Chars(I); Ch > 0; Ch = Ch-1) {
      If (Going) Call EmMSCh(SPACE)	# Show a space
      EmMStr = EmMStr+1			# Increment chars shown count
      }
    }
   Else {
      If (Going) Call EmMSCh(Ch)	# Show a char
      EmMStr = EmMStr+1			#  & reflect in count
    }
  I = I+1				# Point to next
  Ch = Chars(I)				# Fetch next character
  }
Call EmMSDm			# Dump any accumulated characters
 
Return
End
E 1
