diff --git a/include/utils.h b/include/utils.h index 27e06be016feefe13735c4412c42c79e38609ddf..7be2a4ce69d7d7763beb4abe1fd3f8f36301f77b 100644 --- a/include/utils.h +++ b/include/utils.h @@ -4,4 +4,5 @@ void readreal(char s_[], double *r); void stamp(long *i); void getword(char *buf, char *wrd); +void sortshints(short *x, short *y); #endif diff --git a/src/log.c b/src/log.c index 7be162c370f4ce0c5dab60f21ecd5bd195d3eb8e..eb25f11e989c98fa7d4d377cdb9ff0eb25256bd6 100644 --- a/src/log.c +++ b/src/log.c @@ -559,25 +559,6 @@ static void getbool(char *buf, int *b) } -/*================= SORTSHINTS =================*/ -/*= =*/ -/*= Put two shortint variables into increasing =*/ -/*= numerical order. =*/ -/*= =*/ -/*================================================*/ - -void sortshints(short *x, short *y) -{ - short temp; - - if (*x <= *y) - return; - temp = *x; - *x = *y; - *y = temp; -} - - /*================= TESTPROBE ==================*/ /*= =*/ /*= Find which wire, pin, or gate the Probe =*/ diff --git a/src/page.c b/src/page.c index 8ac31da5f1fab17a14e1ab08756f2fdb05eda82c..576bd018a1dc6a81951254f8c3088335c29fed66 100644 --- a/src/page.c +++ b/src/page.c @@ -5,6 +5,7 @@ #include "logfont.h" #include "utils.h" #include "page.h" +#include "log.h" void chpage(log_page *page) { diff --git a/src/utils.c b/src/utils.c index e0d82a20283918c294c74faf9b6632419f245055..1a6d12692a16ef3af12e283c4ccfc461bcdd1415 100644 --- a/src/utils.c +++ b/src/utils.c @@ -105,3 +105,22 @@ void readreal(char *s_, double *r) strcpy(s, str2); dounits(s, r); } + +/*================= SORTSHINTS =================*/ +/*= =*/ +/*= Put two shortint variables into increasing =*/ +/*= numerical order. =*/ +/*= =*/ +/*================================================*/ + +void sortshints(short *x, short *y) +{ + short temp; + + if (*x <= *y) + return; + temp = *x; + *x = *y; + *y = temp; +} +