Revision 6899d5dd

View differences:

NEWS
6 6
    * Received header is also used for classification now.
7 7
    * The verbose mode has several levels now.
8 8
    * Sylfilter command: an option to specify database directory was added.
9
    * Sylfilter command: -V (print version) option was added.
9 10

  
10 11
* 0.5 (2011/10/13)
11 12

  
README
64 64
Show help message
65 65

  
66 66
  $ sylfilter -h
67
  $ sylfilter --help
67 68

  
68 69

  
69 70
Usage with Sylpheed
src/sylfilter.c
50 50
static int learn_filter(int mode, const char *file);
51 51
static int test_filter(int mode, const char *file);
52 52
static void print_message_data(XMessageData *msgdata);
53
static void version(void);
53 54
static void usage(void);
54 55

  
55 56

  
......
155 156
		} else if (!strcmp(argv[i], "-h")) {
156 157
			usage();
157 158
			return 0;
159
		} else if (!strcmp(argv[i], "-V")) {
160
			version();
161
			return 0;
158 162
		}
159 163
	}
160 164

  
......
411 415
	}
412 416
}
413 417

  
414
static void usage(void)
418
static void version(void)
415 419
{
416 420
	printf("SylFilter (tentative name) version " VERSION "\n");
421
}
422

  
423
static void usage(void)
424
{
425
	version();
417 426
	printf("\n");
418 427
	printf("Usage: sylfilter [options] message [message ...]\n");
419 428
	printf("\n");
......
438 447
	printf("  -B  do not bias probability for clean mail\n");
439 448
	printf("      (Paul/Naive method only, may increase false-positive)\n");
440 449
	printf("\n");
450
	printf("  -V  print version\n");
441 451
	printf("  -h, --help\n");
442 452
	printf("      print this help message\n");
443 453
	printf("\n");
......
452 462
	printf("  2   uncertain\n");
453 463
	printf("  127 other errors\n");
454 464
	printf("\n");
455
	printf("Database will be created at %s/*.db\n",
465
	printf("Default database location: %s/*.db\n",
456 466
	       xfilter_utils_get_default_base_dir());
457 467
	printf("\n");
458 468
	printf("Available key-value stores:\n");

Also available in: Unified diff