#define __NEW_STARLET 1
#include <stdio.h>
#include <stdlib.h>
#include <ssdef.h>
#include <stsdef.h>
#include <lib$routines.h>
#include <starlet.h>
#include "errchk.h"
int main (void) {
static int r0_status;
static int reset;
r0_status = sys$setshlv (0, 0, 1);
switch (r0_status) {
case SS$_WASCLR:
(void)printf ("Auto unshelving was previously on\n");
reset = 0;
break;
case SS$_WASSET:
(void)printf ("Auto unshelving was previously off\n");
reset = 1;
break;
default:
errchk_sig (r0_status);
break;
}
(void)printf ("And is now off\n");
r0_status = sys$setshlv (0, 0, reset);
errchk_sig (r0_status);
(void)printf ("And is now reset to %s\n", reset ? "off" : "on");
}