1108684Sphk/*
2108684Sphk * Copyright (c) 2003, Trent Nelson, <trent@arpa.com>.
3108684Sphk * All rights reserved.
4108684Sphk *
5108684Sphk * Redistribution and use in source and binary forms, with or without
6108684Sphk * modification, are permitted provided that the following conditions
7108684Sphk * are met:
8108684Sphk * 1. Redistributions of source code must retain the above copyright
9108684Sphk *    notice, this list of conditions and the following disclaimer.
10108684Sphk * 2. Redistributions in binary form must reproduce the above copyright
11108684Sphk *    notice, this list of conditions and the following disclaimer in the
12108684Sphk *    documentation and/or other materials provided with the distribution.
13108684Sphk * 3. The name of the author may not be used to endorse or promote products
14108684Sphk *    derived from this software without specific prior written permission.
15108684Sphk *
16108684Sphk * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17108684Sphk * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18108684Sphk * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19108684Sphk * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20108684Sphk * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21108684Sphk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22108684Sphk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23108684Sphk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24108684Sphk * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25108684Sphk * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26108684Sphk * SUCH DAMAGE.
27108684Sphk *
28108684Sphk * $FreeBSD$
29108684Sphk */
30108684Sphk
31108684Sphk#include "systat.h"
32108684Sphk#include "extern.h"
33108684Sphk#include "convtbl.h"
34108684Sphk
35164672Syarint curscale = SC_AUTO;
36108684Sphk
37108684Sphkint
38108684Sphkifcmd(const char *cmd, const char *args)
39108684Sphk{
40164672Syar	int scale;
41164669Syar
42126775Sdwmalone	if (prefix(cmd, "scale")) {
43164672Syar		if ((scale = get_scale(args)) != -1)
44164672Syar			curscale = scale;
45108684Sphk		else {
46108684Sphk			move(CMDLINE, 0);
47108684Sphk			clrtoeol();
48164672Syar			addstr("what scale? ");
49164672Syar			addstr(get_helplist());
50231279Sed		}
51108684Sphk	}
52164669Syar	return (1);
53108684Sphk}
54