Print this page
XXX Remove nawk(1)


  59 EOF
  60 
  61 cat <<EOF >> $HEADER_FILE
  62 
  63 /*
  64  * User level audit event numbers.
  65  *
  66  *     0                Reserved as an invalid event number.
  67  *     1 - 2047         Reserved for the Solaris Kernel events.
  68  *  2048 - 32767        Reserved for the Solaris TCB programs.
  69  * 32768 - 65535        Available for third party TCB applications.
  70  *
  71  */
  72 
  73 #ifdef  __cplusplus
  74 extern "C" {
  75 #endif
  76 
  77 EOF
  78 
  79 nawk -F: '{if ((NF == 4) && substr($1,0,1) != "#")
  80                 if ($1 >= 2048) {
  81                         tlen = length($2);
  82 
  83                         printf("#define\t%s\t", $2)
  84                         if (tlen < 8)
  85                                 printf("\t");
  86                         if (tlen < 16)
  87                                 printf("\t");
  88                         if (tlen < 24)
  89                                 printf("\t");
  90                         printf("%s\n", $1);
  91                 }
  92           }' \
  93 < $DATABASE >> $HEADER_FILE
  94 
  95 cat <<EOF >> $HEADER_FILE
  96 
  97 #ifdef  __cplusplus
  98 }
  99 #endif


  59 EOF
  60 
  61 cat <<EOF >> $HEADER_FILE
  62 
  63 /*
  64  * User level audit event numbers.
  65  *
  66  *     0                Reserved as an invalid event number.
  67  *     1 - 2047         Reserved for the Solaris Kernel events.
  68  *  2048 - 32767        Reserved for the Solaris TCB programs.
  69  * 32768 - 65535        Available for third party TCB applications.
  70  *
  71  */
  72 
  73 #ifdef  __cplusplus
  74 extern "C" {
  75 #endif
  76 
  77 EOF
  78 
  79 /usr/xpg4/bin/awk -F: '{if ((NF == 4) && substr($1,0,1) != "#")
  80                 if ($1 >= 2048) {
  81                         tlen = length($2);
  82 
  83                         printf("#define\t%s\t", $2)
  84                         if (tlen < 8)
  85                                 printf("\t");
  86                         if (tlen < 16)
  87                                 printf("\t");
  88                         if (tlen < 24)
  89                                 printf("\t");
  90                         printf("%s\n", $1);
  91                 }
  92           }' \
  93 < $DATABASE >> $HEADER_FILE
  94 
  95 cat <<EOF >> $HEADER_FILE
  96 
  97 #ifdef  __cplusplus
  98 }
  99 #endif