trawick     01/01/31 10:24:08

  Modified:    helpers  make_export.awk
  Log:
  Fix the export list builder to understand more preprocessor constructs
  (like those in apr_user.h).
  
  Submitted by: Brian Havard
  Reviewed by:  Jeff Trawick
  
  Revision  Changes    Path
  1.5       +10 -6     apr/helpers/make_export.awk
  
  Index: make_export.awk
  ===================================================================
  RCS file: /home/cvs/apr/helpers/make_export.awk,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- make_export.awk   2000/12/22 14:32:37     1.4
  +++ make_export.awk   2001/01/31 18:24:05     1.5
  @@ -11,7 +11,6 @@
        }
        macro_stack[macro_no++] = macro
        macro = substr($0, length($1)+2)
  -     found++
        count++
        line = line macro "\n"
        next
  @@ -23,17 +22,17 @@
                line = line "/" macro "\n"
                macro = macro_stack[--macro_no]
        }
  -     if (found == count + 1) {
  -             found--
  +     if (count == 0) {
  +             if (found != 0) {
  +                     printf("%s", line)
  +             }
                line = ""
  -     } else if (found > count + 1) {
  -             found = 0
        }
        next
   }
   
   /^[ \t]*(AP[RU]?_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[ \t\*]*[)]?[ 
\t]+[*]?([A-Za-z0-9_]+)\(/ {
  -     if (found) {
  +     if (count) {
                found++
        }
        for (i = 0; i < count; i++) {
  @@ -42,6 +41,11 @@
        sub("^[ \t]*(AP[UR]?_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[ \t\*]*[)]?[ 
\t]+[*]?", "");
        sub("[(].*", "");
        line = line $0 "\n"
  +
  +     if (count == 0) {
  +             printf("%s", line)
  +             line = ""
  +     }
        next
   }
   
  
  
  

Reply via email to