/* Copyright 1996 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * Title:     txtopt.c
 * Purpose:   setting/reading option name
 * Author:    IDJ
 * History:
 *   21-Feb-90: IDJ: Created
 *   08-May-91: ECN: #ifndefed out unused ROM functions
 */

#include <stdlib.h>
#include <string.h>


#include "msgs.h"
#include "werr.h"
#include "txtopt.h"
#include "h.verintern.messages"

#ifndef TRUE
#define TRUE 1
#endif

static char *txtopt__option_name = "Edit";

#ifndef UROM
void txtopt_set_name(char *name)
{
    if ((txtopt__option_name = malloc(strlen(name)+1)) == 0)
        werr(TRUE, msgs_lookup(MSGS_txtopt1));
    strcpy(txtopt__option_name, name);
}
#endif

char *txtopt_get_name(void)
{
    return txtopt__option_name;
}