Skip to content
Snippets Groups Projects
Commit 5cee9b21 authored by Steven Murray's avatar Steven Murray Committed by Steven Murray
Browse files

Removed compile-time dependency between the smc command-line tool in the rmc

cirectory and the tape header file h/Ctape.h
parent 57151a2f
Branches
Tags
No related merge requests found
......@@ -13,6 +13,7 @@
#ifndef _RMC_API_H
#define _RMC_API_H
#include "h/osdep.h"
#include "h/smc_struct.h"
/* function prototypes */
......
......@@ -9,19 +9,28 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "h/Ctape.h"
#include "h/rbtsubr_constants.h"
#include "h/rmc_api.h"
#include "h/serrno.h"
#include "h/smc_constants.h"
#include "h/getconfent.h"
#include <ctype.h>
/* exit codes */
#define USERR 1
extern char *optarg;
static void usage(const char *const cmd)
static void smc_str_upper(char *const s) {
char *c = NULL;
for(c = s; *c; c++) {
*c = toupper(*c);
}
}
static void smc_usage(const char *const cmd)
{
fprintf (stderr, "usage: %s ", cmd);
fprintf (stderr,
......@@ -353,7 +362,7 @@ int main(const int argc,
errflg++;
} else {
strcpy (vid, optarg);
UPPER (vid);
smc_str_upper (vid);
}
break;
case 'v':
......@@ -381,7 +390,7 @@ int main(const int argc,
errflg++;
}
if (errflg || req_type == 0) {
usage (argv[0]);
smc_usage (argv[0]);
exit (USERR);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment