Print this page
make: use the more modern wchar routines, not widec.h


1129                                               gettext("because it is out of date") :
1130                                               gettext("because it does not exist"));
1131                         }
1132                 }
1133         }
1134 
1135         /* enter explicit rule from percent rule */     
1136         Name lmn_target = true_target;
1137         if (true_target->has_long_member_name) {
1138                 lmn_target = get_prop(true_target->prop, long_member_name_prop)->body.long_member_name.member_name;
1139         }
1140         line->body.line.sccs_command = false;
1141         line->body.line.target = true_target;
1142         line->body.line.command_template = pat_rule->command_template;
1143         line->body.line.star = GETNAME(percent.buffer.start, FIND_LENGTH);
1144         line->body.line.less = less;
1145 
1146         if (lmn_target->parenleft) {
1147                 Wstring lmn_string(lmn_target);
1148 
1149                 wchar_t *left = (wchar_t *) wschr(lmn_string.get_string(), (int) parenleft_char);
1150                 wchar_t *right = (wchar_t *) wschr(lmn_string.get_string(), (int) parenright_char);
1151 
1152                 if ((left == NULL) || (right == NULL)) {
1153                         line->body.line.percent = NULL;
1154                 } else {
1155                         line->body.line.percent = GETNAME(left + 1, right - left - 1);
1156                 }
1157         } else {
1158                 line->body.line.percent = NULL;
1159         }
1160         pat_rule->being_expanded = false;
1161 
1162         return result;
1163 }
1164 
1165 /*
1166  *      match_found_with_pattern 
1167  *           ( target, pat_rule, percent, percent_buf)
1168  *      
1169  *      matches "target->string" with a % pattern.
1170  *      If pattern contains a MACRO definition, it's expanded first.




1129                                               gettext("because it is out of date") :
1130                                               gettext("because it does not exist"));
1131                         }
1132                 }
1133         }
1134 
1135         /* enter explicit rule from percent rule */     
1136         Name lmn_target = true_target;
1137         if (true_target->has_long_member_name) {
1138                 lmn_target = get_prop(true_target->prop, long_member_name_prop)->body.long_member_name.member_name;
1139         }
1140         line->body.line.sccs_command = false;
1141         line->body.line.target = true_target;
1142         line->body.line.command_template = pat_rule->command_template;
1143         line->body.line.star = GETNAME(percent.buffer.start, FIND_LENGTH);
1144         line->body.line.less = less;
1145 
1146         if (lmn_target->parenleft) {
1147                 Wstring lmn_string(lmn_target);
1148 
1149                 wchar_t *left = (wchar_t *) wcschr(lmn_string.get_string(), (int) parenleft_char);
1150                 wchar_t *right = (wchar_t *) wcschr(lmn_string.get_string(), (int) parenright_char);
1151 
1152                 if ((left == NULL) || (right == NULL)) {
1153                         line->body.line.percent = NULL;
1154                 } else {
1155                         line->body.line.percent = GETNAME(left + 1, right - left - 1);
1156                 }
1157         } else {
1158                 line->body.line.percent = NULL;
1159         }
1160         pat_rule->being_expanded = false;
1161 
1162         return result;
1163 }
1164 
1165 /*
1166  *      match_found_with_pattern 
1167  *           ( target, pat_rule, percent, percent_buf)
1168  *      
1169  *      matches "target->string" with a % pattern.
1170  *      If pattern contains a MACRO definition, it's expanded first.