1 /* $OpenBSD: ex_set.c,v 1.5 2009/10/27 23:59:47 deraadt Exp $ */ 2 3 /*- 4 * Copyright (c) 1992, 1993, 1994 5 * The Regents of the University of California. All rights reserved. 6 * Copyright (c) 1992, 1993, 1994, 1995, 1996 7 * Keith Bostic. All rights reserved. 8 * 9 * See the LICENSE file for redistribution information. 10 */ 11 12 #include "config.h" 13 14 #include <sys/types.h> 15 #include <sys/queue.h> 16 17 #include <bitstring.h> 18 #include <limits.h> 19 #include <stdio.h> 20 21 #include "../common/common.h" 22 23 /* 24 * ex_set -- :set 25 * Ex set option. 26 * 27 * PUBLIC: int ex_set(SCR *, EXCMD *); 28 */ 29 int 30 ex_set(sp, cmdp) 31 SCR *sp; 32 EXCMD *cmdp; 33 { 34 switch(cmdp->argc) { 35 case 0: 36 opts_dump(sp, CHANGED_DISPLAY); 37 break; 38 default: 39 if (opts_set(sp, cmdp->argv, cmdp->cmd->usage)) 40 return (1); 41 break; 42 } 43 return (0); 44 } 45