diff options
author | Lutz Mueller <lutz@users.sourceforge.net> | 2002-01-15 12:29:46 +0000 |
---|---|---|
committer | Lutz Mueller <lutz@users.sourceforge.net> | 2002-01-15 12:29:46 +0000 |
commit | 603159e7428b1f7bbdab398e7efff531c40e45e3 (patch) | |
tree | f5b615838e55daf8413d8ffe517e86e1d29f71a3 /frontends | |
parent | d7e780db499e9a362d99d8079055e3e155b53458 (diff) | |
download | libgphoto2-603159e7428b1f7bbdab398e7efff531c40e45e3.tar.gz |
2002-01-15 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
More GPContext changes:
* libgphoto2/gphoto2-context.[c,h]: Add message functionality
* camlibs: Use it.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3886 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/command-line/main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/frontends/command-line/main.c b/frontends/command-line/main.c index 90fe200a7..bf1010d20 100644 --- a/frontends/command-line/main.c +++ b/frontends/command-line/main.c @@ -1180,7 +1180,6 @@ set_globals (void) CHECK_RESULT (gp_camera_set_port_speed (glob_camera, glob_speed)); gp_camera_set_status_func (glob_camera, status_func, NULL); - gp_camera_set_message_func (glob_camera, message_func, NULL); return (GP_OK); } @@ -1249,6 +1248,19 @@ ctx_cancel_func (GPContext *context, void *data) return (GP_CONTEXT_FEEDBACK_OK); } +static void +ctx_message_func (GPContext *context, const char *format, va_list args, + void *data) +{ + int c; + + vprintf (format, args); + printf ("\n"); + printf (_("Press any key to continue.\n")); + fflush(stdout); + c = fgetc (stdin); +} + static int init_globals (void) { @@ -1277,6 +1289,7 @@ init_globals (void) ctx_progress_stop_func, NULL); gp_context_set_error_func (glob_context, ctx_error_func, NULL); gp_context_set_status_func (glob_context, ctx_status_func, NULL); + gp_context_set_message_func (glob_context, ctx_message_func, NULL); return GP_OK; } |