summaryrefslogtreecommitdiff
path: root/bmtoa.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-14 22:38:44 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-14 22:38:44 -0700
commit3fc1a649f1e81c4d93c6e00119267208877a8f02 (patch)
tree1a885fbee990c24b36345708e5127b3bcc6e5d7d /bmtoa.c
parenta8ee8e937e8d939522f18fa5723afea084221467 (diff)
Constify strings in bmtoa
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'bmtoa.c')
-rw-r--r--bmtoa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bmtoa.c b/bmtoa.c
index 985b04a..c20d44c 100644
--- a/bmtoa.c
+++ b/bmtoa.c
@@ -51,7 +51,7 @@ extern char *mktemp();
static char *ProgramName;
static void print_scanline (unsigned int width, unsigned int height,
- unsigned char *data, char *chars);
+ unsigned const char *data, const char *chars);
static void
usage (void)
@@ -118,9 +118,9 @@ copy_stdin (void)
int
main (int argc, char *argv[])
{
- char *filename = NULL;
+ const char *filename = NULL;
int isstdin = 0;
- char *chars = "-#";
+ const char *chars = "-#";
int i;
unsigned int width, height;
unsigned char *data;
@@ -130,7 +130,7 @@ main (int argc, char *argv[])
ProgramName = argv[0];
for (i = 1; i < argc; i++) {
- char *arg = argv[i];
+ const char *arg = argv[i];
if (arg[0] == '-') {
switch (arg[1]) {
@@ -177,12 +177,12 @@ main (int argc, char *argv[])
static void
print_scanline (unsigned int width,
unsigned int height,
- unsigned char *data,
- char *chars)
+ unsigned const char *data,
+ const char *chars)
{
- unsigned char *dp = data;
+ unsigned const char *dp = data;
int row, column;
- static unsigned char masktable[] = {
+ static unsigned const char masktable[] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
int padded = ((width & 7) != 0);