home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / byteunix.lzh / byte.4 / dhry.c next >
C/C++ Source or Header  |  1990-05-11  |  17KB  |  587 lines

  1. /*******************************************************************************
  2.  *  The BYTE UNIX Benchmarks - Release 2
  3.  *          Module: dhry.c   SID: 2.4 4/17/90 16:45:30
  4.  *          
  5.  *******************************************************************************
  6.  * Bug reports, patches, comments, suggestions should be sent to:
  7.  *
  8.  *    Ben Smith or Rick Grehan at BYTE Magazine
  9.  *    bensmith@bixpb.UUCP    rick_g@bixpb.UUCP
  10.  *
  11.  *******************************************************************************
  12.  *  Modification Log:
  13.  * adapted from: "DHRYSTONE" Benchmark Program
  14.  *  Version:    C, Version 2.0
  15.  *  File:       dhry_pack_1.c (part 2 of 3)
  16.  *  Date:       March 3, 1988
  17.  *  Author:     Reinhold P. Weicker
  18.  * added command line parameter handling, modified error check
  19.  * to output only on error - ben 6/89
  20.  *
  21.  ******************************************************************************/
  22. char id[] = "@(#) @(#)dhry.c:2.4 -- 4/17/90 16:45:30";
  23.  
  24. #include "dhry.h"
  25.  
  26. /* Global Variables: */
  27.  
  28. Rec_Pointer     Ptr_Glob,
  29.                 Next_Ptr_Glob;
  30. int             Int_Glob;
  31. Boolean         Bool_Glob;
  32. char            Ch_1_Glob,
  33.                 Ch_2_Glob;
  34. int             Arr_1_Glob [50];
  35. int             Arr_2_Glob [50] [50];
  36.  
  37. extern char     *malloc ();
  38. Enumeration     Func_1 ();
  39.   /* forward declaration necessary since Enumeration may not simply be int */
  40.  
  41. #ifndef REG
  42.         Boolean Reg = false;
  43. #define REG
  44.         /* REG becomes defined as empty */
  45.         /* i.e. no register variables   */
  46. #else
  47.         Boolean Reg = true;
  48. #endif
  49.  
  50. /* variables for time measurement: */
  51.  
  52. #ifdef TIMES
  53. struct tms      time_info;
  54. extern  int     times ();
  55.                 /* see library function "times" */
  56. #endif
  57. #ifdef TIME
  58. extern long     time();
  59.                 /* see library function "time"  */
  60. #endif
  61.  
  62. #define Too_Small_Time 2
  63.                 /* Measurements should last at least 2 seconds */
  64.  
  65. long            Begin_Time,
  66.                 End_Time,
  67.                 User_Time;
  68. float           Microseconds,
  69.                 Dhrystones_Per_Second;
  70.  
  71. /* end of variables for time measurement */
  72.  
  73.  
  74. main (argc, argv, env)
  75. int argc;
  76. char *argv[], *env[];
  77.   /* main program, corresponds to procedures        */
  78.   /* Main and Proc_0 in the Ada version             */
  79.  
  80. {
  81.         One_Fifty       Int_1_Loc;
  82.   REG   One_Fifty       Int_2_Loc;
  83.         One_Fifty       Int_3_Loc;
  84.   REG   char            Ch_Index;
  85.         Enumeration     Enum_Loc;
  86.         Str_30          Str_1_Loc;
  87.         Str_30          Str_2_Loc;
  88.   REG   int             Run_Index;
  89.   REG   int             Number_Of_Runs = 10000;
  90.  
  91.  
  92.   /* Initializations */
  93.  
  94.   Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
  95.   Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
  96.  
  97.   Ptr_Glob->Ptr_Comp                    = Next_Ptr_Glob;
  98.   Ptr_Glob->Discr                       = Ident_1;
  99.   Ptr_Glob->variant.var_1.Enum_Comp     = Ident_3;
  100.   Ptr_Glob->variant.var_1.Int_Comp      = 40;
  101.   strcpy (Ptr_Glob->variant.var_1.Str_Comp, STR_0_PAR_REF);
  102.   strcpy (Str_1_Loc, STR_1_PAR_REF);
  103.  
  104.   Arr_2_Glob [8][7] = 10;
  105.         /* Was missing in published program. Without this               */
  106.         /* initialization, Arr_2_Glob [8][7] would have an              */
  107.         /* undefined value.                                             */
  108.         /* Warning: With 16-Bit processors and Number_Of_Runs > 32000,  */
  109.         /* overflow may occur for this array element.                   */
  110.  
  111.   if(argc > 1) Number_Of_Runs = atoi(argv[1]);
  112.   /***************/
  113.   /* Start timer */
  114.   /***************/
  115.  
  116. #ifdef TIMES
  117.   times (&time_info);
  118.   Begin_Time = (long) time_info.tms_utime;
  119. #endif
  120. #ifdef TIME
  121.   Begin_Time = time ( (long *) 0);
  122. #endif
  123.  
  124.   for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
  125.   {
  126.  
  127.     Proc_5();
  128.     Proc_4();
  129.       /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
  130.     Int_1_Loc = 2;
  131.     Int_2_Loc = 3;
  132.     strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
  133.     Enum_Loc = Ident_2;
  134.     Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
  135.       /* Bool_Glob == 1 */
  136.     while (Int_1_Loc < Int_2_Loc)  /* loop body executed once */
  137.     {
  138.       Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
  139.         /* Int_3_Loc == 7 */
  140.       Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
  141.         /* Int_3_Loc == 7 */
  142.       Int_1_Loc += 1;
  143.     } /* while */
  144.       /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
  145.     Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
  146.       /* Int_Glob == 5 */
  147.     Proc_1 (Ptr_Glob);
  148.     for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
  149.                              /* loop body executed twice */
  150.     {
  151.       if (Enum_Loc == Func_1 (Ch_Index, 'C'))
  152.           /* then, not executed */
  153.         {
  154.         Proc_6 (Ident_1, &Enum_Loc);
  155.         strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
  156.         Int_2_Loc = Run_Index;
  157.         Int_Glob = Run_Index;
  158.         }
  159.     }
  160.       /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
  161.     Int_2_Loc = Int_2_Loc * Int_1_Loc;
  162.     Int_1_Loc = Int_2_Loc / Int_3_Loc;
  163.     Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
  164.       /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
  165.     Proc_2 (&Int_1_Loc);
  166.       /* Int_1_Loc == 5 */
  167.  
  168.   } /* loop "for Run_Index" */
  169.  
  170.   /**************/
  171.   /* Stop timer */
  172.   /**************/
  173.   
  174. #ifdef TIMES
  175.   times (&time_info);
  176.   End_Time = (long) time_info.tms_utime;
  177. #endif
  178. #ifdef TIME
  179.   End_Time = time ( (long *) 0);
  180. #endif
  181.  
  182.   if(Int_Glob != INT_GLOB)
  183.     {
  184.       fprintf (stderr, "Int_Glob:            %d\n", Int_Glob);
  185.       fprintf (stderr, "        should be:   %d\n", INT_GLOB);
  186.     }
  187.   if(Bool_Glob != BOOL_GLOB)
  188.     {
  189.       fprintf (stderr, "Bool_Glob:           %d\n", Bool_Glob);
  190.       fprintf (stderr, "        should be:   %d\n", BOOL_GLOB);
  191.     }
  192.   if(Ch_1_Glob != 'A')
  193.     {
  194.       fprintf (stderr, "Ch_1_Glob:           %c\n", Ch_1_Glob);
  195.       fprintf (stderr, "        should be:   %c\n", 'A');
  196.     }
  197.   if(Ch_2_Glob != 'B')
  198.     {
  199.       fprintf (stderr, "Ch_2_Glob:           %c\n", Ch_2_Glob);
  200.       fprintf (stderr, "        should be:   %c\n", 'B');
  201.     }
  202.   if(Arr_1_Glob[ARR_1_SZ] != ARR_1_VAL)
  203.     {
  204.       fprintf (stderr, "Arr_1_Glob[%d]:       %d\n", ARR_1_SZ, Arr_1_Glob[ARR_1_SZ]);
  205.       fprintf (stderr, "        should be:   %d\n", ARR_1_VAL);
  206.     }
  207.   if(Arr_2_Glob[8][7] != (Number_Of_Runs + 10))
  208.     {
  209.       fprintf (stderr, "Arr_2_Glob[8][7]:    %d\n", Arr_2_Glob[8][7]);
  210.       fprintf (stderr, "        should be:   %d\n",Number_Of_Runs + 10);
  211.     }
  212.   if(Ptr_Glob->Discr != Ident_1)
  213.     {
  214.       fprintf (stderr, "  Discr:             %d\n", Ptr_Glob->Discr);
  215.       fprintf (stderr, "        should be:   %d\n", Ident_1);
  216.     }
  217. #ifdef COMPLETE
  218.   if(Ptr_Glob->variant.var_1.Enum_Comp != 2)
  219.     {
  220.       fprintf (stderr, "  Enum_Comp:         %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
  221.       fprintf (stderr, "        should be:   %d\n", 2);
  222.     }
  223.     {
  224.   fprintf (stderr, "  Int_Comp:          %d\n", Ptr_Glob->variant.var_1.Int_Comp);
  225.   fprintf (stderr, "        should be:   %d\n", 17);
  226.     }
  227.     {
  228.   fprintf (stderr, "  Str_Comp:          %s\n", Ptr_Glob->variant.var_1.Str_Comp);
  229.   fprintf (stderr, "        should be:   %s\n", STR_0_PAR_REF);
  230.     }
  231.     {
  232.   fprintf (stderr, "Next_Ptr_Glob->\n");
  233.   fprintf (stderr, "  Ptr_Comp:          %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
  234.   fprintf (stderr, "        should be:   (implementation-dependent), same as above\n");
  235.     }
  236.     {
  237.   fprintf (stderr, "  Discr:             %d\n", Next_Ptr_Glob->Discr);
  238.   fprintf (stderr, "        should be:   %d\n", 0);
  239.     }
  240.     {
  241.   fprintf (stderr, "  Enum_Comp:         %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
  242.   fprintf (stderr, "        should be:   %d\n", 1);
  243.     }
  244.     {
  245.   fprintf (stderr, "  Int_Comp:          %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
  246.   fprintf (stderr, "        should be:   %d\n", 18);
  247.     }
  248. #endif
  249. if(strcmp(Next_Ptr_Glob->variant.var_1.Str_Comp, STR_0_PAR_REF))
  250.     {
  251.   fprintf (stderr, "  Str_Comp:          %s\n",
  252.                                 Next_Ptr_Glob->variant.var_1.Str_Comp);
  253.   fprintf (stderr, "        should be:   %s\n",STR_0_PAR_REF);
  254.     }
  255. #ifdef COMPLETE
  256.     {
  257.   fprintf (stderr, "Int_1_Loc:           %d\n", Int_1_Loc);
  258.   fprintf (stderr, "        should be:   %d\n", 5);
  259.     }
  260.     {
  261.   fprintf (stderr, "Int_2_Loc:           %d\n", Int_2_Loc);
  262.   fprintf (stderr, "        should be:   %d\n", 13);
  263.     }
  264.     {
  265.   fprintf (stderr, "Int_3_Loc:           %d\n", Int_3_Loc);
  266.   fprintf (stderr, "        should be:   %d\n", 7);
  267.     }
  268.     {
  269.   fprintf (stderr, "Enum_Loc:            %d\n", Enum_Loc);
  270.   fprintf (stderr, "        should be:   %d\n", 1);
  271.     }
  272. #endif
  273.   if(strcmp(Str_1_Loc, STR_1_PAR_REF))
  274.     {
  275.       fprintf (stderr, "Str_1_Loc:           %s\n", Str_1_Loc);
  276.       fprintf (stderr, "        should be:   %s\n",STR_1_PAR_REF);
  277.     }
  278.   if(strcmp(Str_2_Loc, STR_2_PAR_REF))
  279.     {
  280.       fprintf (stderr, "Str_2_Loc:           %s\n", Str_2_Loc);
  281.       fprintf (stderr, "        should be:   %s\n",STR_2_PAR_REF);
  282.         }
  283.  
  284.   User_Time = End_Time - Begin_Time;
  285.  
  286.   if (User_Time < Too_Small_Time)
  287.   {
  288.     fprintf (stderr, "Measured time too small to obtain meaningful results\n");
  289.     fprintf (stderr, "Please increase number of runs\n");
  290.     fprintf (stderr, "\n");
  291.   }
  292.   else
  293.   {
  294. #ifdef TIME
  295.     Microseconds = (float) User_Time * Mic_secs_Per_Second 
  296.                         / (float) Number_Of_Runs;
  297.     Dhrystones_Per_Second = (float) Number_Of_Runs / (float) User_Time;
  298. #else
  299.     Microseconds = (float) User_Time * Mic_secs_Per_Second 
  300.                         / ((float) HZ * ((float) Number_Of_Runs));
  301.     Dhrystones_Per_Second = ((float) HZ * (float) Number_Of_Runs)
  302.                         / (float) User_Time;
  303. #endif
  304. /************** The results go to standard out *********************/
  305.     fprintf (stderr,"Microseconds for one run through Dhrystone: ");
  306.     fprintf (stderr,"%6.1f \n", Microseconds);
  307.     fprintf (stderr,"Dhrystones per Second:                      ");
  308.     fprintf (stderr,"%6.1f \n", Dhrystones_Per_Second);
  309.     fprintf (stderr,"\n");
  310.   }
  311.   
  312. }
  313.  
  314.  
  315. Proc_1 (Ptr_Val_Par)
  316. /**********************/
  317.  
  318. REG Rec_Pointer Ptr_Val_Par;
  319.     /* executed once */
  320. {
  321.   REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;  
  322.                                         /* == Ptr_Glob_Next */
  323.   /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp,    */
  324.   /* corresponds to "rename" in Ada, "with" in Pascal           */
  325.   
  326.   structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob); 
  327.   Ptr_Val_Par->variant.var_1.Int_Comp = 5;
  328.   Next_Record->variant.var_1.Int_Comp 
  329.         = Ptr_Val_Par->variant.var_1.Int_Comp;
  330.   Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
  331.   Proc_3 (&Next_Record->Ptr_Comp);
  332.     /* Ptr_Val_Par->Ptr_Comp->Ptr_Comp 
  333.                         == Ptr_Glob->Ptr_Comp */
  334.   if (Next_Record->Discr == Ident_1)
  335.     /* then, executed */
  336.   {
  337.     Next_Record->variant.var_1.Int_Comp = 6;
  338.     Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp, 
  339.            &Next_Record->variant.var_1.Enum_Comp);
  340.     Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
  341.     Proc_7 (Next_Record->variant.var_1.Int_Comp, 10, 
  342.            &Next_Record->variant.var_1.Int_Comp);
  343.   }
  344.   else /* not executed */
  345.     structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
  346. } /* Proc_1 */
  347.  
  348.  
  349. Proc_2 (Int_Par_Ref)
  350. /******************/
  351.     /* executed once */
  352.     /* *Int_Par_Ref == 1, becomes 4 */
  353.  
  354. One_Fifty   *Int_Par_Ref;
  355. {
  356.   One_Fifty  Int_Loc;  
  357.   Enumeration   Enum_Loc;
  358.  
  359.   Int_Loc = *Int_Par_Ref + 10;
  360.   do /* executed once */
  361.     if (Ch_1_Glob == 'A')
  362.       /* then, executed */
  363.     {
  364.       Int_Loc -= 1;
  365.       *Int_Par_Ref = Int_Loc - Int_Glob;
  366.       Enum_Loc = Ident_1;
  367.     } /* if */
  368.   while (Enum_Loc != Ident_1); /* true */
  369. } /* Proc_2 */
  370.  
  371.  
  372. Proc_3 (Ptr_Ref_Par)
  373. /**********************/
  374.     /* executed once */
  375.     /* Ptr_Ref_Par becomes Ptr_Glob */
  376.  
  377. Rec_Pointer *Ptr_Ref_Par;
  378.  
  379. {
  380.   if (Ptr_Glob != Null)
  381.     /* then, executed */
  382.     *Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
  383.   else /* not executed */
  384.     Int_Glob = 100;
  385.   Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
  386. } /* Proc_3 */
  387.  
  388.  
  389.  
  390. Proc_4 () /* without parameters */
  391. /*******/
  392.     /* executed once */
  393. {
  394.   Boolean Bool_Loc;
  395.  
  396.   Bool_Loc = Ch_1_Glob == 'A';
  397.   Bool_Glob = Bool_Loc | Bool_Glob;
  398.   Ch_2_Glob = 'B';
  399. } /* Proc_4 */
  400.  
  401.  
  402. Proc_5 () /* without parameters */
  403. /*******/
  404.     /* executed once */
  405. {
  406.   Ch_1_Glob = 'A';
  407.   Bool_Glob = false;
  408. } /* Proc_5 */
  409.  
  410.  
  411.         /* Procedure for the assignment of structures,          */
  412.         /* if the C compiler doesn't support this feature       */
  413. #ifdef  NOSTRUCTASSIGN
  414. memcpy (d, s, l)
  415. register char   *d;
  416. register char   *s;
  417. register int    l;
  418. {
  419.         while (l--) *d++ = *s++;
  420. }
  421. #endif
  422.  
  423. /*****************************************************************
  424.                       THE PROCESSES
  425.  *****************************************************************/
  426. Proc_6 (Enum_Val_Par, Enum_Ref_Par)
  427. /*********************************/
  428.     /* executed once */
  429.     /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
  430.  
  431. Enumeration  Enum_Val_Par;
  432. Enumeration *Enum_Ref_Par;
  433. {
  434.   *Enum_Ref_Par = Enum_Val_Par;
  435.   if (! Func_3 (Enum_Val_Par))
  436.     /* then, not executed */
  437.     *Enum_Ref_Par = Ident_4;
  438.   switch (Enum_Val_Par)
  439.   {
  440.     case Ident_1: 
  441.       *Enum_Ref_Par = Ident_1;
  442.       break;
  443.     case Ident_2: 
  444.       if (Int_Glob > 100)
  445.         /* then */
  446.       *Enum_Ref_Par = Ident_1;
  447.       else *Enum_Ref_Par = Ident_4;
  448.       break;
  449.     case Ident_3: /* executed */
  450.       *Enum_Ref_Par = Ident_2;
  451.       break;
  452.     case Ident_4: break;
  453.     case Ident_5: 
  454.       *Enum_Ref_Par = Ident_3;
  455.       break;
  456.   } /* switch */
  457. } /* Proc_6 */
  458.  
  459.  
  460. Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref)
  461. /**********************************************/
  462.     /* executed three times                                      */ 
  463.     /* first call:      Int_1_Par_Val == 2, Int_2_Par_Val == 3,  */
  464.     /*                  Int_Par_Ref becomes 7                    */
  465.     /* second call:     Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
  466.     /*                  Int_Par_Ref becomes 17                   */
  467.     /* third call:      Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
  468.     /*                  Int_Par_Ref becomes 18                   */
  469. One_Fifty       Int_1_Par_Val;
  470. One_Fifty       Int_2_Par_Val;
  471. One_Fifty      *Int_Par_Ref;
  472. {
  473.   One_Fifty Int_Loc;
  474.  
  475.   Int_Loc = Int_1_Par_Val + 2;
  476.   *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
  477. } /* Proc_7 */
  478.  
  479.  
  480. Proc_8 (Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val)
  481. /*********************************************************************/
  482.     /* executed once      */
  483.     /* Int_Par_Val_1 == 3 */
  484.     /* Int_Par_Val_2 == 7 */
  485. Arr_1_Dim       Arr_1_Par_Ref;
  486. Arr_2_Dim       Arr_2_Par_Ref;
  487. int             Int_1_Par_Val;
  488. int             Int_2_Par_Val;
  489. {
  490.   REG One_Fifty Int_Index;
  491.   REG One_Fifty Int_Loc;
  492.  
  493.   Int_Loc = Int_1_Par_Val + 5;
  494.   Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
  495.   Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
  496.   Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
  497.   for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
  498.     Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
  499.   Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
  500.   Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
  501.   Int_Glob = 5;
  502. } /* Proc_8 */
  503.  
  504.  
  505. Enumeration Func_1 (Ch_1_Par_Val, Ch_2_Par_Val)
  506. /*************************************************/
  507.     /* executed three times                                         */
  508.     /* first call:      Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R'    */
  509.     /* second call:     Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C'    */
  510.     /* third call:      Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C'    */
  511.  
  512. Capital_Letter   Ch_1_Par_Val;
  513. Capital_Letter   Ch_2_Par_Val;
  514. {
  515.   Capital_Letter        Ch_1_Loc;
  516.   Capital_Letter        Ch_2_Loc;
  517.  
  518.   Ch_1_Loc = Ch_1_Par_Val;
  519.   Ch_2_Loc = Ch_1_Loc;
  520.   if (Ch_2_Loc != Ch_2_Par_Val)
  521.     /* then, executed */
  522.     return (Ident_1);
  523.   else  /* not executed */
  524.   {
  525.     Ch_1_Glob = Ch_1_Loc;
  526.     return (Ident_2);
  527.    }
  528. } /* Func_1 */
  529.  
  530.  
  531. Boolean Func_2 (Str_1_Par_Ref, Str_2_Par_Ref)
  532. /*************************************************/
  533.     /* executed once */
  534.     /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
  535.     /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
  536.  
  537. Str_30  Str_1_Par_Ref;
  538. Str_30  Str_2_Par_Ref;
  539. {
  540.   REG One_Thirty        Int_Loc;
  541.       Capital_Letter    Ch_Loc;
  542.  
  543.   Int_Loc = 2;
  544.   while (Int_Loc <= 2) /* loop body executed once */
  545.     if (Func_1 (Str_1_Par_Ref[Int_Loc],
  546.                 Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
  547.       /* then, executed */
  548.     {
  549.       Ch_Loc = 'A';
  550.       Int_Loc += 1;
  551.     } /* if, while */
  552.   if (Ch_Loc >= 'W' && Ch_Loc < 'Z')
  553.     /* then, not executed */
  554.     Int_Loc = 7;
  555.   if (Ch_Loc == 'R')
  556.     /* then, not executed */
  557.     return (true);
  558.   else /* executed */
  559.   {
  560.     if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
  561.       /* then, not executed */
  562.     {
  563.       Int_Loc += 7;
  564.       Int_Glob = Int_Loc;
  565.       return (true);
  566.     }
  567.     else /* executed */
  568.       return (false);
  569.   } /* if Ch_Loc */
  570. } /* Func_2 */
  571.  
  572.  
  573. Boolean Func_3 (Enum_Par_Val)
  574. /***************************/
  575.     /* executed once        */
  576.     /* Enum_Par_Val == Ident_3 */
  577. Enumeration Enum_Par_Val;
  578. {
  579.   Enumeration Enum_Loc;
  580.  
  581.   Enum_Loc = Enum_Par_Val;
  582.   if (Enum_Loc == Ident_3)
  583.     /* then, executed */
  584.     return (true);
  585. } /* Func_3 */
  586.  
  587.