Lines Matching refs:xb

32 static int nval_find(const char *xb, int xb_size, const YCHAR *name,  in nval_find()  argument
38 memcpy(&size, xb, sizeof(int)); in nval_find()
40 if (!yaffs_strncmp((YCHAR *) (xb + pos + sizeof(int)), in nval_find()
48 memcpy(&size, xb + pos, sizeof(int)); in nval_find()
57 static int nval_used(const char *xb, int xb_size) in nval_used() argument
62 memcpy(&size, xb + pos, sizeof(int)); in nval_used()
66 memcpy(&size, xb + pos, sizeof(int)); in nval_used()
73 int nval_del(char *xb, int xb_size, const YCHAR *name) in nval_del() argument
75 int pos = nval_find(xb, xb_size, name, NULL); in nval_del()
83 memcpy(&size, xb + pos, sizeof(int)); in nval_del()
84 memcpy(xb + pos, xb + pos + size, xb_size - (pos + size)); in nval_del()
85 memset(xb + (xb_size - size), 0, size); in nval_del()
89 int nval_set(char *xb, int xb_size, const YCHAR *name, const char *buf, in nval_set() argument
99 pos = nval_find(xb, xb_size, name, &size_exist); in nval_set()
106 start = nval_used(xb, xb_size); in nval_set()
115 nval_del(xb, xb_size, name); in nval_set()
116 start = nval_used(xb, xb_size); in nval_set()
121 memcpy(xb + pos, &reclen, sizeof(int)); in nval_set()
123 yaffs_strncpy((YCHAR *) (xb + pos), name, reclen); in nval_set()
125 memcpy(xb + pos, buf, bsize); in nval_set()
129 int nval_get(const char *xb, int xb_size, const YCHAR * name, char *buf, in nval_get() argument
132 int pos = nval_find(xb, xb_size, name, NULL); in nval_get()
137 memcpy(&size, xb + pos, sizeof(int)); in nval_get()
142 while (xb[pos] && size > 0 && pos < xb_size) { in nval_get()
157 memcpy(buf, xb + pos, size); in nval_get()
167 int nval_list(const char *xb, int xb_size, char *buf, int bsize) in nval_list() argument
175 memcpy(&size, xb + pos, sizeof(int)); in nval_list()
182 name_len = yaffs_strnlen((YCHAR *) (xb + pos), size); in nval_list()
184 memcpy(buf, xb + pos, name_len * sizeof(YCHAR)); in nval_list()
198 memcpy(&size, xb + pos, sizeof(int)); in nval_list()
205 int nval_hasvalues(const char *xb, int xb_size) in nval_hasvalues() argument
207 return nval_used(xb, xb_size) > 0; in nval_hasvalues()