commands/at: changed K&R to ANSI style
Change-Id: Ifb12349bcf456ff303c15fdedda4ab853a148aff
This commit is contained in:
parent
bf5fef9dfc
commit
4b669956d1
@ -23,9 +23,7 @@ int getltim(char *t);
|
|||||||
int getlday(char *m, char *d);
|
int getlday(char *m, char *d);
|
||||||
int digitstring(char *s);
|
int digitstring(char *s);
|
||||||
|
|
||||||
int main(argc, argv, envp)
|
int main(int argc, char **argv, char **envp)
|
||||||
int argc;
|
|
||||||
char **argv, **envp;
|
|
||||||
{
|
{
|
||||||
int i, c, mask, ltim, year, lday = NODAY;
|
int i, c, mask, ltim, year, lday = NODAY;
|
||||||
char buf[64], job[30], pastjob[35], *dp, *sp;
|
char buf[64], job[30], pastjob[35], *dp, *sp;
|
||||||
@ -173,8 +171,7 @@ char **argv, **envp;
|
|||||||
/*-------------------------------------------------------------------------*
|
/*-------------------------------------------------------------------------*
|
||||||
* getltim() return((time OK) ? daytime : -1) *
|
* getltim() return((time OK) ? daytime : -1) *
|
||||||
*-------------------------------------------------------------------------*/
|
*-------------------------------------------------------------------------*/
|
||||||
int getltim(t)
|
int getltim(char *t)
|
||||||
char *t;
|
|
||||||
{
|
{
|
||||||
if (t[4] == '\0' && t[3] >= '0' && t[3] <= '9' &&
|
if (t[4] == '\0' && t[3] >= '0' && t[3] <= '9' &&
|
||||||
t[2] >= '0' && t[2] <= '5' && t[1] >= '0' && t[1] <= '9' &&
|
t[2] >= '0' && t[2] <= '5' && t[1] >= '0' && t[1] <= '9' &&
|
||||||
@ -187,8 +184,7 @@ char *t;
|
|||||||
/*-------------------------------------------------------------------------*
|
/*-------------------------------------------------------------------------*
|
||||||
* getlday() return ((date OK) ? yearday : -1) *
|
* getlday() return ((date OK) ? yearday : -1) *
|
||||||
*-------------------------------------------------------------------------*/
|
*-------------------------------------------------------------------------*/
|
||||||
int getlday(m, d)
|
int getlday(char *m, char *d)
|
||||||
char *m, *d;
|
|
||||||
{
|
{
|
||||||
int i, day, im;
|
int i, day, im;
|
||||||
static int cumday[] = {0, 0, 31, 60, 91, 121, 152,
|
static int cumday[] = {0, 0, 31, 60, 91, 121, 152,
|
||||||
@ -215,8 +211,7 @@ char *m, *d;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int digitstring(s)
|
int digitstring(char *s)
|
||||||
char *s;
|
|
||||||
{
|
{
|
||||||
while (*s >= '0' && *s <= '9') s++;
|
while (*s >= '0' && *s <= '9') s++;
|
||||||
return((*s == '\0') ? 1 : 0);
|
return((*s == '\0') ? 1 : 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user