home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 529b.lha / BMake_v1.1 / fncall.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-03  |  15.8 KB  |  737 lines

  1. /*    fncall.c
  2.  *    (c) Copyright 1991 by Ben Eng, All Rights Reserved
  3.  *
  4.  */
  5.  
  6. #include <clib/exec_protos.h>
  7.  
  8. #include <ctype.h>
  9. #include <scdir.h>
  10.  
  11. #include "make.h"
  12. #include "depend.h"
  13.  
  14. #if FNCALLS
  15.  
  16. /*    pattern matching routine */
  17. int
  18. ismatch( char *pat, char *text )
  19. {
  20.     char *wild;
  21.     int len;
  22.  
  23.     debugprintf( 7, ( "ismatch(%s,%s)\n", pat, text ));
  24.  
  25.     wild = find_token( pat, '%' );
  26.  
  27.     if( !wild) return( strcmp( pat, text ) ? 0 : 1 );
  28.  
  29.     /* the length of the part of pat before the % */
  30.     len = (int)(wild - pat);
  31.  
  32.     if( len && strncmp( pat, text, len )) return( 0 ); /* no match */
  33.  
  34.     /* the length of the part of pat after the % */
  35.     len = (int)(pat + strlen(pat) - wild - 1);
  36.     if( len && strncmp( wild + 1, text + strlen(text) - len, len ))
  37.             return( 0 ); /* no match */
  38.  
  39.     return( 1 ); /* match */
  40. }
  41.  
  42. /*    function calls (mac, string)
  43.  *
  44.  *    The string parameter is the rest of the arguments passed to the
  45.  *    function call.  string is modifiable in fncalls because it is
  46.  *    actually contained within the macroname array[] which isn't
  47.  *    really used again after the fncall returns.
  48.  *
  49.  *    returns 0 if successful, 1 if error
  50.  *    with side effect:  mac->expansion = strdup( result_string );
  51.  *
  52.  */
  53.  
  54. static char argument_missing[] = "argument missing: %s %s\n";
  55. static char error_no_memory[] = "error:  no memory\n";
  56.  
  57. static int
  58. do_basename( struct macro *mac, char *string, how_basename )
  59. {
  60.     char *filelist = NULL;
  61.     char *out, *text, *cptr;
  62.     int len = 0;
  63.     char word[ MAXPATHNAME ];
  64.  
  65.     filelist = (char *)calloc( Param.MaxLine, 1 );
  66.     if( !filelist ) {
  67.         logfile( error_no_memory );
  68.         return( 1 );
  69.     }
  70.     
  71.     out = filelist;
  72.     text = string;
  73.  
  74.     while( len < Param.MaxLine ) {
  75.         text = parse_str( word, text, sizeof(word));
  76.         if( !*word ) break; /* no more words in text */
  77.         cptr = strrchr( word, '.' );
  78.         if( how_basename ) { /* take the basename */
  79.             if( cptr && basename(word) <= cptr ) {
  80.                 *cptr = (char)0; /* truncate the word at the `.' */
  81.             }
  82.         }
  83.         else { /* take the suffix */
  84.             if( cptr && basename(word) <= cptr ) {
  85.                 shift_string_left( word, (int)(cptr - word));
  86.             }
  87.         }
  88.         len += strlen( word );
  89.         if( len + 1 < Param.MaxLine ) {
  90.             if( out != filelist ) {
  91.                 *out++ = ' ';
  92.                 len++;
  93.             }
  94.             strcpy( out, word );
  95.             out = filelist + len;
  96.         }
  97.         else break;
  98.     } /* while */
  99.     *out = (char)0;
  100.     if( len > 0 ) mac->expansion = strdup( filelist );
  101.     free( filelist );
  102.     return( 0 );
  103. }
  104.  
  105. static int
  106. fn_basename( struct macro *mac, char *string )
  107. {
  108.     return( do_basename( mac, string, 1 ));
  109. }
  110.  
  111. static int
  112. fn_suffix( struct macro *mac, char *string )
  113. {
  114.     return( do_basename( mac, string, 0 ));
  115. }
  116.  
  117. static int
  118. do_addfix( struct macro *mac, char *string, int how_fix )
  119. {
  120.     char *filelist = NULL;
  121.     char *suf, *str = string;
  122.  
  123.     filelist = (char *)calloc( Param.MaxLine, 1 );
  124.     if( !filelist ) {
  125.         logfile( error_no_memory );
  126.         return( 1 );
  127.     }
  128.  
  129.     while( isspace( *str )) str++;
  130.     suf = str;
  131.     while( *str && *str != ',' && str[-1] != '\\' ) str++;
  132.     if( *suf != ',' && *str == ',' && str[-1] != '\\' ) {
  133.         char *out, *text, *cptr;
  134.         int suflen, len = 0;
  135.         char word[ MAXPATHNAME ];
  136.  
  137.         *str++ = (char)0; /* null terminate the suffix */
  138.         suflen = strlen( suf );
  139.         out = filelist;
  140.         text = str;
  141.  
  142.         while( len < Param.MaxLine ) {
  143.             text = parse_str( word, text, sizeof(word));
  144.             if( !*word ) break; /* no more words in text */
  145.             if( (strlen( word )+suflen) < sizeof(word)) {
  146.                 if( how_fix ) /* append the suffix */
  147.                     strcat( word, suf );
  148.                 else { /* prepend the prefix */
  149.                     len += strlen( suf );
  150.                     if( len + 1 < Param.MaxLine ) {
  151.                         if( out != filelist ) {
  152.                             *out++ = ' ';
  153.                             len++;
  154.                         }
  155.                         strcpy( out, suf );
  156.                         out = filelist + len;
  157.                     }
  158.                 }
  159.             }
  160.             len += strlen( word );
  161.             if( len + 1 < Param.MaxLine ) {
  162.                 if( out != filelist & how_fix ) {
  163.                     *out++ = ' ';
  164.                     len++;
  165.                 }
  166.                 strcpy( out, word );
  167.                 out = filelist + len;
  168.             }
  169.             else break;
  170.         } /* while */
  171.         *out = (char)0;
  172.         if( len > 0 ) mac->expansion = strdup( filelist );
  173.     }
  174.     free( filelist );
  175.     return( 0 );
  176. }
  177.  
  178. static int
  179. fn_addprefix( struct macro *mac, char *string )
  180. {
  181.     return( do_addfix( mac, string, 0 ));
  182. }
  183.  
  184. static int
  185. fn_addsuffix( struct macro *mac, char *string )
  186. {
  187.     return( do_addfix( mac, string, 1 ));
  188. }
  189.  
  190. static int
  191. do_dir( struct macro *mac, char *string, int how_dir )
  192. {
  193.     char *filelist = NULL;
  194.     char *str = string;
  195.     char *out, *text, *cptr;
  196.     int len = 0;
  197.     char word[ MAXPATHNAME ];
  198.  
  199.     filelist = (char *)calloc( Param.MaxLine, 1 );
  200.     if( !filelist ) {
  201.         logfile( error_no_memory );
  202.         return( 1 );
  203.     }
  204.  
  205.     while( isspace( *str )) str++;
  206.     out = filelist;
  207.     text = str;
  208.  
  209.     while( len < Param.MaxLine ) {
  210.         text = parse_str( word, text, sizeof(word));
  211.         if( !*word ) break; /* no more words in text */
  212.         cptr = basename( word );
  213.         if( how_dir ) { /* keep only the directory part */
  214.             *cptr = (char)0;
  215.         }
  216.         else { /* prepend the prefix */
  217.             shift_string_left( word, (int)(cptr - word));
  218.         }
  219.         len += strlen( word );
  220.         if( len + 1 < Param.MaxLine ) {
  221.             if( out != filelist ) {
  222.                 *out++ = ' ';
  223.                 len++;
  224.             }
  225.             strcpy( out, word );
  226.             out = filelist + len;
  227.         }
  228.         else break;
  229.     } /* while */
  230.     *out = (char)0;
  231.     if( len > 0 ) mac->expansion = strdup( filelist );
  232.     free( filelist );
  233.     return( 0 );
  234. }
  235.  
  236. static int
  237. fn_dir( struct macro *mac, char *string )
  238. {
  239.     return( do_dir( mac, string, 1 ));
  240. }
  241.  
  242. static int
  243. fn_notdir( struct macro *mac, char *string )
  244. {
  245.     return( do_dir( mac, string, 0 ));
  246. }
  247.  
  248. static int
  249. do_filter( struct macro *mac, char *string, int how_filter )
  250. {
  251.     char *str = string;
  252.     char *pat;
  253.     int len;
  254.  
  255.     while( isspace( *str )) str++;
  256.     pat = str;
  257.     while( *str && *str != ',' && str[-1] != '\\' ) str++;
  258.     if( *pat != ',' && *str == ',' && str[-1] != '\\' ) {
  259.         char word[ 80 ];
  260.         char *text, *out;
  261.  
  262.         *str++ = (char)0;
  263.  
  264.         if( !( mac->expansion = strdup( str )))
  265.             return( 0 ); /* no mem */
  266.         out = mac->expansion;
  267.  
  268.         for( text = out;; ) {
  269.             text = parse_str( word, text, sizeof(word));
  270.             if( !*word ) break; /* no more words in text */
  271.  
  272.             if( how_filter ) {
  273.                 if( ismatch( pat, word )) {
  274.                     out = text + 1;
  275.                 }
  276.                 else { /* no match remove it */
  277.                     while( isspace( *text )) text++;
  278.                     shift_string_left( out, (int)(text - out));
  279.                     text = out;
  280.                 }
  281.             }
  282.             else {
  283.                 if( ismatch( pat, word )) {
  284.                     while( isspace( *text )) text++;
  285.                     shift_string_left( out, (int)(text - out));
  286.                     text = out;
  287.                 }
  288.                 else { /* no match remove it */
  289.                     out = text + 1;
  290.                 }
  291.             }
  292.         } /* for */
  293.         *out = (char)0;
  294.         return( 0 );
  295.     }
  296.     logprintf( argument_missing, "filter", string );
  297.     return( 1 );
  298. }
  299.  
  300. static int
  301. fn_filter( struct macro *mac, char *string )
  302. {
  303.     return( do_filter( mac, string, 1 ));
  304. }
  305.  
  306. static int
  307. fn_filter_out( struct macro *mac, char *string )
  308. {
  309.     return( do_filter( mac, string, 0 ));
  310. }
  311.  
  312. static int
  313. fn_findstring( struct macro *mac, char *string )
  314. {
  315.     char *find, *in, *str = string;
  316.     int len;
  317.     
  318.     while( isspace( *str )) str++;
  319.     find = str;
  320.     while( *str && *str != ',' && str[-1] != '\\' ) str++;
  321.     if( *find != ',' && *str == ',' && str[-1] != '\\' ) {
  322.         *str++ = (char)0;
  323.         in = str;
  324.         while( *str ) str++;    /* find end string */
  325.         len = strlen( find );
  326.         str -= len;    /* str marks the end of searching */
  327.  
  328.         while( in <= str ) {
  329.             /* logprintf( "looking for \"%s\" in \"%s\"\n", find, in ); */
  330.  
  331.             if( !strncmp( find, in, len )) { /* found */
  332.                 mac->expansion = strdup( find );
  333.                 break;
  334.             }
  335.             in++; 
  336.         }
  337.     }
  338.     else {
  339.         logprintf( argument_missing, "findstring", string );
  340.         return( 1 );
  341.     }
  342.     return( 0 );
  343. }
  344.  
  345. static int
  346. fn_getenv( struct macro *mac, char *string )
  347. {
  348.     char *evalue;
  349.     while( isspace( *string )) string++;
  350.  
  351.     evalue = getenv( string );
  352.     if( evalue && *evalue ) mac->expansion = strdup( evalue );
  353.     return( 0 );
  354. }
  355.  
  356. static int
  357. fn_join( struct macro *mac, char *string )
  358. {
  359.     char *filelist = NULL;
  360.     char *str = string;
  361.     char *text1, *text2;
  362.     
  363.     filelist = (char *)calloc( Param.MaxLine, 1 );
  364.     if( !filelist ) {
  365.         logfile( error_no_memory );
  366.         return( 1 );
  367.     }
  368.  
  369.     while( isspace( *str )) str++;
  370.     text1 = str;
  371.     while( *str && *str != ',' && str[-1] != '\\' ) str++;
  372.     if( *text1 != ',' && *str == ',' && str[-1] != '\\' ) {
  373.         char *out;
  374.         int len = 0;
  375.         char word1[ MAXPATHNAME ], word2[ MAXPATHNAME ];
  376.  
  377.         *str++ = (char)0; /* null terminate the suffix */
  378.         out = filelist;
  379.         text2 = str;
  380.  
  381.         *word1 = *word2 = ' '; /* dummy for first iteration */
  382.         while( len < Param.MaxLine ) {
  383.             if( *word1 ) text1 = parse_str( word1, text1, sizeof(word1));
  384.             if( *word2 ) text2 = parse_str( word2, text2, sizeof(word2));
  385.             if( !*word1 && !*word2 ) break; /* no more words */
  386.  
  387.             len += strlen( word1 ) + strlen( word2 );
  388.             if( len + 1 < Param.MaxLine ) {
  389.                 if( out != filelist ) {
  390.                     *out++ = ' ';
  391.                     len++;
  392.                 }
  393.                 strcpy( out, word1 );
  394.                 strcat( out, word2 );
  395.                 out = filelist + len;
  396.             }
  397.             else break;
  398.         } /* while */
  399.         *out = (char)0;
  400.         if( len > 0 ) mac->expansion = strdup( filelist );
  401.     }
  402.     if( filelist ) free( filelist );
  403.     return( 0 );
  404. }
  405.  
  406. static int
  407. fn_patsubst( struct macro *mac, char *string )
  408. {
  409.     char *str = string;
  410.     char *from, *to, *text;
  411.     
  412.     while( isspace( *str )) str++;
  413.     from = str;
  414.     while( *str && *str != ',' && str[-1] != '\\' ) str++;
  415.     if( *from != ',' && *str == ',' && str[-1] != '\\' ) {
  416.         *str++ = (char)0;
  417.         to = str;
  418.         while( *str && *str != ',' && str[-1] != '\\' ) str++;
  419.         if( *to != ',' && *str == ',' && str[-1] != '\\' && str[ 1 ] ) {
  420.             char *expansion = NULL, *out;
  421.             int len = 0;
  422.  
  423.             *str++ = (char)0;
  424.             while( *str && isspace( *str )) str++;
  425.             text = str;
  426.  
  427.             out = expansion = (char *)malloc( Param.MaxLine );
  428.             if( !expansion ) {
  429.                 logfile( error_no_memory );
  430.                 return( 1 );
  431.             }
  432.             while( *str ) {
  433.                 while( *str && !isspace( *str )) str++;
  434.                 if( !*str && str == text ) break;
  435.                 if( *str ) *str++ = (char)0;
  436.                 if( len + (int)(str - text) < Param.MaxLine ) {
  437.                     if( out > expansion ) {
  438.                         *out++ = ' ';
  439.                         len++;
  440.                     }
  441.                     if( pattern_match( from, text )) {
  442.                         /* needs to do bounds checking to prevent */
  443.                         /* overflowing of the expansion string! */
  444.                         /* neglected for now - user discretion advised */
  445.                         if( map_to_pattern( out, from, to, text )) break;
  446.                     }
  447.                     else strcpy( out, text );
  448.                 }
  449.                 len += strlen( out );
  450.                 out = expansion + len;
  451.                 while( *str && isspace( *str )) str++;
  452.                 text = str;
  453.             }
  454.             *out = (char)0;
  455.             if( *expansion ) mac->expansion = strdup( expansion );
  456.             free( expansion );
  457.             return( 0 );
  458.         }
  459.     }
  460.     logprintf( argument_missing, "patsubst", string );
  461.     return( 1 );
  462. }
  463.  
  464. static int
  465. sortcomp( char **s1, char **s2 )
  466. {
  467.     return( strcmp( *s1, *s2 ));
  468. }
  469.  
  470. static int
  471. fn_sort( struct macro *mac, char *string )
  472. {
  473.     int i, nel;
  474.     char **array = NULL;
  475.     char *expansion = NULL;
  476.     char *out, *str = string;
  477.  
  478.     while( isspace( *str )) str++;
  479.     nel = count_args( str );
  480.     array = (char **)calloc( sizeof(char *), nel );
  481.     expansion = (char *)malloc( MAXLINE );
  482.     if( !array || !expansion ) {
  483.         logfile( error_no_memory );
  484.         if( array ) free( array );
  485.         if( expansion ) free( expansion );
  486.         return( 1 );
  487.     }
  488.  
  489.     for( i = 0; i < nel && *str; i++ ) {
  490.         while( isspace( *str )) str++;
  491.         if( *str ) array[ i ] = str++;
  492.         while( !isspace( *str ) && *str ) str++;
  493.         if( isspace( *str )) *str++ = (char)0;
  494.     }
  495.  
  496.     qsort( array, nel, sizeof(char *), sortcomp );
  497.     out = expansion;
  498.     for( i = 0; i < nel; i++ ) {
  499.         if( i ) *out++ = ' ';
  500.         strcpy( out, array[ i ] );
  501.         out += strlen( out );
  502.     }
  503.  
  504.     free( array );
  505.     mac->expansion = strdup( expansion );
  506.     free( expansion );
  507.     return( 0 );
  508. }
  509.  
  510. static int
  511. fn_strip( struct macro *mac, char *str )
  512. {
  513.     while( isspace( *str )) str++;
  514.     if( *str && (mac->expansion = strdup( str ))) {
  515.         register char *d = mac->expansion;
  516.         register char *s = mac->expansion;
  517.         while( *s ) {
  518.             *d++ = *s;
  519.             if( isspace(*s)) while( isspace( *s)) s++;
  520.             else s++;
  521.         }
  522.         if( isspace( *d )) {
  523.             while( isspace( *d ) && d > mac->expansion ) d--;
  524.             d++;
  525.         }
  526.         *d = (char)0;
  527.     }
  528.     return( 0 );
  529. }
  530.  
  531. static int
  532. fn_subst( struct macro *mac, char *string )
  533. {
  534.     char *str = string;
  535.     char *from, *to, *text, *out;
  536.     char *expansion = NULL;
  537.     int fromlen, tolen;
  538.     
  539.     while( isspace( *str )) str++;
  540.     from = str;
  541.     while( *str && *str != ',' && str[-1] != '\\' ) str++;
  542.     if( *from != ',' && *str == ',' && str[-1] != '\\' ) {
  543.         *str++ = (char)0;
  544.         to = str;
  545.         while( *str && *str != ',' && str[-1] != '\\' ) str++;
  546.         if( *to != ',' && *str == ',' && str[-1] != '\\' && str[ 1 ] ) {
  547.             *str++ = (char)0;
  548.             text = str;
  549.             fromlen = strlen( from );
  550.             tolen = strlen( to );
  551.             while( *str ) str++;    /* find end string */
  552.             str -= fromlen;
  553.  
  554.             out = expansion = (char *)malloc( Param.MaxLine );
  555.             if( !expansion ) {
  556.                 logfile( error_no_memory );
  557.                 return( 1 );
  558.             }
  559.             while( text <= str ) {
  560.                 if( !strncmp( from, text, fromlen )) { /* found */
  561.                     if( (int)(out - expansion) + tolen < Param.MaxLine ) {
  562.                         strcpy( out, to );
  563.                         out += tolen;
  564.                     }
  565.                     else break;
  566.                     text += fromlen;
  567.                 }
  568.                 else if((int)(out - expansion) + tolen < Param.MaxLine ) {
  569.                     *out++ = *text++;
  570.                 }
  571.                 else break;
  572.             }
  573.             *out = (char)0;
  574.             if( *expansion ) mac->expansion = strdup( expansion );
  575.             free( expansion );
  576.             return( 0 );
  577.         }
  578.     }
  579.     logprintf( argument_missing, "subst", string );
  580.     return( 1 );
  581. }
  582.  
  583. static int
  584. fn_wildcard( struct macro *mac, char *string )
  585. {
  586.     char *filelist = NULL;
  587.     char *pat = string;
  588.  
  589.     filelist = (char *)calloc( Param.MaxLine, 1 );
  590.     if( !filelist ) {
  591.         logfile( error_no_memory );
  592.         return( 1 );
  593.     }
  594.     while( isspace( *pat )) pat++;
  595.     if( *pat ) {
  596.         char *out = filelist;
  597.         char *fn;
  598.         int len = 0;
  599.  
  600.         while( len < Param.MaxLine ) {
  601.             if( !(fn = scdir( pat ))) break; /* no more */
  602.             if( out != filelist ) {
  603.                 *out++ = ' ';
  604.                 len++;
  605.             }
  606.             len += strlen( fn );
  607.             if( len < Param.MaxLine ) {
  608.                 strcpy( out, fn );
  609.                 out = filelist + len;
  610.             }
  611.         }
  612.         if( len > 0 ) mac->expansion = strdup( filelist );
  613.         scdir_abort();
  614.     }
  615.     free( filelist );
  616.     return( 0 );
  617. }
  618.  
  619.  
  620. int
  621. do_word( struct macro *mac, char *string, int word )
  622. {
  623.     char *begin, *end;
  624.  
  625.     if( begin = find_word( string, word )) {
  626.         end = begin;
  627.         while( *end && !isspace( *end )) end++;
  628.         *end = (char)0; /* null terminate past the end of word */
  629.         mac->expansion = strdup( begin );
  630.     }
  631.     return( 0 );
  632. }
  633.  
  634. static int
  635. fn_firstword( struct macro *mac, char *string )
  636. {
  637.     while( isspace( *string )) string++;
  638.     return( do_word( mac, string, 1 ));
  639. }
  640.  
  641. static int
  642. fn_word( struct macro *mac, char *string )
  643. {
  644.     char *comma;
  645.     int word;
  646.  
  647.     while( isspace( *string )) string++;
  648.     if( *string && (comma = find_token( string, ',' ))) {
  649.         *comma = (char)0;
  650.         word = atoi( string );
  651.         /* else word not found */
  652.         return( do_word( mac, comma + 1, word ));
  653.     }
  654.     logprintf( argument_missing, "word", string );
  655.     return( 1 );
  656. }
  657.  
  658. static int
  659. fn_words( struct macro *mac, char *string )
  660. {
  661.     char buf[ 20 ];
  662.     sprintf( buf, "%d", count_args( string ));
  663.     mac->expansion = strdup( buf );
  664.     return( 0 );
  665. }
  666.  
  667. static int
  668. fn_notimp( struct macro *mac, char *string )
  669. {
  670.     logfile( "Function call not implemented\n" );
  671.     return( 1 );
  672. }
  673.  
  674. /*************************************************************************/
  675.  
  676. /* sorted array for binary search */
  677. #define MAX_FNCALL 22
  678. static struct fncall fncarray[ MAX_FNCALL ] = {
  679.     "addprefix",    fn_addprefix,
  680.     "addsuffix",    fn_addsuffix,
  681.     "basename",        fn_basename,
  682.     "dir",            fn_dir,
  683.     "filter",        fn_filter,
  684.     "filter-out",    fn_filter_out,
  685.     "findstring",    fn_findstring,
  686.     "firstword",    fn_firstword,
  687.     "foreach",        fn_notimp,
  688.     "getenv",        fn_getenv,
  689.     "join",            fn_join,
  690.     "notdir",        fn_notdir,
  691.     "origin",        fn_notimp,
  692.     "patsubst",        fn_patsubst,
  693.     "shell",        fn_notimp,
  694.     "sort",            fn_sort,
  695.     "strip",        fn_strip,
  696.     "subst",        fn_subst,
  697.     "suffix",        fn_suffix,
  698.     "wildcard",        fn_wildcard,
  699.     "word",            fn_word,
  700.     "words",        fn_words
  701. };
  702.  
  703. /*    binary search to find the function */
  704. struct fncall *
  705. find_fncall( char *name )
  706. {
  707.     register struct fncall *array = fncarray;
  708.     int first = 0L;
  709.     int last = MAX_FNCALL - 1;
  710.     int mid;
  711.     int diff;
  712.  
  713.     /* binary search */
  714.     while( first <= last ) {
  715.         mid = (first+last) / 2;
  716.         diff = strcmp( name, array[ mid ].name );
  717.         if( !diff )
  718.             return( &array[ mid ] ); /* found */
  719.         if( first == last ) break; /* not found */
  720.         if( diff < 0 ) last = mid - 1;
  721.         else first = mid + 1;
  722.     }
  723.     return( NULL ); /* not found */
  724. }
  725.  
  726. #else
  727.  
  728. /*    No FNCALLS */
  729. struct fncall *
  730. find_fncall( char *name )
  731. {
  732.     return( NULL ); /* not found */
  733. }
  734.  
  735. #endif
  736.  
  737.