[BACK]Return to refuse_opt.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / librefuse

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/librefuse/refuse_opt.c between version 1.1 and 1.2

version 1.1, 2007/02/28 16:23:00 version 1.2, 2007/02/28 21:48:46
Line 42 
Line 42 
 #include "fuse_opt.h"  #include "fuse_opt.h"
   
 #ifdef FUSE_OPT_DEBUG  #ifdef FUSE_OPT_DEBUG
 #define DPRINTF(x)      do { printf x; } while (0)  #define DPRINTF(x)      do { printf x; } while ( /* CONSTCOND */ 0)
 #else  #else
 #define DPRINTF(x)  #define DPRINTF(x)
 #endif  #endif
Line 194  fuse_opt_popt(struct fuse_opt_option *fo
Line 194  fuse_opt_popt(struct fuse_opt_option *fo
         return EXIT_SUCCESS;          return EXIT_SUCCESS;
 }  }
   
   /* ARGSUSED1 */
 int  int
 fuse_opt_parse(struct fuse_args *args, void *data,  fuse_opt_parse(struct fuse_args *args, void *data,
         const struct fuse_opt *opts, fuse_opt_proc_t proc)          const struct fuse_opt *opts, fuse_opt_proc_t proc)
Line 218  fuse_opt_parse(struct fuse_args *args, v
Line 219  fuse_opt_parse(struct fuse_args *args, v
                 if (buf[0] != '-') {                  if (buf[0] != '-') {
   
                         foo.key = FUSE_OPT_KEY_NONOPT;                          foo.key = FUSE_OPT_KEY_NONOPT;
                         if ((rv = proc(foo.data, foo.option, foo.key, args)))                          rv = proc(foo.data, foo.option, foo.key, args);
                           if (rv != 0)
                                 break;                                  break;
   
                 /* -o was specified... */                  /* -o was specified... */
Line 238  fuse_opt_parse(struct fuse_args *args, v
Line 240  fuse_opt_parse(struct fuse_args *args, v
                                 foo.option = args->argv[i];                                  foo.option = args->argv[i];
                         }                          }
   
                         if ((rv = fuse_opt_popt(&foo, opts)))                          rv = fuse_opt_popt(&foo, opts);
                           if (rv != 0)
                                 break;                                  break;
   
                 /* help/version/verbose argument */                  /* help/version/verbose argument */
Line 247  fuse_opt_parse(struct fuse_args *args, v
Line 250  fuse_opt_parse(struct fuse_args *args, v
                          * check if the argument matches                           * check if the argument matches
                          * with any template in opts.                           * with any template in opts.
                          */                           */
                         if ((rv = fuse_opt_popt(&foo, opts))) {                          rv = fuse_opt_popt(&foo, opts);
                           if (rv != 0) {
                                 break;                                  break;
                         } else {                          } else {
                                 DPRINTF(("%s: foo.fop->templ='%s' "                                  DPRINTF(("%s: foo.fop->templ='%s' "
Line 270  fuse_opt_parse(struct fuse_args *args, v
Line 274  fuse_opt_parse(struct fuse_args *args, v
                                         break;                                          break;
                                 } else {                                  } else {
                                         /* process verbose argument */                                          /* process verbose argument */
                                         if ((rv = proc(foo.data, foo.option,                                          rv = proc(foo.data, foo.option,
                                                        foo.key, args)))                                                         foo.key, args);
                                           if (rv != 0)
                                                 break;                                                  break;
                                 }                                  }
                         }                          }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb <webmaster@jp.NetBSD.org>