;ELC   
;;; compiled by jwz@thalidomide on Thu Feb  3 20:07:48 1994
;;; from file /th/jwz/emacs19/lisp/tooltalk/tooltalk-util.el
;;; emacs version 19.10 Lucid (beta1).
;;; bytecomp version 2.22; 22-dec-93.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "This file was compiled for Emacs 19."))

(fset 'initialize-tooltalk-message-arg #[(msg n mode value vtype) "T\n\"ZV\n#Sn)		\n$	;	\n$\n!	!$" [n get-tooltalk-message-attribute msg args_count n-args-needed 0 add-tooltalk-message-arg mode vtype value set-tooltalk-message-attribute arg_ival arg_val error "The value specified for msg %s argument %d, %s, must be a string or an integer" prin1-to-string] 7 "\
Initialize the nth tooltalk message argument, creating a new argument
if neccessary.  No attempt to distinguish between strings that contain
binary data and ordinary strings is made, all non integer argument
values are converted to a string (if not a string already) and
loaded with tt_message_arg_val_set.  Applications that need to 
put binary data into a ToolTalk message argument should initialize
the argument with:

   (set-tooltalk-message-attribute bin-string msg 'arg_bval arg-n)
"])
(byte-code "	\n" [TT_IN TT_OUT TT_INOUT tooltalk-arg-mode-ids] 6)
(fset 'initialize-tooltalk-message/pattern-args #[(initfn msg args) "\n\n@:@@AA@	AAAA@;AA@	ʪ		%-\nA	T)" [0 n args arg tooltalk-arg-mode-ids long-form TT_IN mode "" value "int" "string" type initfn msg] 7 "\
Apply initfn to each the position mode value and type of
each argument in the list.  The value of initfn should be either
'initialize-tooltalk-message-arg or 'initialize-tooltalk-pattern-arg.
See make-tooltalk-message for a description of how arguments are specified.
We distinguish the short form for arguments, e.g. \"just-a-value\", 
from the long form by checking to see if the argument is a list whose
car is one of the ToolTalk mode values like TT_INOUT."])
(fset 'initialize-tooltalk-message-attributes #[(msg attributes) "A@A@=\n##*AAX*" [attributes initialize-tooltalk-message-arg initfn args value indicator initialize-tooltalk-message/pattern-args msg set-tooltalk-message-attribute nil] 5 "\
Initialize the tooltalk message attributes.  The value of 
attributes must be a property list in the same form as for 
make-tooltalk-message.  This function can be used to reset
an existing message or to initailize a new one.  See 
initialize-tooltalk-message-args for a description of how
arguments are initialized.
"])
(fset 'make-tooltalk-message #[(attributes &optional no-callback) "	!\n\"\n)" [create-tooltalk-message no-callback msg initialize-tooltalk-message-attributes attributes] 3 "\
Create a tooltalk message and initialize its attributes.
The value of attributes must be a list of alternating keyword/values, 
where keywords are symbols that name valid message attributes.  
For example:

  (make-tooltalk-message 
    '(class TT_NOTICE
      scope TT_SESSION
      address TT_PROCEDURE
      op \"do-something\"
      args (\"arg1\" 12345 (TT_INOUT \"arg3\" \"string\"))))

Values must always be strings, integers, or symbols that
represent Tooltalk constants.  Attribute names are the same as 
those supported by set-tooltalk-message-attribute, plus 'args.

The value of args should be a list of message arguments where
each message argument has the following form:

   (mode [value [type]]) or just value

Where mode is one of TT_IN, TT_OUT, TT_INOUT and type is a string.  
If type isn't specified then \"int\" is used if the value is a 
number otherwise \"string\" is used.  If only a value is specified 
then mode defaults to TT_IN.  If mode is TT_OUT then value and 
type don't need to be specified.  You can find out more about the 
semantics and uses of ToolTalk message arguments in chapter 4 of the 
Tooltalk Programmers Guide.

The no-callback arg is a hack to prevent the registration of the
C-level callback.  This hack is needed by the current SPARCworks
tool startup mechanism.  Yuchho.
"])
(fset 'describe-tooltalk-message #[(msg &optional stream) "!		@\"\"	@\"\"!	Aa)\"W\"\"\"##Қ##E!\")!T/*" [(address class disposition file gid handler handler_ptype object op opnum otype scope sender sender_ptype session state status status_string uid callback) attrs terpri stream princ "  " prin1 get-tooltalk-message-attribute msg args_count 0 i n "Argument " arg_type type prin1-to-string arg_mode "int" arg_ival arg_val] 8 "\
Print the messages attributes and arguments to stream.  This is often
useful for debugging."])
(fset 'initialize-tooltalk-pattern-arg #[(pat n mode value vtype) ";!\n$)" [value prin1-to-string converted-value add-tooltalk-pattern-arg pat mode vtype] 5 "\
Add one tooltalk pattern argument.  No support for specifying
pattern arguments whose value is a vector of binary data is provided.
"])
(fset 'initialize-tooltalk-pattern-attributes #[(pat attributes) "A@A@=\n#=\"\":@#Ao)#*AA**" [attributes initialize-tooltalk-pattern-arg initfn args value indicator initialize-tooltalk-message/pattern-args pat plist tooltalk-pattern-plist-set append nil values add-tooltalk-pattern-attribute] 5 "\
Initialize the tooltalk patterns attributes.  The value of
attributes must be a property list in the same form as for
make-tooltalk-pattern.  The value of each attribute (except category)
can either be a single value or a list of values.  If a list of
values is provided then the pattern will match messages with
a corresponding attribute that matches any member of the list.

This function can be used to add attribute values to an existing
pattern or to initailize a new one.  See 
initialize-tooltalk-message/pattern-args for a description of how arguments
are initialized.
"])
(fset 'make-tooltalk-pattern #[(attributes) " 	\"	)" [create-tooltalk-pattern pat initialize-tooltalk-pattern-attributes attributes] 3 "\
Create a tooltalk pattern and initialize its attributes.
The value of attributes must be a list of alternating keyword/values, 
where keywords are symbols that name valid pattern attributes
or lists of valid attributes.  For example:

  (make-tooltalk-pattern 
    '(category TT_OBSERVE
      scope TT_SESSION
      op (\"operation1\" \"operation2\")
      args (\"arg1\" 12345 (TT_INOUT \"arg3\" \"string\"))))


Values must always be strings, integers, or symbols that
represent Tooltalk constants or lists of same.  When a list 
of values is provided all of the list elements are added to 
the attribute.  In the example above, messages whose op
attribute is \"operation1\" or \"operation2\" would match the pattern.

The value of args should be a list of pattern arguments where 
each pattern argument has the following form:

   (mode [value [type]]) or just value

Where mode is one of TT_IN, TT_OUT, TT_INOUT and type is a string.  
If type isn't specified then \"int\" is used if the value is a 
number otherwise \"string\" is used.  If only a value is specified 
then mode defaults to TT_IN.  If mode is TT_OUT then value and type 
don't need to be specified.  You can find out more about the semantics 
and uses of ToolTalk pattern arguments in chapter 3 of the Tooltalk
Programmers Guide.
"])
