lkml.org 
[lkml]   [2003]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectScanf behavior
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.060 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site