def get_parameter(f):
    """
    Reads a procpar parameter from a file object.

    Returns a dictionary with the attributes of the parameter.

    """
    dic = dict()
    line = f.readline().decode().split()
    dic['name'] = line[0]
    dic['subtype'] = line[1]
    dic['basictype'] = line[2]
    dic['maxvalue'] = line[3]
    dic['minvalue'] = line[4]
    dic['stepsize'] = line[5]
    dic['Ggroup'] = line[6]
    dic['Dgroup'] = line[7]
    dic['protection'] = line[8]
    dic['active'] = line[9]
    dic['intptr'] = line[10]
    line = f.readline().decode()
    num = int(line.split()[0])
    values = []
    if dic['basictype'] == '1':
        values = line.split()[1:]
    elif dic['basictype'] == '2':
        values.append(line.split('"')[1])
        for i in range(num - 1):
            values.append(f.readline().decode().split('"')[1])
    dic['values'] = values
    line = f.readline().decode()
    dic['enumerable'] = line.split()[0]
    if dic['enumerable'] != '0':
        if dic['basictype'] == '1':
            dic['enumerables'] = line.split()[1:]
        elif dic['basictype'] == '2':
            dic['enumerables'] = line.split('"')[1::2]
    return dic
