/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ #include "Element.h" #if NUMELEM int compare(Element e1, Element e2) { return (e1 >= e2) - (e2 >= e1); } #else #include int compare(Element e1, Element e2) { int rel = strcmp(e1, e2); return rel == 0 ? 0 : rel > 0 ? 1 : -1; } #endif