# SPECD/site.mac def _check_mot_str '{ global _bad_mot local _i for (_i = 0; _i <= MOTORS; _i++) if (_i == MOTORS) { printf("\nInvalid motor name: %s",$1) _bad_mot++ } else if ($1 == motor_mne(_i)) { $1 = _i break } }'