	 k `0`0by name         by name         BUILD           d   	kH      A                                                ./               A          A          
k"N p m          M  [0`0`0
        ^w  M      ./lpp_name               m          m          4 R S xlC.C++ {
xlC.C++.iclui.lib 3.1.2.1 01 N U en_US C Set ++ Graphical User Interface Class Library
[
*coreq xlC.C++.collect.lib 3.1.2.1
*prereq xlC.C++.iclui.lib 3.1.2.0
%
/usr/lpp/xlC/bin 32
/usr/lpp/SAVESPACE 40
/usr/lib/objrepos 8
/usr/lpp/xlC/include 8
INSTWORK 64 16
%
%
%
IX51849  1 Update conversion utility ipmrc2X
%
]
}
   	k\      A                                                ./usr            A          A          
k{      A                                                ./usr/lpp                A          A          kX      A                                                ./usr/lpp/xlC.C++/xlC.C++.iclui.lib/3.1.2.1              A          A          kB p m          P
  ]0W0W0
         p  P
      ./usr/lpp/xlC.C++/xlC.C++.iclui.lib/3.1.2.1/liblpp.a             m          m          <aiaff>
2294        0           68          2004        0           268         454         0           798912422   1592        400         644         27  xlC.C++.iclui.lib.copyright `
 Licensed Materials - Property of IBM

 576542100
   (C) Copyright International Business Machines Corp. 1993, 1995.

 All rights reserved.
 US Government Users Restricted Rights - Use, duplication or disclosure
 restricted by GSA ADP Schedule Contract with IBM Corp.
19          574         68          798912409   1592        400         644         9   productid `
xlC.C++ 5765-42100
 374         1062        454         799021683   1592        400         644         23  xlC.C++.iclui.lib.inv_u `
S 2 2 777	/usr/bin/bmptoppm /usr/lpp/xlC/bin/bmptoppm
S 2 2 777	/usr/bin/ibmp2X /usr/lpp/xlC/bin/ibmp2X
S 2 2 777	/usr/bin/ipmrc2X /usr/lpp/xlC/bin/ipmrc2X
S 2 2 777	/usr/bin/ppmtoxpm /usr/lpp/xlC/bin/ppmtoxpm
S 2 2 777	/usr/bin/ippmtoxpm /usr/lpp/xlC/bin/ippmtoxpm
S 2 2 777	/usr/bin/ibmptoppm /usr/lpp/xlC/bin/ibmptoppm
S 2 2 777	/usr/bin/ixpmfix /usr/lpp/xlC/bin/ixpmfix
456         1636        574         806858583   1592        400         644         27  xlC.C++.iclui.lib.inventory `
/usr/lpp/xlC/bin/ipmrc2X:
          owner = bin
          group = bin
          mode = 555
          type = FILE
          class = apply,inventory,xlC.C++.iclui.lib
          size = 13759
          checksum = "18804    14 "

/usr/lpp/xlC/include/iwindefs.h:
          owner = bin
          group = bin
          mode = 444
          type = FILE
          class = apply,inventory,xlC.C++.iclui.lib
          size = 3676
          checksum = "16305     4 "

85          1834        1062        806858583   1592        400         644         22  xlC.C++.iclui.lib.size`
/usr/lpp/xlC/bin 32
/usr/lpp/SAVESPACE 40
/usr/lib/objrepos 8
/usr/lpp/xlC/include 8
 59          2004        1636        806858583   1592        400         644         20  xlC.C++.iclui.lib.al`
./usr/lpp/xlC/bin/ipmrc2X
./usr/lpp/xlC/include/iwindefs.h
 174         2294        1834        806858581   1592        400         644         25  xlC.C++.iclui.lib.fixdata `
fix:
	name = IX51849
	abstract = Update conversion utility ipmrc2X 
	type = f
	filesets = "xlC.C++.iclui.lib:3.1.2.1\n\
"
	symptom = " Update to latest level from icl2\n\
"

256         0           2004        0           0           0           0           0   `
7           68          454         574         1062        1636        1834        2004        xlC.C++.iclui.lib.copyright productid xlC.C++.iclui.lib.inv_u xlC.C++.iclui.lib.inventory xlC.C++.iclui.lib.size xlC.C++.iclui.lib.al xlC.C++.iclui.lib.fixdata kpW c m        5  W000
         0S  5      ./usr/lpp/xlC/bin/ipmrc2X                m          m          #!/bin/ksh
###############################################################################
#                                                                              *
# COPYRIGHT:                                                                   *
#   Licensed Materials - Property of IBM                                       *
#   (C) Copyright IBM Corporation 1994, 1995                                   *
#   All Rights Reserved                                                        *
#   US Government Users Restricted Rights - Use, duplication, or disclosure    *
#   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
#                                                                              *
###############################################################################
# Convert a PM .rc file to a format usable by X Resource Manager
#
# Usage:
#  ipmrc2X [-I<include path> ...] [-A<Application Class>] [-D<userDefine> ...]
#                <input> [<output>]
#
#             <include path>      directory(s) that the preprocesor will
#                                 look for include files in. If not specified
#                                 all include files referenced in the input
#                                 file should be in the current directory.
#             <Application Class> The application class that will be assigned
#                                 to the created X Resources. If not supplied
#                                 a value of "*" will be used.
#             <userDefine>        Any macro that you want defined for the
#                                 preprocessing of the input file.
#             input               A file containing PM style resources.
#                                 (ie. a .rc file)
#             output              Ouput file name. If not supplied output is
#                                 written to current directory with the .rc
#                                 extension deleted and the first one or two
#                                 characters of the filename upper cased.
#
#                                 For example:
#                                   Input           Output
#                                  myapp.rc        Myapp
#                                  xedit.rc        XEdit
# Example:
#         ipmrc2X -I/usr/include/myapp -AMyapp myapp.rc /u/dev1/defaults/Myapp
#
# Limitations:
#         Currently handles only the following types of resources:
#           MENU, SUBMENU, MENUITEM
#           STRINGTABLE, HELPTABLE
#           BITMAP, ICON
#           ACCELTABEL
#
#         STRINGTABLE, HELPTABLE, MENU, SUBMENU, MENUITEM and ACCELTABLE 
#         definitions cannot span multiple lines. For example:
#
#            STRINGTABLE
#            BEGIN
#              STR_HELLO,
#                "Hello World"
#            END
#
#         ipmrc2X can't handle the above even though the RC compiler on PM
#         can.
#
#         Furthermore, the error checking in ipmrc2X will not flag many errors
#         that RC can. For example incomplete lines and missing commas will
#         produce erroneous output from ipmrc2X, but no error message.
#         The assumption is that input files to imprc2X have been checked for
#         errors using RC under OS/2.
#
#         Like its RC counterpart under OS/2, ipmrc2X only processes a single
#         input file. For this reason you should not use wildcard characters
#         in the input file name.
#
###############################################################################

#set default Application Class
appClass="*"
includePath=""
userDefines=""

#process options
while getopts :I:D:A: c
do case $c in
   I) includePath="$includePath -I$OPTARG";;
   D) userDefines="$userDefines -D$OPTARG";;
   A) appClass="$OPTARG.";;
   :) print -u2 "$0: $OPTARG requires a parameter"
      exit 1;;
  \?) print -u2 "$0: unknown option $OPTARG"
      exit 2;;
   esac
done
shift OPTIND-1


#check filename parms are present
if  [ $# -eq  0 ]
then
  print -u2 "USAGE: $0 [-I<include path>] [-A<Application Class>] [-D<userDefine>] input [output]"
  exit 3
fi

#verify input file exists
if  [ ! -r "$1" ]
then
  print -u2 "Can't open $1"
  exit 4
fi

# tmpFile is input file with all rcinclude changed to include
#
tmpFile=$1"ipmrc2Xtmp"

# run a first pass to change rcincludes to includes
# Check to see if nawk exists in /usr/bin 
# If exists use it, otherwise use awk 
if [ -x /usr/bin/nawk ]
then 
  awkv="nawk"   # Call nawk instead of awk
else 
  awkv="awk"    # Call awk
fi

$awkv '    #  awk script follows 
toupper($1) ~ /RCINCLUDE/ {
  # have to put quotes around file name
  print "#include" " \"" $2 "\""
  next
}

{
  print $0
}

' $1 > $tmpFile

# workFile is output by the xlC preprocessor
workFile=${1%.*}.i
workFile=${workFile##*/}		# Remove path if any            @4191

# generate output file name if not supplied
if [ $# -eq 1 ]
then
  outFileOrig=${1%.*}
  outFileOrig=${outFileOrig##*/}	# Remove path if any            @4191

  outFileEnd=${outFileOrig#??}
  typeset -L1 outFile0
  outFile0=$outFileOrig
  typeset -L2 outFile1
  outFile1=$outFileOrig
  outFile1=${outFile1#?}
  typeset -L1 outFile1

  typeset -u outFile0
  if [[ $outFile0 = "X" ]]
  then
    typeset -u outFile1
  fi

  outFile=$outFile0$outFile1$outFileEnd
else
  outFile=$2
fi

# tell user what we're going to do
echo
echo "Converting PM style resource to an X format"
echo "Input file:        $1"
echo "Output file:       $outFile"
echo "Application Class: $appClass"
echo "Include Path:      $includePath"
echo
echo "Invoking Preprocessor"

# set up defines for certain help menu items
definedItems="-DSC_HELPEXTENDED=0x8012 -DSC_HELPKEYS=0x8013 -DSC_HELPINDEX=0x8014 "
# definedItems=""
# preprocess the resource file
xlC $includePath $definedItems $userDefines -P -+ $tmpFile

echo
echo "Now converting preprocessed file"
# Check to see if nawk exists in /usr/bin  
# If exists use it, otherwise use awk      
if [ -x /usr/bin/nawk ]
then 
   awkv="nawk"   # awk script follows 
else   
   awkv="awk"    # awk script follows 
fi

$awkv '    # awk script follows 
# Convert hex to decimal representation.
# Needed if Resource Ids were defined with hex values.
# Also handle addition.
function x2n(s,    i,t,n,total,cnt,cnti,strArray) {
         t = toupper(s)
         # strip all extraneous characters
         cnt = gsub(/ */, "", t)          # Strip all blanks            @2022
         cnt = gsub(/\t/, "", t)          # Strip all tabs              @2022
         cnt = gsub(/\(/, "", t)          # Strip all left paren        @4188
         cnt = gsub(/\)/, "", t)          # Strip all right paren       @4188
         # find out how many values to be summed
         cnt = split(t, strArray, "+")

         # strArray contains each of the values to be summed
         # add them after first converting hex if needed
         total = 0
         for (cnti=1;cnti<=cnt;cnti++) {
           # if not a hex value, leave as is
           if ( strArray[cnti] !~ /^0X[0123456789ABCDEF]+$/ )
             n = 0 + (strArray[cnti])
           else {
             n=0
             for (i=3;i<=length(strArray[cnti]);i++) {
               n *= 16
               n += index("0123456789ABCDEF",substr(strArray[cnti],i,1))-1
             }
           }
           total += n
         }

         return sprintf("%.10g", total )
}


# Inintialization, called once at start of file
BEGIN {
  level = 0
}


toupper($1) ~ /^BEGIN/ || $1 ~ /^{/ {
  level++
  if (restype == "M" || restype == "A" || restype == "H") {
    sub(/[Bb][Ee][Gg][Ii][Nn]/,"BEGIN")
    sub(/{/,"BEGIN")
    print $0 " \\"
  }
  next
}

toupper($1) ~ /^END/ || $1 ~ /^}/ {
  level--
  if (restype == "M")
    if (level == 0) {
      print "MENUEND"
      restype = ""
    }
    else {
      sub(/[Ee][Nn][Dd]/,"END")
      sub(/}/,"END")
      print  $0 " \\"
    }
  if (restype == "A" || restype == "H") {
    sub(/[Ee][Nn][Dd]/,"END")
    sub(/}/,"END")
    print  $0
    restype = ""
  }
  if (restype == "S")
    restype = ""
  next
}

toupper($1) ~ /^ICON/ || toupper($1) ~ /^BITMAP/ {
  # PM allows double quotes around file name, get rid of them
  gsub(/"/,"") 
  gsub( / *\+ */, "+" )     # Strip blanks around "+"   		@2280
  gsub( /\( */,   "(" )     # Strip blanks after  "("   		@4188
  gsub( / *\)/,   ")" )     # Strip blanks before ")"   		@4188
  numItems = split($0, strArray, " ")
  # There may be loadoptions or memory options after strArray[2]
  # So access the filename using numItems as its index
  # Make sure only ending .ico and .bmp are changed to .xpm             @2236
  sub(/.[Bb][Mm][Pp]$/, ".xpm", strArray[numItems])		      # @2236
  sub(/.[Ii][Cc][Oo]$/, ".xpm", strArray[numItems])		      # @2236
  print appClass "ICLPIXMAP_" x2n(strArray[2]) ": " strArray[numItems]
  next
}

toupper($1) ~ /^ACCELTABLE/ {
  gsub( / *\+ */, "+" )     # Strip blanks around "+"   		@2280
  gsub( /\( */,   "(" )     # Strip blanks after  "("   		@4188
  gsub( / *\)/,   ")" )     # Strip blanks before ")"   		@4188
  numItems = split($0, strArray, " ")
  print "!"
  print "! ICLUI Accelerator Resource"
  print "!"
  print appClass "ICLACCEL_" x2n(strArray[2]) ":  \\"
  restype = "A"
  next
}

toupper($1) ~ /^HELPTABLE/ || toupper($1) ~ /^HELPSUBTABLE/ {
  gsub( / *\+ */, "+" )     # Strip blanks around "+"   		@2280
  gsub( /\( */,   "(" )     # Strip blanks after  "("   		@4188
  gsub( / *\)/,   ")" )     # Strip blanks before ")"   		@4188
  numItems = split($0, strArray, " ")
  print "!"
  print "! ICLUI Helptable Resource"
  print "!"
  print appClass "ICL" strArray[1] "_" x2n(strArray[2]) ":  \\"
  restype = "H"
  next
}

toupper($1) ~ /^MENU/ && level == 0 {
  print "!"
  print "! ICLUI Menu Resource"
  print "!"
  gsub( / *\+ */, "+" )     # Strip blanks around "+"   		@2280
  gsub( /\( */,   "(" )     # Strip blanks after  "("   		@4188
  gsub( / *\)/,   ")" )     # Strip blanks before ")"   		@4188
  print appClass "ICLMENU_" x2n($2) ": \\"
  restype = "M"
  next
}

toupper($1) ~ /^STRINGTABLE/ {
  restype = "S"
  print "!"
  print "! ICLUI String Resources"
  print "!"
  next
}

# process an ACCELTABLE
level == 1 && restype == "A" {
# firstChar = match($0, "[^ ] ")
  firstChar = match($0, " [^ ]")
  # Suspect the following function call should be: substr( $0, 1, firstChar )
  #   (as such, one less leading blank will be printed)
  leadingSpaces = substr($0, 1, firstChar - 1)
  # There is no need to strip away blanks around "+" before doing the split()
  # below as the separator for the split is "," instead of blanks.
  numItems = split($0, strArray, ",")
  if (numItems >= 2)
    print       leadingSpaces "ACCELITEM " strArray[1] " " x2n(strArray[2]) " " strArray[3] " "  strArray[4] " " strArray[5] " \\"
}

# process a HELPTABLE
level == 1 && restype == "H" {
  if (toupper($1) ~ /HELPITEM/ || toupper($1) ~ /HELPSUBITEM/) {
    firstChar = match($0, " [^ ]")
    # Suspect the following function call should be: substr( $0, 1, firstChar )
    #   (as such, one less leading blank will be printed)
    leadingSpaces = substr($0, 1, firstChar - 1)
    # strip leading blanks
    sub(/^ */,"")
    # make sure keywords delimited by at least 1 blank
    sub(/[Hh][Ee][Ll][Pp][Ii][Tt][Ee][Mm]/, "HELPITEM ")
    sub(/[Hh][Ee][Ll][Pp][Ss][Uu][Bb][Ii][Tt][Ee][Mm]/, "HELPSUBITEM ")
    # find first field delimited by " "
    endPos = index($0, " ")
    firstItem = substr($0, 1, endPos)
    # There is no need to strip away blanks around "+" before doing the split()
    # below as the separator for the split is "," instead of blanks.
    numItems = split(substr($0, endPos + 1), strArray, ",")
    print leadingSpaces firstItem " " x2n(strArray[1]) " " x2n(strArray[2]) "   " x2n(strArray[3]) " \\"
  }
  # subitemsize is ignored
}

# process a STRINGTABLE
level == 1 && restype == "S" {
  # strip leading blanks
  sub(/^ */,"")
  # Extract text inside double quotes into stringText
  match($0, /\".*"/)
  stringText = substr($0, RSTART + 1, RLENGTH - 2)
  gsub(/\\015/,"\\n", stringText)
  gsub(/\\x0d/,"\\n", stringText)
  gsub(/\\x0D/,"\\n", stringText)
  gsub(/\\X0d/,"\\n", stringText)
  gsub(/\\X0D/,"\\n", stringText)
  gsub( / *\+ */, "+" )     # Strip blanks around "+"   		@2280
  gsub( /\( */,   "(" )     # Strip blanks after  "("   		@4188
  gsub( / *\)/,   ")" )     # Strip blanks before ")"   		@4188
  # the comma is optional in stringtables
  numItems = split($0, strArray, "[\t ]*[, ][\t ]*")
  if (numItems >= 2) {
    print       appClass "ICLSTRING_" x2n(strArray[1]) ": " stringText
    }
}

# process a Menu
level > 0 && restype == "M" {
  if (toupper($1) ~ /MENUITEM/ || toupper($1) ~ /SUBMENU/) {
    # make sure keywords delimited by at least 1 blank
    sub(/[Mm][Ee][Nn][Uu][Ii][Tt][Ee][Mm]/, "MENUITEM ")
    sub(/[Ss][Uu][Bb][Mm][Ee][Nn][Uu]/, "SUBMENU ")
    # ensure string delimted by ",
    sub(/\" *\,/, "\"\,")
    # change \t to \\t
    # ResourceConverter will swallow a \ not at end of line
    # need to preserve \t so that IMenu can handle accelerator resources
    sub(/\\t/, "\\\\t")
    # find first field delimited by ",
    endPos = index($0, "\",")
    if (endPos == 0)
      # must be a separator
      print $0 " \\"
    else {
      firstItem = substr($0, 1, endPos)
      # There is no need to strip away blanks around "+" before doing the split
      # below as the separator for the split is "," instead of blanks.
      numItems = split(substr($0, endPos + 2), strArray, ",")
      print firstItem " " x2n(strArray[1]) " "  strArray[2] "   "  strArray[3] " \\"
    }
  }
  else
    print $0 " \\"
}

#  end of nawk script

' appClass=$appClass  $workFile > $outFile

rm $workFile
rm $tmpFile
(k,r u $        \  W000
           \      ./usr/lpp/xlC/include/iwindefs.h                 $          $          /**********************************************************************/
/*                                                                    */
/*               I B M   C L A S S   L I B R A R I E S                */
/*                                                                    */
/*                        Filename: IMACROS.H                         */
/*                                                                    */
/*             ( OS/2 2.X / WINDOWS NT Macro component )              */
/*                                                                    */
/*                (C) Copyright IBM Corporation 1994                  */
/*                       All Rights Reserved                          */
/*            Licensed Material - Program Property of IBM             */
/*                                                                    */
/**********************************************************************/
/* CHID R P# / F#  DATE  INIT DESCRIPTION                             */
/* ---- - ------- ------ ---- --------------------------------------- */
/*      2 F000177 011494 DAB  Initial macro file creation, containing */
/*                            Win,Dev and Gpi mappings plus sys values*/
/**********************************************************************/

/**********************************************************************/
/* Verify file not already included                                   */
/**********************************************************************/
#ifndef IC_WINDEFSFILE_INCLUDED
#define IC_WINDEFSFILE_INCLUDED

/************************** Platform Macros ***************************/
/* If none of the platform indicator macros are defined yet, set up   */
/* defaults for them based on the compiler supplied platform macros.  */
/**********************************************************************/
#if ( !defined(IC_PM) && !defined(IC_MOTIF) && !defined(IC_WIN) )
  #ifdef __OS2__
     #define IC_PM
  #endif
  #ifdef _AIX
     #define IC_MOTIF
  #endif
  #ifdef __WINDOWS__       // ?? what is predefined value from compiler
     #define IC_WIN
  #endif
#endif

#ifdef __WINDOWS__       //Temporary until compiler generates this predefine
     #undef IC_PM        //Had to do this since compiler auto defines __OS2__
     #define IC_WIN      //which causes IC_PM to be defined
#endif

/************************ Common File Macros **************************/
/* Now define any common file macros based on environment             */
/**********************************************************************/
#if defined(IC_PM)
  #define IC_PMWIN
  #define IC_MOTIFPM
#endif
#if defined(IC_MOTIF)
  #define IC_MOTIFPM
  #define IC_MOTIFWIN
#endif
#if defined(IC_WIN)
  #define IC_PMWIN
  #define IC_MOTIFWIN
#endif

/**********************************************************************/
/* If Windows NT program, then set the macros to call Windows 32 APIs */
/**********************************************************************/

/**********************************************************************/
/* otherwise OS/2 2.x program, so set the macros to call OS/2 APIs    */
/**********************************************************************/

/**********************************************************************/
/* Motif program.  Set the macros to call Xt/Motif APIs               */
/**********************************************************************/
#include <X11/Intrinsic.h>

#define IWINDOWFROMID(hwnd,id)     (XtNameToWidget(hwnd,               \
                                                  (char *)IString(id)))


#endif /* IC_WINDEFSFILE_INCLUDED */

levkdi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                