]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'no_colon_separators'
authorAndre <maan@p133.(none)>
Thu, 9 Mar 2006 15:36:56 +0000 (16:36 +0100)
committerAndre <maan@p133.(none)>
Thu, 9 Mar 2006 15:36:56 +0000 (16:36 +0100)
1  2 
filter.c
filter_chain.c

diff --combined filter.c
index 37c1c4305e7c82b8140bc4791046f777e9e88662,2cd6d09d4580ae89171e4213ab9a4abfd5df9748..46b48251d757c91360126d927469deab08769e88
+++ b/filter.c
@@@ -95,7 -95,7 +95,7 @@@ static void open_filters(void
  static int parse_config(int argc, char *argv[])
  {
        static char *cf; /* config file */
-         struct stat statbuf;
+       struct stat statbuf;
        int i;
  
        if (cmdline_parser(argc, argv, &conf))
                cf = make_message("%s/.paraslash/filter.conf", home);
                free(home);
        }
-         if (!stat(cf, &statbuf)) {
+       if (!stat(cf, &statbuf)) {
                if (cmdline_parser_configfile(cf, &conf, 0, 0, 0))
                        return -E_FILTER_SYNTAX;
        }
                return 1;
        printf("available filters: ");
        for (i = 0; filters[i].name; i++)
-               printf("%s%s", i? " " : "", filters[i].name);
-       printf("\nTry para_filter -f<filtername>:-h for help on <filtername>\n");
+               printf("%s%s%s", i? " " : "", filters[i].name,
+                       filters[i].parse_config? "*": "");
+       printf("\nFilters marked with \"*\" have further command line options. Try\n"
+               "\tpara_filter -f '<filtername> -h'\nfor more information.\n");
        exit(EXIT_SUCCESS);
  }
  
@@@ -141,7 -143,7 +143,7 @@@ int main(int argc, char *argv[]
  again:
        if (*il < INBUF_SIZE && !eof) {
                ret  = read(STDIN_FILENO, ib + *il, INBUF_SIZE - *il);
 -              PARA_DEBUG_LOG("read %d/%d\n", ret, INBUF_SIZE - *il);
 +              PARA_DEBUG_LOG("read %d/%zd\n", ret, INBUF_SIZE - *il);
                if (ret < 0)
                        goto out;
                if (!ret)
        converted = ret;
        if (*ol) {
                ret = write(STDOUT_FILENO, ob, *ol);
 -              PARA_DEBUG_LOG("wrote %d/%d\n", ret, *ol);
 +              PARA_DEBUG_LOG("wrote %d/%zd\n", ret, *ol);
                if (ret <= 0)
                        goto out;
                *ol -= ret;
                if (*ol) {
 -                      PARA_NOTICE_LOG("short write: %d bytes left\n", *ol);
 +                      PARA_NOTICE_LOG("short write: %zd bytes left\n", *ol);
                        memmove(ob, ob + ret, *ol);
                }
        }
diff --combined filter_chain.c
index 6265f19c931dc26b53a76eecfd887164961c928d,312180f8afe539e72ad741c37e9c5be2107c7602..42db37830718f3618bcb0d34c25cdb04bca60e05
@@@ -123,7 -123,7 +123,7 @@@ again
                int ret;
                if (*loaded && fn->loaded < fn->bufsize) {
                        size_t old_fn_loaded = fn->loaded;
 -                      PARA_DEBUG_LOG("fc %p loaded: %d, calling %s convert\n", fci, *loaded, fn->filter->name);
 +                      PARA_DEBUG_LOG("fc %p loaded: %zd, calling %s convert\n", fci, *loaded, fn->filter->name);
                        ret = fn->filter->convert(ib, *loaded, fn);
                        if (ret < 0) {
                                if (!fci->error)
                        *loaded -= ret;
                        conv += ret;
                        if (*loaded && ret) {
 -                              PARA_DEBUG_LOG("moving %d bytes in input buffer for %s filter\n",
 +                              PARA_DEBUG_LOG("moving %zd bytes in input buffer for %s filter\n",
                                        *loaded,  fn->filter->name);
                                memmove(ib, ib + ret, *loaded);
                        }
@@@ -211,7 -211,7 +211,7 @@@ static int parse_filter_args(int filter
  /**
   * check the filter command line options
   *
-  * \param fa the command line options (values separated by colons)
+  * \param fa the command line options
   * \param conf points to the filter configuration upon successful return
   *
   * Check if \a fa starts with a the name of a supported filter, followed by