- filname = cp = acp;
- if (cp[0]=='-' && cp[1]=='l') {
- char *locfilname = "/usr/local/lib/libxxxxxxxxxxxxxxx";
- if(cp[2] == '\0')
- cp = "-la";
- filname = "/usr/lib/libxxxxxxxxxxxxxxx";
- for(c=0; cp[c+2]; c++) {
- filname[c+12] = cp[c+2];
- locfilname[c+18] = cp[c+2];
- }
- filname[c+12] = locfilname[c+18] = '.';
- filname[c+13] = locfilname[c+19] = 'a';
- filname[c+14] = locfilname[c+20] = '\0';
- if ((infil = open(filname+4, 0)) >= 0) {
- filname += 4;
- } else if ((infil = open(filname, 0)) < 0) {
- filname = locfilname;
- }
- }
- if (infil == -1 && (infil = open(filname, 0)) < 0)
+ filname = acp;
+ if (filname[0] == '-' && filname[1] == 'l')
+ infil = libopen(filname + 2, O_RDONLY);
+ else
+ infil = open(filname, O_RDONLY);
+ if (infil < 0)