I downloaded Smaug1.4a for Windows from this site, and it doesn't seem to want to compile.
I am attempting to compile it with Cygwin beta19.
I've used this version of Cygwin to compile a ported version of smaug1.4 many times before without any trouble.
With the smaug1.4a for Win32 that I've downloaded from Nick Gammon's site, it gives me a few parse errors. I've looked over the code and I honestly can't see why it's giving me those errors. I am not the best coder, however, so I'm probably missing something.
I thought I'd ask for help here first since this is where I got the code.
The error appears in interp.c at 1192 and 1197
1192: parse error before '<'
1197: parse error before 'if'
The code:
1187 void update_userec(struct timeval *time_used, struct 1188 timerset *userec)
1189 {
1190 userec->num_uses++;
1191 if ( !timerisset(&userec->min_time)
1192 || timercmp(time_used, &userec->min_time, <) )
1193 {
1194 userec->min_time.tv_sec = time_used->tv_sec;
1195 userec->min_time.tv_usec = time_used->tv_usec;
1196 }
1197 if ( !timerisset(&userec->max_time)
1198 || timercmp(time_used, &userec->max_time, >) )
1199 {
1200 userec->max_time.tv_sec = time_used->tv_sec;
1201 userec->max_time.tv_usec = time_used->tv_usec;
1202 }
1203 userec->total_time.tv_sec += time_used->tv_sec;
1204 userec->total_time.tv_usec += time_used->tv_usec;
1205 while ( userec->total_time.tv_usec >= 1000000 )
1206 {
1207 userec->total_time.tv_sec++;
1208 userec->total_time.tv_usec -= 1000000;
1209 }
1210 return;
1211 }
If anyone can help me, I'd really appreciate it. Thanks :)
I am attempting to compile it with Cygwin beta19.
I've used this version of Cygwin to compile a ported version of smaug1.4 many times before without any trouble.
With the smaug1.4a for Win32 that I've downloaded from Nick Gammon's site, it gives me a few parse errors. I've looked over the code and I honestly can't see why it's giving me those errors. I am not the best coder, however, so I'm probably missing something.
I thought I'd ask for help here first since this is where I got the code.
The error appears in interp.c at 1192 and 1197
1192: parse error before '<'
1197: parse error before 'if'
The code:
1187 void update_userec(struct timeval *time_used, struct 1188 timerset *userec)
1189 {
1190 userec->num_uses++;
1191 if ( !timerisset(&userec->min_time)
1192 || timercmp(time_used, &userec->min_time, <) )
1193 {
1194 userec->min_time.tv_sec = time_used->tv_sec;
1195 userec->min_time.tv_usec = time_used->tv_usec;
1196 }
1197 if ( !timerisset(&userec->max_time)
1198 || timercmp(time_used, &userec->max_time, >) )
1199 {
1200 userec->max_time.tv_sec = time_used->tv_sec;
1201 userec->max_time.tv_usec = time_used->tv_usec;
1202 }
1203 userec->total_time.tv_sec += time_used->tv_sec;
1204 userec->total_time.tv_usec += time_used->tv_usec;
1205 while ( userec->total_time.tv_usec >= 1000000 )
1206 {
1207 userec->total_time.tv_sec++;
1208 userec->total_time.tv_usec -= 1000000;
1209 }
1210 return;
1211 }
If anyone can help me, I'd really appreciate it. Thanks :)