summaryrefslogtreecommitdiffstats
path: root/src/util/ss/mk_cmds.c
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-12-07 22:36:41 +0000
committerTom Yu <tlyu@mit.edu>2009-12-07 22:36:41 +0000
commitac911f663389980be59a0f9ee98f062e6c627658 (patch)
treec423ac7174c1a82a107013894a6944a506e68774 /src/util/ss/mk_cmds.c
parent741938feb12538b659a36d7e0329efe6a5550669 (diff)
downloadkrb5-ac911f663389980be59a0f9ee98f062e6c627658.tar.gz
krb5-ac911f663389980be59a0f9ee98f062e6c627658.tar.xz
krb5-ac911f663389980be59a0f9ee98f062e6c627658.zip
Mark and reindent util, with some exceptions
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23455 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/ss/mk_cmds.c')
-rw-r--r--src/util/ss/mk_cmds.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/util/ss/mk_cmds.c b/src/util/ss/mk_cmds.c
index 8e29ccfb37..6488f7c2da 100644
--- a/src/util/ss/mk_cmds.c
+++ b/src/util/ss/mk_cmds.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* make_commands.c
*
@@ -37,26 +38,26 @@ int main(argc, argv)
char *path, *p, *q;
if (argc != 2) {
- fputs("Usage: ", stderr);
- fputs(argv[0], stderr);
- fputs("cmdtbl.ct\n", stderr);
- exit(1);
+ fputs("Usage: ", stderr);
+ fputs(argv[0], stderr);
+ fputs("cmdtbl.ct\n", stderr);
+ exit(1);
}
path = malloc(strlen(argv[1])+4); /* extra space to add ".ct" */
strcpy(path, argv[1]);
p = strrchr(path, '/');
if (p == (char *)NULL)
- p = path;
+ p = path;
else
- p++;
+ p++;
p = strrchr(p, '.');
if (p == (char *)NULL || strcmp(p, ".ct"))
- strcat(path, ".ct");
+ strcat(path, ".ct");
yyin = fopen(path, "r");
if (!yyin) {
- perror(path);
- exit(1);
+ perror(path);
+ exit(1);
}
p = strrchr(path, '.');
@@ -69,8 +70,8 @@ int main(argc, argv)
output_file = fopen(c_file, "w+");
if (!output_file) {
- perror(c_file);
- exit(1);
+ perror(c_file);
+ exit(1);
}
fputs("/* ", output_file);
@@ -83,20 +84,20 @@ int main(argc, argv)
/* parse it */
result = yyparse();
/* put file descriptors back where they belong */
- fclose(yyin); /* bye bye input file */
- fclose(output_file); /* bye bye output file */
+ fclose(yyin); /* bye bye input file */
+ fclose(output_file); /* bye bye output file */
return result;
}
yyerror(s)
- char *s;
+char *s;
{
fputs(s, stderr);
#ifdef NO_YYLINENO
fprintf(stderr, "\nLast token was '%s'\n", last_token);
#else
fprintf(stderr, "\nLine %d; last token was '%s'\n",
- yylineno, last_token);
+ yylineno, last_token);
#endif
}