Olaf Seibert e4ec481d3d Add RT11 macro libraries.
Hopefully they won't open as RSX ones, because then they still won't work.
Can't test this now.
2017-04-27 20:34:07 +02:00

52 lines
773 B
C

#include <stdlib.h>
#include <string.h>
#include "util.h"
#include "mlb.h"
MLB_VTBL *mlb_vtbls[] = {
&mlb_rsx_vtbl,
&mlb_rt11_vtbl,
NULL
};
MLB *mlb_open(
char *name,
int allow_object_library)
{
MLB_VTBL *vtbl;
MLB *mlb = NULL;
int i;
for (i = 0; (vtbl = mlb_vtbls[i]); i++) {
mlb = vtbl->mlb_open(name, allow_object_library);
if (mlb != NULL) {
mlb->name = memcheck(strdup(name));
break;
}
}
return mlb;
}
BUFFER *mlb_entry(
MLB *mlb,
char *name)
{
return mlb->vtbl->mlb_entry(mlb, name);
}
void mlb_close(
MLB *mlb)
{
free(mlb->name);
mlb->vtbl->mlb_close(mlb);
}
void mlb_extract(
MLB *mlb)
{
mlb->vtbl->mlb_extract(mlb);
}