From 53b0b6204387cf693280781355e0f27700f8eace Mon Sep 17 00:00:00 2001 From: didg Date: Tue, 26 Jan 2010 20:43:11 +0000 Subject: [PATCH] remove a 'discard const ...' warning in papd cups --- etc/papd/print_cups.c | 8 ++++---- etc/papd/print_cups.h | 2 +- include/atalk/unicode.h | 2 +- libatalk/unicode/charcnv.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/papd/print_cups.c b/etc/papd/print_cups.c index c0e29369..ca8644c7 100644 --- a/etc/papd/print_cups.c +++ b/etc/papd/print_cups.c @@ -1,5 +1,5 @@ /* - * $Id: print_cups.c,v 1.5 2009-10-29 11:35:58 didg Exp $ + * $Id: print_cups.c,v 1.6 2010-01-26 20:43:11 didg Exp $ * * Copyright 2004 Bjoern Fernhomberg. * @@ -60,13 +60,13 @@ static const char* cups_status_msg[] = { }; /* Local functions */ -static int convert_to_mac_name ( char *encoding, char * inptr, char * outptr, size_t outlen); +static int convert_to_mac_name ( const char *encoding, char * inptr, char * outptr, size_t outlen); static size_t to_ascii ( char *inbuf, char **outbuf); static int cups_mangle_printer_name ( struct printer *pr, struct printer *printers); static void cups_free_printer ( struct printer *pr); -char * cups_get_language (void) +const char * cups_get_language (void) { cups_lang_t *language; @@ -523,7 +523,7 @@ to_ascii ( char *inptr, char **outptr) * Returns: -1 on failure, length of name on success; outpr contains name in MacRoman */ -static int convert_to_mac_name ( char * encoding, char * inptr, char * outptr, size_t outlen) +static int convert_to_mac_name ( const char * encoding, char * inptr, char * outptr, size_t outlen) { char *outbuf; char *soptr; diff --git a/etc/papd/print_cups.h b/etc/papd/print_cups.h index 10a9ca70..dd9e7112 100644 --- a/etc/papd/print_cups.h +++ b/etc/papd/print_cups.h @@ -16,6 +16,6 @@ int cups_get_printer_status (struct printer *pr); int cups_print_job ( char *, char *, char *, char *, char *); struct printer * cups_autoadd_printers ( struct printer *, struct printer *); int cups_check_printer ( struct printer *, struct printer *, int); -char *cups_get_language ( void ); +const char *cups_get_language ( void ); #endif /* HAVE_CUPS */ #endif /* PAPD_CUPS_H */ diff --git a/include/atalk/unicode.h b/include/atalk/unicode.h index 21ef32f0..1cea56c4 100644 --- a/include/atalk/unicode.h +++ b/include/atalk/unicode.h @@ -143,6 +143,6 @@ extern size_t charset_decompose ( charset_t, char *, size_t, char *, size_t); extern size_t utf8_precompose ( char *, size_t, char *, size_t); extern size_t utf8_decompose ( char *, size_t, char *, size_t); -extern charset_t add_charset (char* name); +extern charset_t add_charset (const char* name); #endif /* _ATALK_UNICODE_H */ diff --git a/libatalk/unicode/charcnv.c b/libatalk/unicode/charcnv.c index 4cad3e9c..9e4ec67a 100644 --- a/libatalk/unicode/charcnv.c +++ b/libatalk/unicode/charcnv.c @@ -191,7 +191,7 @@ static void lazy_initialize_conv(void) } } -charset_t add_charset(char* name) +charset_t add_charset(const char* name) { static charset_t max_charset_t = NUM_CHARSETS-1; charset_t cur_charset_t = max_charset_t+1; -- 2.39.2