void init_tdat(struct TapeDat *tdat, char *buffer)
{
int  i;

    memset(buffer, ' ', BUF_LENGTH);
    for (i = 0; i < TITLES_PER_SIDE; i++)
        {
        buffer[(i + 1) * TITLE_LENGTH - 1] = '\0';
        tdat->sidea[i] = buffer + i * TITLE_LENGTH;
        buffer[TITLES_PER_SIDE * TITLE_LENGTH + (i + 1) * TITLE_LENGTH - 1] = '\0';
        tdat->sideb[i] = buffer + TITLES_PER_SIDE * TITLE_LENGTH + i * TITLE_LENGTH;
        }
    for (i = 0; i < LABELS; i++)
        {
        buffer[TBUF_LENGTH + (i + 1) * LABEL_LENGTH - 1] = '\0';
        tdat->label[i] = buffer + TBUF_LENGTH + i * LABEL_LENGTH;
        }
    for (i = 0; i < INFOS; i++)
        {
        buffer[TLBUF_LENGTH + (i + 1) * INFO_LENGTH - 1] = '\0';
        tdat->info[i] = buffer + TLBUF_LENGTH + i * INFO_LENGTH;
        }
    tdat->size.line1_bold = tdat->size.line2_bold = 0;
}

void clear_sides(char *buffer)
{
int  i;

    memset(buffer, ' ', TBUF_LENGTH);
    for (i = 0; i < TITLES_PER_SIDE; i++)
        {
        buffer[(i + 1) * TITLE_LENGTH - 1] = '\0';
        buffer[TITLES_PER_SIDE * TITLE_LENGTH + (i + 1) * TITLE_LENGTH - 1] = '\0';
        }
}
 
void write_textjam1(struct RastPort *rp, ULONG x, ULONG y, ULONG v, ULONG h, char *text)
{
struct IntuiText i_text;

    i_text.FrontPen = v;
    i_text.BackPen = h;
    i_text.DrawMode = JAM1;
    i_text.LeftEdge = 0;
    i_text.TopEdge = 0;
    i_text.ITextFont = NULL;
    i_text.IText = text;
    i_text.NextText = NULL;
    PrintIText(rp, &i_text, x, y);
}

void write_textjam2(struct RastPort *rp, ULONG x, ULONG y, ULONG v, ULONG h, char *text)
{
struct IntuiText i_text;

    i_text.FrontPen = v;
    i_text.BackPen = h;
    i_text.DrawMode = JAM2;
    i_text.LeftEdge = 0;
    i_text.TopEdge = 0;
    i_text.ITextFont = NULL;
    i_text.IText = text;
    i_text.NextText = NULL;
    PrintIText(rp, &i_text, x, y);
}

void write_ctext(struct Window *wp, ULONG y, ULONG v, ULONG h, char *text)
{
struct IntuiText i_text;
ULONG            x;

    i_text.FrontPen = v;
    i_text.BackPen = h;
    i_text.DrawMode = JAM2;
    i_text.LeftEdge = 0;
    i_text.TopEdge = 0;
    i_text.ITextFont = NULL;
    i_text.IText = text;
    i_text.NextText = NULL;
    x = (wp->Width - (wp->RPort->Font->tf_XSize * strlen(text))) / 2;
    PrintIText(wp->RPort, &i_text, x, y);
}

void write_ctext3d(struct Window *wp, ULONG y, ULONG v, ULONG h, char *text)
{
struct IntuiText i_text;
ULONG            x;

    i_text.FrontPen = h;
    i_text.BackPen = 0;
    i_text.DrawMode = JAM2;
    i_text.LeftEdge = 0;
    i_text.TopEdge = 0;
    i_text.ITextFont = NULL;
    i_text.IText = text;
    i_text.NextText = NULL;
    x = (wp->Width - (wp->RPort->Font->tf_XSize * strlen(text))) / 2;
    PrintIText(wp->RPort, &i_text, x + 1, y + 1);
    i_text.FrontPen = v;
    i_text.DrawMode = JAM1;
    PrintIText(wp->RPort, &i_text, x, y);
}

void write_bigtext(struct IntDat *idat, ULONG x, ULONG y, ULONG v, ULONG h, char *text)
{
struct RastPort  *rp;
struct IntuiText i_text;
ULONG            font_x,
                 font_y;
char             btext[2];
WORD             x_step;
int              i;

    rp = idat->mainwin->RPort;
    font_y = rp->Font->tf_YSize;
    font_x = rp->Font->tf_XSize;
    if (idat->oldlook)
        SetAPen(rp, 1);
    else
        SetAPen(rp, 0);
    RectFill(rp, x, y, x - 1 + (LABEL_LENGTH - 1) * font_x, y - 1 + font_y);
    for (i = 0; i < BIGLABEL_LENGTH; i++)
    {
        btext[0] = text[i];
        btext[1] = '\0';
        i_text.FrontPen = v;
        i_text.BackPen = h;
        i_text.DrawMode = JAM2;
        i_text.LeftEdge = 0;
        i_text.TopEdge = 0;
        i_text.ITextFont = NULL;
        i_text.IText = btext;
        i_text.NextText = NULL;
        x_step = x + i * font_x * 1.456521739;
        PrintIText(rp, &i_text, x_step, y);
    }
}

void box_rec(struct Window *wp, ULONG x1, ULONG y1, ULONG x2, ULONG y2)
{
APTR *VInfo;

    if (VInfo = GetVisualInfo(wp->WScreen, TAG_END))
    {
        DrawBevelBox(wp->RPort, x1, y1, x2 - x1 + 1, y2 - y1 + 1,
                     GTBB_Recessed, TRUE,
                     GT_VisualInfo, VInfo,
                     TAG_END);
        FreeVisualInfo(VInfo);
    }
}

void box_rai(struct Window *wp, ULONG x1, ULONG y1, ULONG x2, ULONG y2)
{
APTR *VInfo;

    if (VInfo = GetVisualInfo(wp->WScreen, TAG_END))
    {
        DrawBevelBox(wp->RPort, x1, y1, x2 - x1 + 1, y2 - y1 + 1,
                     GT_VisualInfo, VInfo,
                     TAG_END);
        FreeVisualInfo(VInfo);
    }
}

void box_bor(struct Window *wp, ULONG x1, ULONG y1, ULONG x2, ULONG y2)
{
    SetAPen(wp->RPort, 1);
    Move(wp->RPort, x1, y2);
    Draw(wp->RPort, x1, y1);
    Draw(wp->RPort, x2, y1);
    SetAPen(wp->RPort, 2);
    Draw(wp->RPort, x2, y2);
    Draw(wp->RPort, x1 + 1, y2);
    Draw(wp->RPort, x1 + 1, y1 + 1);
    Draw(wp->RPort, x2 - 1, y1 + 1);
    SetAPen(wp->RPort, 1);
    Move(wp->RPort, x2 - 1, y1 + 2);
    Draw(wp->RPort, x2 - 1, y2 - 1);
    Draw(wp->RPort, x1 + 2, y2 - 1);
}

void box_fill(struct Window *wp, ULONG x, ULONG y, ULONG width, ULONG height,
              UBYTE percent)
{
FLOAT per_width;
    
    per_width = ((FLOAT) width / 100) * percent;
    SetAPen(wp->RPort, 3);
    SetDrMd(wp->RPort, JAM1);
    RectFill(wp->RPort, x , y, (x + (ULONG) per_width) - 1, y + height - 1);
}

void write_mask(struct IntDat *idat)
{
struct RastPort *rp;
ULONG           font_x,
                font_y,
                winleft,
                wintop;
int             i;

    rp = idat->mainwin->RPort;
    font_x = rp->Font->tf_XSize;
    font_y = rp->Font->tf_YSize;
    winleft = (idat->mainwin->Width - (INFO_LENGTH - 1) * font_x) / 2;
    wintop = idat->mainwin->BorderTop;
    if (idat->oldlook)
        wintop += 2;
    else
        {
        box_bor(idat->mainwin, winleft - 10, wintop + 5, winleft + (INFO_LENGTH - 1) * font_x + 10,
             wintop + MAIN_LINES * (font_y + idat->textvdis) + 11);
        wintop += 10;
        }
    write_textjam1(rp, winleft + 1,
                   wintop + 1,
                   1, 0,
                   GetString(&idat->li, MSG_SIDEA));
    write_textjam1(rp, winleft,
                   wintop,
                   2, 0,
                   GetString(&idat->li, MSG_SIDEA));
    write_textjam1(rp, winleft + 1 + TITLE_LENGTH * font_x,
                   wintop + 1,
                   1, 0,
                   GetString(&idat->li, MSG_SIDEB));
    write_textjam1(rp, winleft + TITLE_LENGTH * font_x,
                   wintop,
                   2, 0,
                   GetString(&idat->li, MSG_SIDEB));
    write_textjam1(rp, winleft + 1,
                   wintop + 1 + (TITLES_PER_SIDE + 1) * (font_y + idat->textvdis),
                   1, 0,
                   GetString(&idat->li, MSG_LABEL));
    write_textjam1(rp, winleft,
                   wintop + (TITLES_PER_SIDE + 1) * (font_y + idat->textvdis),
                   2, 0,
                   GetString(&idat->li, MSG_LABEL));
    write_textjam1(rp, winleft + 1,
                   wintop + 1 + (TITLES_PER_SIDE + LABELS + 2) * (font_y + idat->textvdis),
                   1, 0,
                   GetString(&idat->li, MSG_BACK));
    write_textjam1(rp, winleft,
                   wintop + (TITLES_PER_SIDE + LABELS + 2) * (font_y + idat->textvdis),
                   2, 0,
                   GetString(&idat->li, MSG_BACK));
    if (!idat->oldlook) {
        for(i = 0; i < TITLES_PER_SIDE; i++)
            {
            box_rai(idat->mainwin, winleft - 3,
                        wintop - 2 + (i + 1) * (font_y + 6),
                        winleft + 2 + (TITLE_LENGTH - 1) * font_x,
                        wintop - 5 + (i + 2) * (font_y + 6));
            box_rai(idat->mainwin, winleft + TITLE_LENGTH * font_x - 3,
                        wintop - 2 + (i + 1) * (font_y + 6),
                        winleft + 2 + (INFO_LENGTH - 1) * font_x,
                        wintop - 5 + (i + 2) * (font_y + 6));
            }
        for(i = 0; i < LABELS; i++)
            box_rai(idat->mainwin, winleft - 3,
                        wintop - 2 + (i + TITLES_PER_SIDE + 2) * (font_y + 6),
                        winleft + 2 + (INFO_LENGTH - 1) * font_x,
                        wintop - 5 + (i + TITLES_PER_SIDE + 3) * (font_y + 6));
        for(i = 0; i < INFOS; i++)
            box_rai(idat->mainwin, winleft - 3,
                        wintop - 2 + (i + TITLES_PER_SIDE + LABELS + 3) * (font_y + 6),
                        winleft + 2 + (INFO_LENGTH - 1) * font_x,
                        wintop - 5 + (i + TITLES_PER_SIDE + LABELS + 4) * (font_y + 6));
        }
}

void write_dat(struct IntDat *idat, struct TapeDat *tdat)
{
struct RastPort *rp;
ULONG           font_x,
                font_y,
                winleft,
                wintop;
int             i;
UWORD           colv = 1,
                colh = 0;

    rp = idat->mainwin->RPort;
    font_x = rp->Font->tf_XSize;
    font_y = rp->Font->tf_YSize;
    winleft = (idat->mainwin->Width - (INFO_LENGTH - 1) * font_x) / 2;
    wintop = idat->mainwin->BorderTop;
    if (idat->oldlook) {
        colv = 2;
        colh = 1;
        wintop += 2;
        }
    else
        wintop += 10;
    for(i = 0; i < TITLES_PER_SIDE; i++)
        {
        write_textjam2(rp, winleft,
                       wintop + (i + 1) * (font_y + idat->textvdis),
                       colv, colh,
                       tdat->sidea[i]);
        write_textjam2(rp, winleft + TITLE_LENGTH * font_x,
                       wintop + (i + 1) * (font_y + idat->textvdis),
                       colv, colh,
                       tdat->sideb[i]);
        }
    for(i = 0; i < LABELS; i++)
        if ((i == 0) && (tdat->size.line1_bold == 0) ||
            (i == 1) && (tdat->size.line2_bold == 0))
            write_textjam2(rp, winleft,
                           wintop + (i + TITLES_PER_SIDE + 2) * (font_y + idat->textvdis),
                           colv, colh,
                           tdat->label[i]);
        else write_bigtext(idat, winleft,
                                 wintop + (i + TITLES_PER_SIDE + 2) * (font_y + idat->textvdis),
                                 colv, colh,
                                 tdat->label[i]);
    for(i = 0; i < INFOS; i++)
        write_textjam2(rp, winleft,
                       wintop + (i + TITLES_PER_SIDE + LABELS + 3) * (font_y + idat->textvdis),
                       colv, colh,
                       tdat->info[i]);
}

void read_line(struct IntDat *idat, ULONG x, ULONG y, char *line, int *pos, BOOL big)
{
struct IntuiMessage *msg;
struct RastPort     *rp;
struct Window       *wp;

int                 i,
                    l,
                    j,
                    font_x,
                    font_y;
BYTE                key;
ULONG               msg_class;
BOOL                again = TRUE,
                    sideab = FALSE;
char                str[LABEL_LENGTH],
                    text[LABEL_LENGTH];
UWORD               colv = 1,
                    colh = 0;

    wp = idat->mainwin;
    rp = wp->RPort;
    font_x = rp->Font->tf_XSize;
    font_y = rp->Font->tf_YSize;
    if (idat->oldlook) {
        colv = 2;
        colh = 1;
        }
    if (big)
        {
        l = BIGLABEL_LENGTH;
        strmid(line, text, 1, l);
        }
    else
        {
        l = strlen(line);
        strcpy(text, line);
        }
    strmid(text, str, 1, l);
    if (*pos <= 28)
        {
        sideab = TRUE;
        if (!idat->oldlook)
            box_rec(wp, x - 3, y - 2, x + 2 + (TITLE_LENGTH - 1) * font_x, y + font_y + 1);
        }
    else {
        if (!idat->oldlook)
            box_rec(wp, x - 3, y - 2, x + 2 + (INFO_LENGTH - 1) * font_x, y + font_y + 1);
        }
    if (big)
        write_bigtext(idat, x, y, colv, colh, str);
    else
        write_textjam2(rp, x, y, colv, colh, str);
    strmid(text, str, 1, 1);
    write_textjam2(rp, x, y, 1, 2, str);
    i = 0;
    while ((i < l) && again)
        {
        WaitPort(wp->UserPort);
        while ((i < l) && again && (msg = GT_GetIMsg(wp->UserPort)))
            {
            key = msg->Code;
            msg_class = msg->Class;
            GT_ReplyIMsg(msg);
            if (msg_class == IDCMP_RAWKEY)
                switch (key) {
                    case 66:
                        i = 0;
                        break;
                    case 76:
                        *pos -= 2;
                        if (*pos < 0)
                            *pos = 0;
                        again = FALSE;
                        break;
                    case 77:
                        again = FALSE;
                        break;
                    case 78:
                        i++;
                        break;
                    case 79:
                        if (i > 0)
                            i--;
                        break;
                    case 80:
                        *pos = 0;
                        again = FALSE;
                        break;
                    case 81:
                        *pos = TITLES_PER_SIDE;
                        again = FALSE;
                        break;
                    case 82:
                        *pos = TITLES_PER_SIDE * 2;
                        again = FALSE;
                        break;
                    case 83:
                        *pos = TITLES_PER_SIDE * 2 + LABELS;
                        again = FALSE;
                        break;
                    default:
                        break;
                }
            else if (msg_class == IDCMP_VANILLAKEY)
                switch (key) {
                    case 8:
                        if (i > 0)
                        {
                            i--;
                            text[i] = ' ';
                        }
                        if (i == l - 2)
                            text[l - 1] = ' ';
                        break;
                    case 9:
                        i = l - 1;
                        break;
                    case 13:
                        again = FALSE;
                        break;
                    case 19:
                        if (i < l)
                        {
                            for (j = l - 1; j > i; j--)
                                text[j] = text[j - 1];
                            text[i] = ' ';
                        }
                        break;
                    case 24:
                        for (j = 0; j < l; j++)
                            text[j] = ' ';
                        i = 0;
                        break;
                    case 27:
                        *pos = TITLES_PER_SIDE * 2 + LABELS + INFOS;
                        again = FALSE;
                        break;
                    case 127:
                        for (j = i; j < l - 1; j++)
                            text[j] = text[j + 1];
                        text[l - 1] = ' ';
                        break;
                    default:
                        text[i] = key;
                        i++;
                        break;
                }
        strmid(text, str, 1, l);
        if (big)
            write_bigtext(idat, x, y, colv, colh, str);
        else
            write_textjam2(rp, x, y, colv, colh, str);
        if ((i < l) && again)
            {
            strmid(text, str, i + 1, 1);
            if (big)
                write_textjam2(rp, (ULONG) (x + i * font_x * 1.456521739), y, 1, 2, str);
            else
                write_textjam2(rp, x + i * font_x, y, 1, 2, str);
            }
        }
    }
    strmid(text, str, 1, l);
    if (!idat->oldlook) {
        if (sideab)
            box_rai(wp, x - 3, y - 2, x + 2 + (TITLE_LENGTH - 1) * font_x, y + font_y + 1);
        else
            box_rai(wp, x - 3, y - 2, x + 2 + (INFO_LENGTH - 1) * font_x, y + font_y + 1);
        }
    if (big)
        {
        write_bigtext(idat, x, y, colv, colh, str);
        strcat(text, "                     ");
        strcpy(line, text);
        }
    else
        {
        write_textjam2(rp, x, y, colv, colh, str);
        strcpy(line, text);
        }
}

BOOL asl_fr(struct IntDat *idat, struct PrefDat *prefs,
            struct Window *win, short typ, char *path, char *file)
{

struct FileRequester *fr;
BOOL                 success = FALSE;

    if (fr = (struct FileRequester *)
        AllocAslRequestTags(ASL_FileRequest, ASLFR_InitialWidth, prefs->aslwidth,
                                             ASLFR_InitialHeight, prefs->aslheight,
                                             ASLFR_InitialLeftEdge, (idat->scr->Width - prefs->aslwidth) / 2,
                                             ASLFR_InitialTopEdge, (idat->scr->Height - prefs->aslheight) / 2,
                                             ASLFR_Window, win,
                                             ASLFR_SleepWindow, TRUE,
                                             ASLFR_RejectIcons, TRUE,
                                             TAG_END))
        {
        switch (typ) {
            case ASLLOADTPC :
                if (AslRequestTags(fr, ASLFR_TitleText, GetString(&idat->li, MSG_ASLLOAD_WIN),
                                       ASLFR_InitialFile, file,
                                       ASLFR_InitialDrawer, path,
                                       ASLFR_InitialPattern, tpcwld_str,
                                       ASLFR_DoPatterns, TRUE,
                                       TAG_END))
                    {
                    strcpy(file,fr->fr_File);
                    strcpy(path,fr->fr_Drawer);
                    success = TRUE;
                    }
                break;
            case ASLSAVETPC :
                if (AslRequestTags(fr, ASLFR_TitleText, GetString(&idat->li, MSG_ASLSAVE_WIN),
                                       ASLFR_InitialFile, file,
                                       ASLFR_InitialDrawer, path,
                                       ASLFR_InitialPattern, tpcwld_str,
                                       ASLFR_DoPatterns, TRUE,
                                       ASLFR_DoSaveMode, TRUE,
                                       TAG_END))
                    {
                    strcpy(file,fr->fr_File);
                    strcpy(path,fr->fr_Drawer);
                    success = TRUE;
                    }
                break;
            case ASLSAVEEXP :
                if (AslRequestTags(fr, ASLFR_TitleText, GetString(&idat->li, MSG_ASLEXPORT_WIN),
                                       ASLFR_InitialFile, file,
                                       ASLFR_InitialDrawer, path,
                                       ASLFR_DoSaveMode, TRUE,
                                       TAG_END))
                    {
                    strcpy(file,fr->fr_File);
                    strcpy(path,fr->fr_Drawer);
                    success = TRUE;
                    }
                break;    
            case ASLPATH :
                if (AslRequestTags(fr, ASLFR_TitleText, GetString(&idat->li, MSG_ASLPATH_WIN),
                                       ASLFR_InitialDrawer, path,
                                       ASLFR_DrawersOnly, TRUE,
                                       TAG_END))
                    {
                    strcpy(path,fr->fr_Drawer);
                    success = TRUE;
                    }
                break;
            case ASLLOADPREF :
                if (AslRequestTags(fr, ASLFR_TitleText, GetString(&idat->li, MSG_ASLPREFLOAD_WIN),
                                       ASLFR_InitialFile, file,
                                       ASLFR_InitialDrawer, path,
                                       ASLFR_InitialPattern, prefwld_str,
                                       ASLFR_DoPatterns, TRUE,
                                       TAG_END))
                    {
                    strcpy(file,fr->fr_File);
                    strcpy(path,fr->fr_Drawer);
                    success = TRUE;
                    }
                break;
            case ASLSAVEPREF :
                if (AslRequestTags(fr, ASLFR_TitleText, GetString(&idat->li, MSG_ASLPREFSAVE_WIN),
                                       ASLFR_InitialFile, file,
                                       ASLFR_InitialDrawer, path,
                                       ASLFR_InitialPattern, prefwld_str,
                                       ASLFR_DoPatterns, TRUE,
                                       ASLFR_DoSaveMode, TRUE,
                                       TAG_END))
                    {
                    strcpy(file,fr->fr_File);
                    strcpy(path,fr->fr_Drawer);
                    success = TRUE;
                    }
                break;
            default:
                break;
            }
        prefs->aslwidth = fr->fr_Width;
        prefs->aslheight = fr->fr_Height;
        FreeAslRequest(fr);
        }
    return success;
}

BOOL asl_for(struct IntDat *idat, struct PrefDat *prefs,
             struct Window *win, struct TextAttr *fontn)
{

struct FontRequester *fnr;
BOOL                 success = FALSE;

    if (fnr = (struct FontRequester *)
        AllocAslRequestTags(ASL_FontRequest, ASLFO_InitialWidth, prefs->aslwidth,
                                             ASLFO_InitialHeight, prefs->aslheight,
                                             ASLFO_InitialLeftEdge, (idat->scr->Width - prefs->aslwidth) / 2,
                                             ASLFO_InitialTopEdge, (idat->scr->Height - prefs->aslheight) / 2,
                                             ASLFO_Window, win,
                                             ASLFO_SleepWindow, TRUE,
                                             TAG_END))
        {
        if (AslRequestTags(fnr, ASLFO_TitleText, GetString(&idat->li, MSG_ASLFONT_WIN),
                                ASLFO_InitialName, fontn->ta_Name,
                                ASLFO_InitialSize, fontn->ta_YSize,
                                ASLFO_FixedWidthOnly, TRUE,
                                TAG_END))
            {
            strcpy(fontn->ta_Name, fnr->fo_Attr.ta_Name);
            fontn->ta_YSize = fnr->fo_Attr.ta_YSize;
            success = TRUE;
            }
        FreeAslRequest(fnr);
        }
    return success;
}

BOOL asl_smr(struct IntDat *idat, struct Window *win, struct PrefDat *prefs)
{

struct ScreenModeRequester *smr;
BOOL                       success = FALSE;

    if (smr = (struct ScreenModeRequester *)
        AllocAslRequestTags(ASL_ScreenModeRequest, ASLSM_InitialWidth, prefs->aslwidth,
                                                   ASLSM_InitialHeight, prefs->aslheight,
                                                   ASLSM_InitialLeftEdge, (idat->scr->Width - prefs->aslwidth) / 2,
                                                   ASLSM_InitialTopEdge, (idat->scr->Height - prefs->aslheight) / 2,
                                                   ASLSM_Window, win,
                                                   ASLSM_SleepWindow, TRUE,
                                                   TAG_END))
        {
        if (AslRequestTags(smr, ASLSM_TitleText, GetString(&idat->li, MSG_ASLSCREENMODE_WIN),
                                ASLSM_InitialDisplayID, prefs->scrid,
                                ASLSM_InitialDisplayWidth, prefs->scrwidth,
                                ASLSM_InitialDisplayHeight, prefs->scrheight,
                                ASLSM_InitialDisplayDepth, prefs->scrdepth,
                                ASLSM_InitialOverscanType, prefs->scroscan,
                                ASLSM_InitialAutoScroll, prefs->scrascroll,
                                ASLSM_DoWidth, TRUE,
                                ASLSM_DoHeight, TRUE,
                                ASLSM_DoDepth, TRUE,
                                ASLSM_MinDepth, 2,
                                ASLSM_DoOverscanType, TRUE,
                                ASLSM_DoAutoScroll, TRUE,
                                TAG_END))
            {
            prefs->scrid = smr->sm_DisplayID;
            prefs->scrwidth = smr->sm_DisplayWidth;
            prefs->scrheight = smr->sm_DisplayHeight;
            prefs->scrdepth = smr->sm_DisplayDepth;
            prefs->scroscan = smr->sm_OverscanType;
            prefs->scrascroll = smr->sm_AutoScroll;
            success = TRUE;
            }
        FreeAslRequest(smr);
        }
    return success;
}

