OSDN Git Service

addid library source 20140221
[zither/ds-zither.git] / sources / lib / libms / self_memcmp.c
1 // self_memcmp.c
2 // $Id: self_memcmp.c,v 1.1.1.1 2007/09/19 05:49:54 sendan Exp $
3 // masashi shimakura
4
5 #include<stdio.h>
6 #include<string.h>
7
8
9
10 /* ----------- SELF MEMCMP ------------- */
11 int self_memcmp(char * dataa, char * datab)
12 {
13 int ret, maxa, maxb;
14
15 maxa = (int)strlen(dataa);
16 maxb = (int)strlen(datab);
17
18 if(maxa != maxb){
19    ret = -1;
20    return ret;
21    }
22 else{
23    ret = memcmp(dataa, datab, maxa);
24    }
25
26 // printf("SELF_MEMCMP ret<%d> <%s> <%s>\n", ret, dataa, datab);
27
28 return ret;
29 }
30
31
32