| 1 |
– |
/* Copyright (c) 1996 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* Parse an MGF file, converting or discarding unsupported entities |
| 6 |
|
*/ |
| 7 |
|
|
| 8 |
|
#include <stdio.h> |
| 12 |
– |
#include <math.h> |
| 9 |
|
#include <stdlib.h> |
| 10 |
+ |
#include <math.h> |
| 11 |
|
#include <ctype.h> |
| 12 |
|
#include <string.h> |
| 13 |
|
#include "parser.h" |
| 235 |
|
return(MG_OK); |
| 236 |
|
} |
| 237 |
|
/* get name relative to this context */ |
| 238 |
< |
if (mg_file != NULL && (cp = strrchr(mg_file->fname, '/')) != NULL) { |
| 238 |
> |
if (fn[0] != '/' && mg_file != NULL && |
| 239 |
> |
(cp = strrchr(mg_file->fname, '/')) != NULL) { |
| 240 |
|
strcpy(ctx->fname, mg_file->fname); |
| 241 |
|
strcpy(ctx->fname+(cp-mg_file->fname+1), fn); |
| 242 |
|
} else |