#include "sysdef.h" /* */ /* Copyright Notice */ /* */ /* */ /* C version Copyright (C) 1984 Change Software, Inc. */ /* Copyright (C) 1978 1979 1980 1981 1982 1983 1984 by */ /* Change Software, Inc. */ /* */ /* */ /* This software is furnished under a license and may */ /* be used and copied only in accordance with the */ /* terms of such license and with the inclusion of */ /* the above copyright notice. This software or any */ /* other copies thereof may not be provided or other- */ /* wise made available to any other person. No title */ /* to and ownership of the software is hereby trans- */ /* ferred. */ /* */ #include "scerrd.h" #include "tempio.h" #define then #define CR 015 #define LF 012 vtcenter() { extern int fill_s,worklength,read_only ; extern char workbuffer[] ; register int i,nbl ; if ( read_only ) then return(0) ; creset() ; if ( (worklength = cvtstring(workbuffer,worklength,0210))==0 ) then { workbuffer[0] = CR ; workbuffer[1] = LF ; worklength = 2 ; } else { nbl = (fill_s - worklength) / 2 ; if ( nbl < 0 ) then return(0) ; for (i=0; i 0 ) i-- ; if ( (len = i) == 0 ) then return(0) ; i = 0 ; cp = s ; op = s ; for ( j=0; j= 0 && i >= 0 ) { s[j] = s[i] ; if ( s[j] == ' ' ) then { nbl = (fildir)?(fillcount-1)/nholes+1:fillcount/nholes; fillcount -= nbl ; nholes-- ; while ( (nbl--) > 0 && j >=0 ) s[--j] = ' ' ; } i-- ; j-- ; } return( fill ) ; }