Deleted Added
full compact
units.c (302408) units.c (327686)
1/*
2 * units.c Copyright (c) 1993 by Adrian Mariano (adrian@cam.cornell.edu)
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. The name of the author may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 * Disclaimer: This software is provided by the author "as is". The author
12 * shall not be liable for any damages caused in any way by this software.
13 *
14 * I would appreciate (though I do not require) receiving a copy of any
15 * improvements you might make to this program.
16 */
17
18#ifndef lint
19static const char rcsid[] =
1/*
2 * units.c Copyright (c) 1993 by Adrian Mariano (adrian@cam.cornell.edu)
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. The name of the author may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 * Disclaimer: This software is provided by the author "as is". The author
12 * shall not be liable for any damages caused in any way by this software.
13 *
14 * I would appreciate (though I do not require) receiving a copy of any
15 * improvements you might make to this program.
16 */
17
18#ifndef lint
19static const char rcsid[] =
20 "$FreeBSD: stable/11/usr.bin/units/units.c 298388 2016-04-21 05:24:47Z eadler $";
20 "$FreeBSD: stable/11/usr.bin/units/units.c 327686 2018-01-08 00:57:28Z eadler $";
21#endif /* not lint */
22
23#include <ctype.h>
24#include <err.h>
25#include <errno.h>
26#include <histedit.h>
27#include <getopt.h>
28#include <stdbool.h>

--- 727 unchanged lines hidden (view full) ---

756 int inputsz;
757 char const * history_file;
758
759 quiet = false;
760 readfile = false;
761 history_file = NULL;
762 outputformat = numfmt;
763 quit = false;
21#endif /* not lint */
22
23#include <ctype.h>
24#include <err.h>
25#include <errno.h>
26#include <histedit.h>
27#include <getopt.h>
28#include <stdbool.h>

--- 727 unchanged lines hidden (view full) ---

756 int inputsz;
757 char const * history_file;
758
759 quiet = false;
760 readfile = false;
761 history_file = NULL;
762 outputformat = numfmt;
763 quit = false;
764 while ((optchar = getopt_long(argc, argv, "+ehf:oqtvHUV", longopts, NULL)) != -1) {
764 while ((optchar = getopt_long(argc, argv, "+ehf:o:qtvH:UV", longopts, NULL)) != -1) {
765 switch (optchar) {
766 case 'e':
767 outputformat = "%6e";
768 break;
769 case 'f':
770 readfile = true;
771 if (strlen(optarg) == 0)
772 readunits(NULL);

--- 114 unchanged lines hidden ---
765 switch (optchar) {
766 case 'e':
767 outputformat = "%6e";
768 break;
769 case 'f':
770 readfile = true;
771 if (strlen(optarg) == 0)
772 readunits(NULL);

--- 114 unchanged lines hidden ---