/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*LINTLIBRARY*/
#include <stdlib.h>
#include "utility.h"
/*
* default field
*/
{
0, /* status */
0, /* rows */
0, /* cols */
0, /* frow */
0, /* fcol */
0, /* drows */
0, /* dcols */
0, /* maxgrow */
0, /* nrow */
0, /* nbuf */
NO_JUSTIFICATION, /* just */
0, /* page */
0, /* index */
' ', /* pad */
A_NORMAL, /* fore */
A_NORMAL, /* back */
O_ACTIVE |
O_PUBLIC |
O_EDIT |
O_WRAP |
O_BLANK |
O_NULLOK |
O_PASSOK |
O_STATIC, /* opts */
(FIELD *)0, /* snext */
(FIELD *)0, /* sprev */
(FIELD *)0, /* link */
(FORM *)0, /* form */
(FIELDTYPE *)0, /* type */
(char *)0, /* arg */
(char *)0, /* buf */
(char *)0, /* usrptr */
};
/*
* MakeType
*/
static int
{
int err = 0;
if (err) {
FreeArg(f); /* release type specific args */
f->arg = (char *)0;
return (FALSE);
}
return (TRUE);
}
/*
* CopyType
*/
static int
{
int err = 0;
if (err) {
FreeArg(f); /* release type specific args */
f->arg = (char *)0;
return (FALSE);
}
return (TRUE);
}
/*
* FreeType
*/
static void
{
FreeArg(f); /* release type specific args */
}
/*
* new_field
*/
FIELD *
/* int rows; number of visible rows */
/* int cols; number of visible cols */
/* int frow; first row relative to form origin */
/* int fcol; first col relative to form origin */
/* int nrow; number of off screen rows */
/* int nbuf; number of additional buffers */
{
int i, size;
*f = *_DEFAULT_FIELD;
f->link = f;
if (CopyType(f, _DEFAULT_FIELD)) {
for (i = 0; i <= f->nbuf; ++i)
return (f);
}
}
}
(void) free_field(f);
return ((FIELD *) 0);
}
/*
* dup_field
*/
FIELD *
/* FIELD * field; field to duplicate */
/* int frow; first row relative to form origin */
/* int fcol; first col relative to form origin */
{
int size;
*f = *_DEFAULT_FIELD;
f->link = f;
return (f);
}
}
}
(void) free_field(f);
return ((FIELD *) 0);
}
/*
* link_field
*/
FIELD *
/* FIELD * field; field to link to */
/* int frow; first row relative to form origin */
/* int fcol; first col relative to form origin */
{
*f = *_DEFAULT_FIELD;
return (f);
}
(void) free_field(f);
return ((FIELD *) 0);
}
/*
* free_field
*/
int
{
FIELD *p;
if (!f)
return (E_BAD_ARGUMENT);
if (f->form)
return (E_CONNECTED);
if (f->link != f) { /* check for linked field */
;
} else
FreeType(f);
Free(f);
return (E_OK);
}
/*
* field_info
*/
int
/* FIELD *f; field whose information is wanted */
/* int *rows; number of visible rows */
/* int *cols; number of visible cols */
/* int *frow; first row relative to form origin */
/* int *fcol; first col relative to form origin */
/* int *nrow; number of off screen rows */
/* int *nbuf; number of additional buffers */
{
if (!f)
return (E_BAD_ARGUMENT);
return (E_OK);
}
/*
* set_max_field
*/
int
{
return (E_BAD_ARGUMENT);
}
return (E_OK);
}
/*
* dynamic_field_info
*/
int
/* FIELD *f; field whose information is wanted */
/* int *drows; number of actual rows */
/* int *dcols; number of actual cols */
/* int *max; maximum growth allowable, else -1 */
{
if (!f)
return (E_BAD_ARGUMENT);
return (E_OK);
}
/*
* move_field
*/
int
/* FIELD *f; field to move */
/* int frow; first row relative to form origin */
/* int fcol; first col relative to form origin */
{
return (E_BAD_ARGUMENT);
if (f->form)
return (E_CONNECTED);
return (E_OK);
}
/*
* set_field_type
*/
int
{
int v = E_SYSTEM_ERROR;
f = Field(f);
FreeType(f); /* free old type */
v = E_OK;
return (v);
}
{
}
char *
{
}
/*
* set_new_page
*/
int
{
f = Field(f);
if (f->form)
return (E_CONNECTED);
if (flag)
else
return (E_OK);
}
int
{
return (TRUE);
else
return (FALSE);
}