Last change
on this file was 18, checked in by bird, 22 years ago |
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
File size:
781 bytes
|
Line | |
---|
1 | /* omflibdl.c (emx+gcc) -- Copyright (c) 1993-1995 by Eberhard Mattes */
|
---|
2 |
|
---|
3 | /* Mark a module of an OMFLIB as deleted. */
|
---|
4 |
|
---|
5 | #include <stdio.h>
|
---|
6 | #include <stdlib.h>
|
---|
7 | #include <string.h>
|
---|
8 | #include "omflib0.h"
|
---|
9 | #include <sys/omflib.h>
|
---|
10 |
|
---|
11 |
|
---|
12 | int omflib_mark_deleted (struct omflib *p, const char *name, char *error)
|
---|
13 | {
|
---|
14 | char buf[256];
|
---|
15 | int (*compare)(const char *s1, const char *s2);
|
---|
16 | int i;
|
---|
17 |
|
---|
18 | if (p->mod_count == -1 && omflib_make_mod_tab (p, error) != 0)
|
---|
19 | return -1;
|
---|
20 | omflib_module_name (buf, name);
|
---|
21 | compare = (p->flags & 1 ? strcmp : stricmp);
|
---|
22 | for (i = 0; i < p->mod_count; ++i)
|
---|
23 | if (compare (p->mod_tab[i].name, buf) == 0)
|
---|
24 | {
|
---|
25 | p->mod_tab[i].flags |= FLAG_DELETED;
|
---|
26 | return 0;
|
---|
27 | }
|
---|
28 | strcpy (error, "Module not found: ");
|
---|
29 | strcat (error, buf);
|
---|
30 | return 0;
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.