Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
UNWIZ(1)		    General Commands Manual		      UNWIZ(1)

NAME
       inviz - Converts	escape sequences to binary; reverses viz(1)

SYNOPSIS
       inviz [ file ...	 ]

DESCRIPTION
       Inviz copies its	input to its output, translating escape	sequences that
       are found.  It will properly invert the output of viz -t, thus recreat-
       ing the original	file.  For example, typing
	    viz	< infile | inviz > copy_of_infile will create an exact copy of
       infile.

       Inviz  copies  from file	(or from stdin,	if there is no file given) and
       writes to stdout.  These	escape sequences are of	the form
		 \c
       or
		 \nnn
       It also specially treats	lines that begin
		 \#datatype ...
       which are lines containing text to convert to  binary  numbers  (chars,
       shorts, ints, longs, doubles, or	floats).

       Backslash  sequences  \c	 and  \nnn are used to produce the usual C es-
       capes, with the addition	of \@ translating to null.

       The complete set	of `backslash' escape sequences	is:
	    `\\' -> `\'
	    `\@' -> null
	    `\%' -> percent
	    `\b' -> backspace
	    `\f' -> formfeed
	    `\n' -> newline
	    `\r' -> return
	    `\t' -> tab
	    `\nnn' -> ascii character with this	octal value
	    `\Innn...' -> ascii	character with this hex	value
       Embedded	newlines are discarded;	to produce a newline  in  the  output,
       the escape sequence `\n'	must appear in the input.

       Lines that begin
		 \#datatype
       are  to be translated into binary numbers.  Here	the datatype is	one of
       {C,S,I,L,F,D}, and means, respectively, that the	text on	 the  rest  of
       the  line  is to	be translated into chars, shorts, ints,	longs, floats,
       or doubles.  The	rest of	the line is made up of the usual sort of  text
       representations	 of   numbers,	separated  by  whitespace.   When  the
       datavalue is an integer value (whether char, short, int,	or  long)  may
       be expressed in octal (0nnn), hex (0xnnn	or 0Xnnn), or decimal.	If the
       value is	octal or hex, the corresponding	output value will be unsigned.
       If  decimal,  the type is unsigned unless the number begins with	`+' or
       `-', in which case a signed number is output.  In all cases,  sscanf(3)
       is initially used to convert the	text to	a long int or double value, so
       any restrictions	that apply to sscanf(3)	conversions also apply here.

EXAMPLES
       1. To output the	two integers 234 (hex) and 2345	(decimal), followed by
       the float value 6.4, the	input text could be:

	    \#I	0x234 2345
	    \#F	6.4

       2.  To output a form feed followed by the integers 5 and	124, the short
       -16, and	finally	a string "456abc%" on a	new line, use input like:

	    \f
	    \#I	5 124
	    \#S	-16
	    \n456abc%

AUTHOR
       Will Deich

SEE ALSO
       viz(1)

				     local			      UNWIZ(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=inviz&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help