~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/blenlib/intern/string_utf8.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
        return len;
261
261
}
262
262
 
263
 
size_t BLI_strlen_utf8_ex(const char *strc, int *r_len_bytes)
 
263
size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes)
264
264
{
265
265
        size_t len;
266
266
        const char *strc_orig = strc;
268
268
        for (len = 0; *strc; len++)
269
269
                strc += BLI_str_utf8_size_safe(strc);
270
270
 
271
 
        *r_len_bytes = (strc - strc_orig);
 
271
        *r_len_bytes = (size_t)(strc - strc_orig);
272
272
        return len;
273
273
}
274
274
 
282
282
        return len;
283
283
}
284
284
 
285
 
size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, int *r_len_bytes)
 
285
size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, size_t *r_len_bytes)
286
286
{
287
287
        size_t len;
288
288
        const char *strc_orig = strc;
292
292
                strc += BLI_str_utf8_size_safe(strc);
293
293
        }
294
294
 
295
 
        *r_len_bytes = (strc - strc_orig);
 
295
        *r_len_bytes = (size_t)(strc - strc_orig);
296
296
        return len;
297
297
}
298
298