/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>
#include <ssdef.h>
#include <dvidef.h>
#include <descrip.h>
#include <lib$routines.h>

int main(int argc,char *argv[])
{
   $DESCRIPTOR(term,"TT:");
   long int code, width;
   code = DVI$_DEVBUFSIZ;
   lib$getdvi(&code,0,&term,&width);
   printf("%d\n",width);
   return SS$_NORMAL;
}
