[PATCH] Add fseek to ui-file
Tom Tromey
tromey@redhat.com
Thu Dec 6 21:48:00 GMT 2012
>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
Hui> And stdio_file_fseek has a place different from the other stdio_file
Hui> functions. It check the return of fseek. If it got error, it will
Hui> throw error.
Hui> If you think it is OK, I will post patch for other stdio_file functions.
Hui> If not, it will update this patch.
Thanks.
Hui> void
Hui> +set_ui_file_fseek (struct ui_file *file, ui_file_fseek_ftype *fseek)
Hui> +{
Hui> + file->to_fseek = fseek;
I found the argument name 'fseek' confusing here, since this mimics a
global function of the same name. Could you rename the argument?
Hui> +static void stdio_file_fseek (struct ui_file * file, long offset, int whence)
Hui> +{
Newline after 'void'.
I wonder whether the null fseek ought to unconditionally throw an
exception. It seems to me that it can't really be successful.
I think this should go in conditionally based on the other patches -- no
need to put it in if it turns out you can't use ui_file after all for
some reason.
Tom
More information about the Gdb-patches
mailing list