version 1.20, 2014/07/02 06:32:07 |
version 1.21, 2014/08/17 22:43:07 |
|
|
name=$1 |
name=$1 |
grep=$2 |
grep=$2 |
file=$3 |
file=$3 |
|
format=${4-%#x} |
|
|
cat <<_EOF_ |
cat <<_EOF_ |
/* AUTO */ |
/* AUTO */ |
|
|
$name (int arg) |
$name (int arg) |
{ |
{ |
int or = 0; |
int or = 0; |
printf("%#x<", arg); |
printf("$format<", arg); |
_EOF_ |
_EOF_ |
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ |
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ |
$include_dir/$file | \ |
$include_dir/$file | \ |
|
|
name=$1 |
name=$1 |
grep=$2 |
grep=$2 |
file=$3 |
file=$3 |
|
format=${4-%#x} |
|
|
cat <<_EOF_ |
cat <<_EOF_ |
/* AUTO */ |
/* AUTO */ |
|
|
printf("0<>"); |
printf("0<>"); |
return; |
return; |
} |
} |
printf("%#x<", arg); |
printf("$format<", arg); |
_EOF_ |
_EOF_ |
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ |
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ |
$include_dir/$file | \ |
$include_dir/$file | \ |
|
|
|
|
_EOF_ |
_EOF_ |
|
|
auto_orz_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "sys/stat.h" |
auto_orz_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "sys/stat.h" "%#o" |
auto_fflags_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" |
auto_fflags_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" |
auto_orz_type "atflagsname" "AT_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" |
auto_orz_type "atflagsname" "AT_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" |
auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" |
auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" |