CONVERT_TO_XVIEW(1)

NAME
convert_to_xview - convert a SunView1 source program to XView source

SYNOPSIS
convert_to_xview [ -m ] filename...

AVAILABILITY
This command is available with the XView software distribution.

DESCRIPTION
convert_to_xview is a shell script which uses sed(1) scripts to convert SunView1.x programs to the XView Application Programming Interface (API). convert_to_xview parses filename and creates a new file with the XView API in the current directory called filename.converted_to_xview. The default conversion that is done is called FULL conversion. FULL conversion of SunView source converts everything to XView naming conventions regardless of API compatibility support (e.g., changes WIN_FONT to XV_FONT even though WIN_FONT would still work).

The other type of conversion is called MINIMAL conversion. MINIMAL conversion retains SunView compatibility wherever possible and inserts a unique flag and comments at every instance where manual conversion is necessary in C language source comment form. The flag and comments will look something like this:

#ifdef XVIEW_COMMENT
XView CONVERSION - Make sure to use xv_init to process the attrs
first. Sect 3.2
#endif

The original SunView1.x file is not modified. After the file is converted, you should then search for

XView CONVERSION

in the new converted program (filename.converted_to_xview). Use the conversion documentation, XView 1.0 Reference Manual: Converting SunView Applications, to determine the proper conversion for these flagged items. In some possible cases, the comments may make references to sections in the manual which should be consulted to correctly convert something.

OPTIONS

[-m]
    Perform minimal conversion only.

ENVIRONMENT
The script recognizes the environment variable $OPENWINHOME as the root directory for the installation point for convert_to_xview. By default it should be installed into the root directory '/'. Additionally, the sed(1) scripts that are used by convert_to_xview must be located in the $OPENWINHOME/conversion directory.

EXAMPLES
Convert foo.c from SunView1 to XView:

% convert_to_xview foo.c
----Converting File: foo.c
--Done
%

Now go in and edit (with your favorite text editor such as vi,textedit, etc.) the result of the conversion (my_program.c.converted_to_xview) and see if there is anythingthat didn't get converted:

% textedit foo.c.converted

Do only minimal conversion of my_program.c & your_program.c to XView:

% convert_to_xview -m foo.c blah.c
----Converting File: foo.c
----Converting File: blah.c
--Done
%
The above would create two files new files and each will only had minimal conversion performed (just flags inserted).

FILES
$OPENWINHOME/bin/xview/convert_to_xview
$OPENWINHOME/bin/xview/convert_to_xview.README (this file)

Where $OPENWINHOME is the installation/mount point for XView.

SEE ALSO
sunview(1), sed(1), textedit(1), vi(1), sh(1)