From 4e11c004395b80e095e2512274ee143f75b923f2 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 11 Jun 2003 06:22:16 +0000 Subject: ansification --- sbin/fdisk/cmd.c | 93 +++++++++----------------------------------------------- 1 file changed, 14 insertions(+), 79 deletions(-) (limited to 'sbin/fdisk/cmd.c') diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c index f345e9656bb..db55b7e1a8e 100644 --- a/sbin/fdisk/cmd.c +++ b/sbin/fdisk/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.32 2003/06/03 01:13:19 weingart Exp $ */ +/* $OpenBSD: cmd.c,v 1.33 2003/06/11 06:22:12 deraadt Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -41,12 +41,7 @@ #define MAX(a, b) ((a) >= (b) ? (a) : (b)) int -Xreinit(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xreinit(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { char buf[DEV_BSIZE]; @@ -66,12 +61,7 @@ Xreinit(cmd, disk, mbr, tt, offset) } int -Xdisk(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xdisk(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { int maxcyl = 1024; int maxhead = 256; @@ -103,12 +93,7 @@ Xdisk(cmd, disk, mbr, tt, offset) } int -Xedit(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xedit(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { int pn, num, ret; prt_t *pp; @@ -193,12 +178,7 @@ Xedit(cmd, disk, mbr, tt, offset) } int -Xsetpid(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xsetpid(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { int pn, num, ret; prt_t *pp; @@ -233,12 +213,7 @@ Xsetpid(cmd, disk, mbr, tt, offset) return (ret); } int -Xselect(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xselect(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { static int firstoff = 0; int off; @@ -276,12 +251,7 @@ Xselect(cmd, disk, mbr, tt, offset) } int -Xprint(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xprint(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { DISK_printmetrics(disk, cmd->args); @@ -292,12 +262,7 @@ Xprint(cmd, disk, mbr, tt, offset) } int -Xwrite(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xwrite(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { char mbr_buf[DEV_BSIZE]; int fd; @@ -325,12 +290,7 @@ Xquit(cmd, disk, r, tt, offset) } int -Xabort(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xabort(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { exit(0); @@ -340,12 +300,7 @@ Xabort(cmd, disk, mbr, tt, offset) int -Xexit(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xexit(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { /* Nothing to do here */ @@ -353,12 +308,7 @@ Xexit(cmd, disk, mbr, tt, offset) } int -Xhelp(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xhelp(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { cmd_table_t *cmd_table = cmd->table; int i; @@ -370,12 +320,7 @@ Xhelp(cmd, disk, mbr, tt, offset) } int -Xupdate(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xupdate(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { /* Update code */ @@ -385,12 +330,7 @@ Xupdate(cmd, disk, mbr, tt, offset) } int -Xflag(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xflag(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { int i, pn = -1; @@ -419,12 +359,7 @@ Xflag(cmd, disk, mbr, tt, offset) } int -Xmanual(cmd, disk, mbr, tt, offset) - cmd_t *cmd; - disk_t *disk; - mbr_t *mbr; - mbr_t *tt; - int offset; +Xmanual(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset) { char *pager = "/usr/bin/less"; char *p; -- cgit v1.2.3