| 42 |
|
|
| 43 |
localtime_r(&birthday, &tm_birth); |
localtime_r(&birthday, &tm_birth); |
| 44 |
|
|
| 45 |
if (tm_birth.tm_mon < 1 || tm_birth.tm_mon > 12 || tm_birth.tm_mday < 1 || tm_birth.tm_mday > 31) |
if (tm_birth.tm_mday < astro_dates[tm_birth.tm_mon]) |
| 46 |
{ |
{ |
| 47 |
return astro_names[0]; |
return astro_names[tm_birth.tm_mon]; |
| 48 |
} |
} |
| 49 |
|
|
| 50 |
if (tm_birth.tm_mday < astro_dates[tm_birth.tm_mon - 1]) |
return astro_names[tm_birth.tm_mon + 1]; |
|
{ |
|
|
return astro_names[tm_birth.tm_mon - 1]; |
|
|
} |
|
|
|
|
|
return astro_names[tm_birth.tm_mon]; |
|
| 51 |
} |
} |
| 52 |
|
|
| 53 |
static const int user_level_points[] = { |
static const int user_level_points[] = { |