[nas] [PATCH] change remaining _AuConst -> const in clients
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Thu Jul 27 21:05:08 MDT 2006
Hi,
the attached patch changes the remaining _AuConst to const in the clients.
Erik
-------------- next part --------------
Index: clients/audio/auinfo/auinfo.c
===================================================================
--- clients/audio/auinfo/auinfo.c (revision 170)
+++ clients/audio/auinfo/auinfo.c (working copy)
@@ -58,10 +58,10 @@
static int maxwidth = 0; /* reset later */
#define TITLELEN 24
-static _AuConst char *TITLEFMT = "%-24s";
+static const char *TITLEFMT = "%-24s";
#define INDENTPADSTR " "
#define INDENTPADLEN (sizeof(INDENTPADSTR) - 1)
-static _AuConst char *INDENTPAD = INDENTPADSTR;
+static const char *INDENTPAD = INDENTPADSTR;
int
main (int argc, char **argv)
@@ -144,7 +144,7 @@
typedef struct _nametable {
int value;
- _AuConst char *name;
+ const char *name;
int len;
} NameTable;
@@ -311,7 +311,7 @@
static void _print_names (AuServer *aud, NameTable *tab, int nents,
- _AuConst char *title, int total,
+ const char *title, int total,
int (*getvaliter)(AuServer *, int, AuPointer),
AuPointer p, AuBool isbit)
{
@@ -347,7 +347,7 @@
for (i = 0; i < total; i++) {
int val = (*getvaliter) (aud, i, p);
NameTable *nt = _lookup_name (tab, nents, val, isbit);
- _AuConst char *f = fmt;
+ const char *f = fmt;
if (!nt)
continue;
Index: clients/audio/auwave/auwave.c
===================================================================
--- clients/audio/auwave/auwave.c (revision 170)
+++ clients/audio/auwave/auwave.c (working copy)
@@ -275,7 +275,7 @@
{
int i;
Widget w;
- _AuConst char *s = NULL;
+ const char *s = NULL;
MakeWidget(g->form, g->top, formWidgetClass, "form");
@@ -286,7 +286,7 @@
for (i = 0; i < AuServerNumWaveForms(g->aud); i++)
{
- _AuConst char *p;
+ const char *p;
p = AuWaveFormToString(AuServerWaveForm(g->aud, i));
MakeWidget(w, g->menu, smeBSBObjectClass, p);
Index: clients/audio/auctl/execute.c
===================================================================
--- clients/audio/auctl/execute.c (revision 170)
+++ clients/audio/auctl/execute.c (working copy)
@@ -73,7 +73,7 @@
typedef struct _NameValue {
- _AuConst char *name;
+ const char *name;
#ifndef mips
int (*proc) PROTO ((AuServer *, int, char **, AuPointer));
#else
@@ -82,7 +82,7 @@
} NameTable;
static int
-_do_parse (AuServer *aud, int argc, char **argv, _AuConst char *title,
+_do_parse (AuServer *aud, int argc, char **argv, const char *title,
NameTable *tab, int ntab, AuPointer data)
{
int i;
@@ -292,7 +292,7 @@
static int _execute_help (AuServer *aud, int argc, char **argv)
{
- static _AuConst char * _AuConst msg[] = {
+ static const char * const msg[] = {
"The following commands are supported:",
"",
" help print this message",
@@ -310,7 +310,7 @@
"",
(char *) 0
};
- _AuConst char * _AuConst *cpp;
+ const char * const *cpp;
for (cpp = msg; *cpp; cpp++)
printf ("%s\n", *cpp);
Index: clients/audio/audemo/audemo.c
===================================================================
--- clients/audio/audemo/audemo.c (revision 170)
+++ clients/audio/audemo/audemo.c (working copy)
@@ -1709,10 +1709,10 @@
}
static int
-sortRoutine(_AuConst void *ap, _AuConst void *bp)
+sortRoutine(const void *ap, const void *bp)
{
- _AuConst char **a = (_AuConst char **)ap;
- _AuConst char **b = (_AuConst char **)bp;
+ const char **a = (const char **)ap;
+ const char **b = (const char **)bp;
return strcmp(strrchr(*a, '/') + 1, strrchr(*b, '/') + 1);
}
More information about the Nas
mailing list