diff options
author | eadler <eadler@FreeBSD.org> | 2014-04-14 21:07:54 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2014-04-14 21:07:54 +0000 |
commit | bc93c01d608095e8a6997bd5b0dab31ad5f153d5 (patch) | |
tree | a9c46d2c82eb77101052673e9511eafb4158071d /usr.bin | |
parent | e3e2951f67a26e55bfa3eb4fca5731a3971bde20 (diff) | |
download | FreeBSD-src-bc93c01d608095e8a6997bd5b0dab31ad5f153d5.zip FreeBSD-src-bc93c01d608095e8a6997bd5b0dab31ad5f153d5.tar.gz |
units(1): Add 'static' and sort list.
Inspired by: DragonflyBSD
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/units/units.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index b1741b8..c2141f6 100644 --- a/usr.bin/units/units.c +++ b/usr.bin/units/units.c @@ -81,24 +81,24 @@ static const char * havestr; static const char * wantstr; -char *dupstr(const char *str); -void readunits(const char *userfile); -void initializeunit(struct unittype * theunit); -int addsubunit(char *product[], char *toadd); -void showunit(struct unittype * theunit); -void zeroerror(void); -int addunit(struct unittype *theunit, const char *toadd, int flip, int quantity); -int compare(const void *item1, const void *item2); -void sortunit(struct unittype * theunit); -void cancelunit(struct unittype * theunit); -char *lookupunit(const char *unit); -int reduceproduct(struct unittype * theunit, int flip); -int reduceunit(struct unittype * theunit); -int compareproducts(char **one, char **two); -int compareunits(struct unittype * first, struct unittype * second); -int completereduce(struct unittype * unit); -void showanswer(struct unittype * have, struct unittype * want); -void usage(void); +static int addsubunit(char *product[], char *toadd); +static int addunit(struct unittype *theunit, const char *toadd, int flip, int quantity); +static void cancelunit(struct unittype * theunit); +static int compare(const void *item1, const void *item2); +static int compareproducts(char **one, char **two); +static int compareunits(struct unittype * first, struct unittype * second); +static int completereduce(struct unittype * unit); +static char *dupstr(const char *str); +static void initializeunit(struct unittype * theunit); +static char *lookupunit(const char *unit); +static void readunits(const char *userfile); +static int reduceproduct(struct unittype * theunit, int flip); +static int reduceunit(struct unittype * theunit); +static void showanswer(struct unittype * have, struct unittype * want); +static void showunit(struct unittype * theunit); +static void sortunit(struct unittype * theunit); +static void usage(void); +static void zeroerror(void); static const char* promptstr = ""; |