home *** CD-ROM | disk | FTP | other *** search
-
- /* g4field.c
-
- (c)Copyright Sequiter Software Inc., 1987-1991. All rights reserved.
-
- This is the only SAY/GET Screen I/O routine which uses CodeBase
- database management routines.
-
- Consequently, it is in its own file to make the SAY/GET module
- and the other CodeBase modules independent of one another.
- */
-
- #include "w4.h"
- #include "u4upgrad.h"
-
-
- void g4field( int row, int col, long field_ref )
- {
- GET *get_ptr ;
- char field_type ;
- int width ;
-
- field_type = f45type(field_ref) ;
- if ( field_type == 'M' ) return ;
- if ( field_type == 'F' ) field_type = 'N' ;
-
- if ( field_type == 'L' )
- {
- get_ptr = g4alloc( row, col, f45ptr(field_ref), 'C') ;
- g4picture( "L" ) ;
- }
- else
- get_ptr = g4alloc( row, col, f45ptr(field_ref), field_type) ;
- if ( field_type != 'D' )
- {
- if ( (width = f45width(field_ref)) >= MAX_GET_WIDTH-1 )
- width = MAX_GET_WIDTH-2 ;
- get_ptr->width_data = get_ptr->width_scr = width ;
- get_ptr->num_decimals = f45decimals(field_ref) ;
- }
- }
-
-
- void w4field( int row, int col, long field_ref )
- {
- int width ;
- char *ptr ;
-
- ptr = f45ptr( field_ref ) ;
- if ( ptr == (char *) 0 ) return ;
-
- width = f45width( field_ref ) ;
-
- switch( f45type(field_ref) )
- {
- case 'D':
- w4( row, col, c45dt_format( ptr, v4default_date )) ;
- break ;
-
- case 'N':
- case 'F':
- case 'L':
- case 'C':
- w4num( row, col, ptr, width ) ;
- break ;
- }
- }
-
-
-