summaryrefslogtreecommitdiff
path: root/src/common/utils.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-05 15:57:01 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-05 15:57:01 +0000
commitaa2b91126827e6460a86ba0622a1f41328a7303e (patch)
tree26efb27f9f5757a8208ffd2a771a4e03959c57c6 /src/common/utils.c
parentcf6e32a06c16b1a6d4a47d9e2a7d424f3ce0b26d (diff)
downloadhercules-aa2b91126827e6460a86ba0622a1f41328a7303e.tar.gz
hercules-aa2b91126827e6460a86ba0622a1f41328a7303e.tar.bz2
hercules-aa2b91126827e6460a86ba0622a1f41328a7303e.tar.xz
hercules-aa2b91126827e6460a86ba0622a1f41328a7303e.zip
- Major reconfiguration of the trunk VS8 project files, read the changelog for details
- Also removed some deprecated code that was causing linking conflicts - And fixed a missing md5calc reference in stable's VS8 files git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9619 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/utils.c')
-rw-r--r--src/common/utils.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/common/utils.c b/src/common/utils.c
index 25ada1ce5..c06e57083 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -51,95 +51,6 @@ void dump(unsigned char *buffer, int num)
printf("\n");
}
-//NOTE: There is no need to use this function as the standard sqrt is plenty fast as it is. [Skotlex]
-int newt_sqrt(int input)
-{
- int new_value, value = input/2, count = 0;
- if (!value) //Division by zero fix, pointed out by Shinomori. [Skotlex]
- return input;
- do
- {
- new_value = (value + input/value)>>1;
- if (abs(value - new_value) <= 1)
- return new_value;
- value = new_value;
- }
- while (count++ < 25);
- return new_value;
-}
-
-#if defined(_WIN32) && !defined(MINGW)
-char *rindex(char *str, char c)
-{
- char *sptr;
-
- sptr = str;
- while(*sptr)
- ++sptr;
- if (c == '\0')
- return(sptr);
- while(str != sptr)
- if (*sptr-- == c)
- return(++sptr);
- return(NULL);
-}
-
-int strcasecmp(const char *arg1, const char *arg2)
-{
- int chk, i;
-
- if (arg1 == NULL || arg2 == NULL) {
- ShowError("strcasecmp: received a NULL pointer, %p or %p.\n", arg1, arg2);
- return (0);
- }
-
- for (i = 0; arg1[i] || arg2[i]; i++)
- if ((chk = LOWER(arg1[i]) - LOWER(arg2[i])) != 0)
- return (chk); /* not equal */
-
- return (0);
-}
-
-int strncasecmp(const char *arg1, const char *arg2, size_t n)
-{
- int chk, i;
-
- if (arg1 == NULL || arg2 == NULL) {
- ShowError("strncasecmp(): received a NULL pointer, %p or %p.\n", arg1, arg2);
- return (0);
- }
-
- for (i = 0; (arg1[i] || arg2[i]) && (n > 0); i++, n--)
- if ((chk = LOWER(arg1[i]) - LOWER(arg2[i])) != 0)
- return (chk); /* not equal */
-
- return (0);
-}
-
-void str_upper(char *name)
-{
-
- int len = (int)strlen(name);
- while (len--) {
- if (*name >= 'a' && *name <= 'z')
- *name -= ('a' - 'A');
- name++;
- }
-}
-
-void str_lower(char *name)
-{
- int len = (int)strlen(name);
-
- while (len--) {
- if (*name >= 'A' && *name <= 'Z')
- *name += ('a' - 'A');
- name++;
- }
-}
-
-#endif
-
// Allocate a StringBuf [MouseJstr]
struct StringBuf * StringBuf_Malloc()
{