X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=bin%2Funiconv%2Funiconv.c;h=b9a2fc45c87b56e4fdccd2954cd34d32d36ed626;hb=b1338b390059f9f7019edc1080833f5002e948d8;hp=850c45d79747d13b77a15ed1bc3ca0d488efa3bf;hpb=5ab4f0463c00263b3d842f1e1a3648ecf35b4d65;p=netatalk.git diff --git a/bin/uniconv/uniconv.c b/bin/uniconv/uniconv.c index 850c45d7..b9a2fc45 100644 --- a/bin/uniconv/uniconv.c +++ b/bin/uniconv/uniconv.c @@ -60,7 +60,7 @@ char* to_charset; static charset_t ch_mac; char* mac_charset; static int usedots = 0; -static u_int16_t conv_flags = 0; +static uint16_t conv_flags = 0; static int dry_run = 0; static int verbose=0; char *cnid_type; @@ -149,7 +149,7 @@ static char *convert_name(char *name, struct stat *st, cnid_t cur_did) size_t outlen = 0; unsigned char *p,*q; int require_conversion = 0; - u_int16_t flags = conv_flags; + uint16_t flags = conv_flags; cnid_t id; p = (unsigned char *)name; @@ -184,8 +184,8 @@ static char *convert_name(char *name, struct stat *st, cnid_t cur_did) outlen = convert_charset(ch_to, ch_to, ch_mac, (char *)p, strlen((char *)p), (char *)q, sizeof(buffer) -2, &flags); if ((size_t)-1 == outlen) { /* it's not UTF8... */ - fprintf(stderr, "ERROR: conversion from '%s' to '%s' for '%s' in DID %u failed!!!\n", - from_charset, to_charset, name, ntohl(cur_did)); + fprintf(stderr, "ERROR: conversion from '%s' to '%s' for '%s' in DID %u failed!\n", + from_charset, to_charset, name, ntohl(cur_did)); return name; } @@ -389,7 +389,7 @@ static int init(char* path) { DIR* startdir; - if (NULL == (cdb = cnid_open (path, 0, cnid_type, 0, NULL, NULL)) ) { + if (NULL == (cdb = cnid_open (path, 0, cnid_type, 0, "localhost", "4700", NULL, NULL)) ) { fprintf (stderr, "ERROR: cannot open CNID database in '%s'\n", path); fprintf (stderr, "ERROR: check the logs for reasons, aborting\n"); return -1; @@ -441,11 +441,11 @@ static void help (void) fprintf (stdout, "\t-V\tPrint version and exit\n"); fprintf (stdout, "\t-h\tThis help screen\n\n"); fprintf (stdout, "WARNING:\n"); - fprintf (stdout, " Setting the wrong options might render your data unusable!!!\n"); + fprintf (stdout, " Setting the wrong options might render your data unusable!\n"); fprintf (stdout, " Make sure you know what you are doing. Always backup your data first.\n\n"); fprintf (stdout, " It is *strongly* recommended to do a `dry run' first and to check the\n"); fprintf (stdout, " output for conversion errors.\n"); - fprintf (stdout, " USE AT YOUR OWN RISK!!!\n\n"); + fprintf (stdout, " USE AT YOUR OWN RISK!\n\n"); }