home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c160 / 1.ddi / SOURCE / B4QUICK.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-22  |  1.3 KB  |  70 lines

  1.  
  2. #include "d4base.h"
  3. #include "w4.h"
  4.  
  5. int  b4quick_browse()
  6. {
  7.    int  c, j, next_c, w ;
  8.    long ref ;
  9.  
  10.    w4define( 1,0,24,79 ) ;
  11.    w4border( DOUBLE, F_WHITE ) ;
  12.    w4title( 0,-1, d4name(), B_WHITE ) ;
  13.  
  14.    w4memory() ;
  15.    w4activate(-1) ;
  16.    g4release(0) ;
  17.  
  18.    next_c = 2 ;
  19.  
  20.    for ( j=1; j<=f4num_fields(); j++ )
  21.    {
  22.       c =  next_c ;
  23.  
  24.       ref =  f4j_ref(j) ;
  25.       if ( f4type(ref) == 'M' ) continue ;
  26.       if ( f4width(ref) >= MAX_GET_WIDTH ) continue ;
  27.  
  28.       w =  f4width(ref) ;
  29.       if ( w <= 10 )  w = 10 ;
  30.  
  31.       next_c =  c+ w + 2 ;
  32.       if ( next_c >= w4width(-1))  break ;
  33.  
  34.       w4 ( 1,c, f4name(ref) ) ;
  35.       g4field( -1,c, ref ) ;
  36.    }
  37.  
  38.    return( w4select(-1) ) ;
  39. }
  40.  
  41. int  b4quick_edit()
  42. {
  43.    int  r, j ;
  44.    long ref ;
  45.  
  46.    w4define( 1,0,24,79 ) ;
  47.    w4border( DOUBLE, F_WHITE ) ;
  48.    w4title( 0,-1, d4name(), B_WHITE ) ;
  49.  
  50.    w4memory() ;
  51.    w4activate(-1) ;
  52.    g4release(0) ;
  53.  
  54.    r = 1 ;
  55.    for ( j=1; j<=f4num_fields(); j++ )
  56.    {
  57.       ref =  f4j_ref(j) ;
  58.       if ( f4type(ref) == 'M' ) continue ;
  59.       if ( f4width(ref) >= MAX_GET_WIDTH ) continue ;
  60.  
  61.       if ( r >= w4height(-1)-1 )  break ;
  62.       w4 ( r,2, f4name(ref) ) ;
  63.       g4field( r,14, ref ) ;
  64.       if ( f4width(ref) > 64)  g4width( f4width(ref), 64 ) ;
  65.       r++ ;
  66.    }
  67.  
  68.    return( w4select(-1) ) ;
  69. }
  70.