--- rpl/modules/motif/definitions.sh 2017/07/10 14:47:59 1.3 +++ rpl/modules/motif/definitions.sh 2017/07/10 18:47:55 1.4 @@ -17,14 +17,15 @@ $2/rplawk/rplawk 'BEGIN { c = 0; } \ echo "#define Xm_widgets_classes(value, arg) \\" >> $1/variables.h cpp -E /usr/include/X11/Shell.h | sed 's/;/ /g' | \ - $2/rplawk/rplawk '/^[\t ]+WidgetClass.*WidgetClass[\t ]*$/ \ + $2/rplawk/rplawk ' BEGIN { printf("{ "); } \ + /^[\t ]+WidgetClass.*WidgetClass[\t ]*$/ \ { printf("if (strcmp(\"%s\", value) == 0) \\\ { arg = %s; } else \\\n", $2, $2); } ' >> $1/variables.h -cpp -E $3/lib/Xm/XmAll.h | sed 's/;/ /g' | \ +cpp -E $3/lib/Xm/XmAll.h -I $3/lib | sed 's/;/ /g' | \ $2/rplawk/rplawk '/^extern WidgetClass xm/ \ { printf("if (strcmp(\"%s\", value) == 0) \\\ { arg = %s; } else \\\n", $3, $3); } \ - END { printf("{ executionError(\"Class not found\"); } \\\ + END { printf("{ executionError(\"Class not found\"); } } \\\ while(0)\n"); }' >> $1/variables.h exit 0