parse_bsd.c revision 355b4669e025ff377602b6fc7caaf30dbc218371
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1998-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
#include <libintl.h>
#include "parse.h"
#define MERR_NOMEM "ERROR: no memory\n"
static job_t *
parse_bsd_entry(char *data)
{
char *p;
return (NULL);
}
/*
* 1st line...
* user: rank [job (ID)(host)]\n
*/
return (NULL);
return (NULL);
while (isspace(*p)) p++;
while (isdigit(*(++p)));
while (isspace(*p)) p++;
/*
* rest o lines
* file size bytes\n
*/
do {
if (p != NULL) {
return (NULL);
}
!= NULL)
if (isdigit(p[0])) {
break;
}
(void *)file);
}
} while (p != NULL);
return (tmp);
}
/*ARGSUSED*/
{
char *p;
return (NULL);
}
return (tmp);
return (tmp);
}
*(p++) = NULL;
data = ++p;
- strlen("ready and printing")),
"ready and printing") == 0)
do { /* parse jobs */
char *q = data;
*(++p) = NULL;
data = ++p;
}
break;
(void *)job);
} while (p != NULL);
return (tmp);
}