DefMod whitespace
Tom Hughes
tom at compton.nu
Sat Apr 15 13:05:59 BST 2000
A number of blank lines seem to have gone missing from my various
DefMod patchs. The attached patch puts them back.
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
...Make input easy to proofread.
-------------- next part --------------
Index: Tools/DefMod/Manual.htm,faf
===================================================================
RCS file: /home/cvs/riscos/oslib/Tools/DefMod/Manual.htm,faf,v
retrieving revision 1.1.1.4
retrieving revision 1.2
diff -c -r1.1.1.4 -r1.2
*** Tools/DefMod/Manual.htm,faf 2000/04/14 22:59:25 1.1.1.4
--- Tools/DefMod/Manual.htm,faf 2000/03/04 12:42:49 1.2
***************
*** 762,767 ****
--- 762,768 ----
type_defn: ID DESCRIPTION_OPTION | ID EQUALS type DESCRIPTION_OPTION;
base_type: COLON ID
+
type: INT | SHORT | BYTE | CHAR | BITS | BYTES | BOOL | REF type |
STRING | ASM | DATA | STRUCT base_type_OPTION OPEN typed_var_LIST
ellipsis_OPTION CLOSE | UNION OPEN toided_var_LIST CLOSE | SUB const
Index: Tools/DefMod/c/cheader
===================================================================
RCS file: /home/cvs/riscos/oslib/Tools/DefMod/c/cheader,v
retrieving revision 1.1.1.5
retrieving revision 1.4
diff -c -r1.1.1.5 -r1.4
*** Tools/DefMod/c/cheader 2000/04/14 23:15:46 1.1.1.5
--- Tools/DefMod/c/cheader 2000/04/12 22:37:47 1.4
***************
*** 208,218 ****
--- 208,221 ----
if (t->tag == def_TYPE_STRUCT && t->data AS list.base)
{
char base [def_ID_LIMIT + 1];
+
def_as_macro (base, t->data AS list.base->data AS id);
+
if ((rc = fprintf (file, "%s_MEMBERS%s\n%*s ",
base, var? " \\": "", 3*(nest + 1), "")) < 0)
goto finish;
}
+
for (i = 0; i < t->data AS list.count; i++)
{
if (i == t->data AS list.count - 1 &&
***************
*** 739,756 ****
--- 742,764 ----
{
char macro_name [def_ID_LIMIT + 1];
int i;
+
def_as_macro (macro_name, type);
if ((rc = fprintf (file, "#define %s_MEMBERS",
macro_name)) < 0)
goto finish;
+
if (t->data AS list.base)
{
char base [def_ID_LIMIT + 1];
+
def_as_macro (base, t->data AS list.base->data AS id);
+
if ((rc = fprintf (file, " \\\n %s_MEMBERS", base)) < 0)
goto finish;
}
+
for (i = 0; i < t->data AS list.count - 1; i++)
{
if ((rc = fprintf (file, " \\\n ")) < 0)
***************
*** 761,766 ****
--- 769,775 ----
if ((rc = fprintf (file, ";")) < 0)
goto finish;
}
+
if ((rc = fprintf (file,
"\n\nstruct %s\n { %s_MEMBERS\n ",
c_name, macro_name)) < 0)
***************
*** 774,779 ****
--- 783,789 ----
else
if ((rc = Print_Decl (file, t, c_name, NULL, FALSE, 0)) < 0)
goto finish;
+
if ((rc = fprintf (file, ";\n\n")) < 0)
goto finish;
More information about the oslib-team
mailing list