Scanf behavior

From: James Lamanna (james.lamanna@appliedminds.com)
Date: Fri Feb 07 2003 - 12:12:46 EST


I was looking at addressing bug #189 on bugzilla which calls for scanf
to respect field_widths for numeric arguments (i.e. %2hd)
2 semantic issues I thought of:

1) Should the field width ignore any number modifiers ( '0x' for hex,
'0' for octal, '-' for negatives) ?
For example a field_width of 1 on the string "0x5F" should return 0 or
0x5
(I would think the latter is much more appropriate).

2) What about a field_width of 0? Always return 0?

Thanks,
--James

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:23 EST