This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Dec 12, 2012 at 11:38 PM, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes: > > Hui> +static int > Hui> +null_file_fseek (struct ui_file *stream, long offset, int whence) > Hui> +{ > Hui> + return 0; > Hui> +} > > Why does this return success rather than error? > It seems strange to report success when nothing actually happens. > > Hui> +typedef int (ui_file_fseek_ftype) (struct ui_file * stream, long offset, > Hui> + int whence); > > Extra space after "*". > > Hui> +extern int ui_file_fseek (struct ui_file * file, long offset, int whence); > > Here too. > > Tom Post a new version according to your comments. Thanks, Hui 2012-12-13 Hui Zhu <hui_zhu@mentor.com> * ui-file.c (ui_file): Add to_fseek. (ui_file_new): Call set_ui_file_fseek. (null_file_fseek, ui_file_fseek, set_ui_file_fseek, stdio_file_fseek): New functions. (stdio_file_new): Call set_ui_file_fseek. * ui-file.h (ui_file_fseek_ftype): New typedef. (set_ui_file_fseek, ui_file_fseek): New externs.
Attachment:
ui-file-fseek.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |