dear friends,
in my code, i am testing the machine system using popen command.
but for testing , i have to write a casceding if-else-if list as
if (strncmp(sysptr , "i686",4)== 0)
{
t=1;
}
else {
if (strncmp(sysptr , "i386",4)== 0) {
t=1;
}
else {
t=0;
}
}
is it possible to test it as it is done in configure file? eg:
case "$host_arch " in
i[3-9]86|x86|x86pc|k5 |k6|k6-2|k6-3|pentium*|athl on*|i586-i686)
return 0 ;;
*) return 1 ;;
instead of those casceding if-else?
in my code, i am testing the machine system using popen command.
but for testing , i have to write a casceding if-else-if list as
if (strncmp(sysptr , "i686",4)== 0)
{
t=1;
}
else {
if (strncmp(sysptr , "i386",4)== 0) {
t=1;
}
else {
t=0;
}
}
is it possible to test it as it is done in configure file? eg:
case "$host_arch " in
i[3-9]86|x86|x86pc|k5 |k6|k6-2|k6-3|pentium*|athl on*|i586-i686)
return 0 ;;
*) return 1 ;;
instead of those casceding if-else?
Comment