Return to apprentice.c CVS log | Up to [local] / src / usr.bin / file |
version 1.13, 2002/03/14 06:51:41 | version 1.14, 2002/06/05 13:46:44 | ||
---|---|---|---|
|
|
||
/* | /* | ||
* extend the sign bit if the comparison is to be signed | * extend the sign bit if the comparison is to be signed | ||
*/ | */ | ||
uint32 | uint32_t | ||
signextend(m, v) | signextend(m, v) | ||
struct magic *m; | struct magic *m; | ||
uint32 v; | uint32_t v; | ||
{ | { | ||
if (!(m->flag & UNSIGNED)) | if (!(m->flag & UNSIGNED)) | ||
switch(m->type) { | switch(m->type) { | ||
|
|
||
case LONG: | case LONG: | ||
case BELONG: | case BELONG: | ||
case LELONG: | case LELONG: | ||
v = (int32) v; | v = (int32_t) v; | ||
break; | break; | ||
case STRING: | case STRING: | ||
break; | break; |