1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)cchar.c 8.5 (Berkeley) 4/2/94"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/bin/stty/cchar.c 90111 2002-02-02 06:50:57Z imp $"; |
40#endif /* not lint */ 41 42#include <sys/types.h> 43 44#include <err.h> 45#include <limits.h> 46#include <stddef.h> 47#include <stdlib.h> 48#include <string.h> 49 50#include "stty.h" 51#include "extern.h" 52 |
53static int c_cchar(const void *, const void *); |
54 55/* 56 * Special control characters. 57 * 58 * Cchars1 are the standard names, cchars2 are the old aliases. 59 * The first are displayed, but both are recognized on the 60 * command line. 61 */ --- 23 unchanged lines hidden (view full) --- 85struct cchar cchars2[] = { 86 { "brk", VEOL, CEOL }, 87 { "flush", VDISCARD, CDISCARD }, 88 { "rprnt", VREPRINT, CREPRINT }, 89 { NULL, 0, 0 }, 90}; 91 92static int |
93c_cchar(const void *a, const void *b) |
94{ 95 96 return (strcmp(((const struct cchar *)a)->name, ((const struct cchar *)b)->name)); 97} 98 99int |
100csearch(char ***argvp, struct info *ip) |
101{ 102 struct cchar *cp, tmp; 103 long val; 104 char *arg, *ep, *name; 105 106 name = **argvp; 107 108 tmp.name = name; --- 36 unchanged lines hidden --- |