8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / lp / lib / forms / f_head.c
blob39cd34956ad595e9c6e7faf504758f97cf0d2915
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
32 /* EMACS_MODES: !fill, lnumb, !overwrite, !nodelete, !picture */
34 #include "sys/types.h"
36 #include "lp.h"
37 #include "form.h"
39 struct {
40 char *v;
41 short len;
42 short infile;
43 } formheadings[FO_MAX] = {
45 #define ENTRY(X) X, sizeof(X)-1
47 ENTRY("page length:"), 1, /* FO_PLEN */
48 ENTRY("page width:"), 1, /* FO_PWID */
49 ENTRY("number of pages:"), 1, /* FO_NP */
50 ENTRY("line pitch:"), 1, /* FO_LPI */
51 ENTRY("character pitch:"), 1, /* FO_CPI */
52 ENTRY("character set choice:"), 1, /* FO_CHSET */
53 ENTRY("ribbon color:"), 1, /* FO_RCOLOR */
54 ENTRY("comment:"), 0, /* FO_CMT */
55 ENTRY("alignment pattern:"), 1, /* FO_ALIGN */
56 ENTRY("paper:"), 1, /* FO_PAPER */
58 #undef ENTRY
62 /**
63 ** _search_fheading()
64 **/
66 int
67 #if defined(__STDC__)
68 _search_fheading (
69 char * buf
71 #else
72 _search_fheading (buf)
73 char * buf;
74 #endif
76 int fld;
79 for (fld = 0; fld < FO_MAX; fld++)
80 if (
81 formheadings[fld].v
82 && formheadings[fld].len
83 && CS_STRNEQU(
84 buf,
85 formheadings[fld].v,
86 formheadings[fld].len
89 break;
91 return (fld);