Improvements to gen_robot_print.py.

  - sprint_vars:  Moved hex arg to be the first integer arg rather than the
    3rd.
  - sprint_pgm_header:  Make adjustment for change to sprint_vars.

Change-Id: I1eb5138975b965f4a870fbe27569313a187c84c1
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_print.py b/lib/gen_robot_print.py
index 7e3d058..a1b21d1 100755
--- a/lib/gen_robot_print.py
+++ b/lib/gen_robot_print.py
@@ -149,11 +149,11 @@
     Description of arguments:
     args:
         If the first argument is an integer, it will be interpreted to be the
-        "indent" value.
-        If the second argument is an integer, it will be interpreted to be the
-        "col1_width" value.
-        If the third argument is an integer, it will be interpreted to be the
         "hex" value.
+        If the second argument is an integer, it will be interpreted to be the
+        "indent" value.
+        If the third argument is an integer, it will be interpreted to be the
+        "col1_width" value.
         All remaining parms are considered variable names which are to be
         sprinted.
     """
@@ -164,7 +164,15 @@
     # Create list from args (which is a tuple) so that it can be modified.
     args_list = list(args)
 
-    # See if parm 1 is to be interpreted as "indent".
+    # See if parm 1 is to be interpreted as "hex".
+    try:
+        if type(int(args_list[0])) is int:
+            hex = int(args_list[0])
+            args_list.pop(0)
+    except ValueError:
+        hex = 0
+
+    # See if parm 2 is to be interpreted as "indent".
     try:
         if type(int(args_list[0])) is int:
             indent = int(args_list[0])
@@ -172,7 +180,7 @@
     except ValueError:
         indent = 0
 
-    # See if parm 2 is to be interpreted as "col1_width".
+    # See if parm 3 is to be interpreted as "col1_width".
     try:
         if type(int(args_list[0])) is int:
             loc_col1_width = int(args_list[0])
@@ -180,14 +188,6 @@
     except ValueError:
         loc_col1_width = gp.col1_width
 
-    # See if parm 2 is to be interpreted as "hex".
-    try:
-        if type(int(args_list[0])) is int:
-            hex = int(args_list[0])
-            args_list.pop(0)
-    except ValueError:
-        hex = 0
-
     buffer = ""
     for var_name in args_list:
         var_value = BuiltIn().get_variable_value("${" + var_name + "}")
@@ -225,7 +225,7 @@
     # Get value of global parm_list.
     parm_list = BuiltIn().get_variable_value("${parm_list}")
 
-    buffer += sprint_vars(str(indent), str(loc_col1_width), *parm_list)
+    buffer += sprint_vars(0, str(indent), str(loc_col1_width), *parm_list)
     buffer += "\n"
 
     # Setting global program_pid.