dparrish / libcli

Libcli provides a shared library for including a Cisco-like command-line interface into other software. It's a telnet interface which supports command-line editing, history, authentication and callbacks for a user-definable function tree.
https://dparrish.com/link/libcli
GNU Lesser General Public License v2.1
289 stars 144 forks source link

conflict for c++ keyword #24

Closed wjx0912 closed 5 years ago

wjx0912 commented 8 years ago

the word 'try' is keyword of c++, i modify it and now compile ok:

static int pass_matches(const char _pass, const char _try) { int des; if ((des = !strncasecmp(pass, DES_PREFIX, sizeof(DES_PREFIX)-1))) pass += sizeof(DES_PREFIX)-1;

ifndef WIN32

/*
 * TODO - find a small crypt(3) function for use on windows
 */
if (des || !strncmp(pass, MD5_PREFIX, sizeof(MD5_PREFIX)-1))
    **try** = crypt(**try**, pass);

endif

return !strcmp(pass, **try**);

}