View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000438 | LDMud 3.5 | Efuns | public | 2006-01-06 19:43 | 2019-09-24 08:23 |
Reporter | Assigned To | Gnomi | |||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Summary | 0000438: Modified efun: capitalize() | ||||
Description | ==Edits to efuns.c=========================================================== #include <wchar.h> #include <wctype.h> size_t orig_len; orig_len=mstrsize(sp->u.str); if(orig_len>0) { wchar_t *wcdest, **wcdest_ptr; char *orig_txt, *mbdest, **orig_txt_ptr; string_t *result; size_t len, fc_len; orig_txt=get_txt(sp->u.str); orig_txt_ptr=xalloc(sizeof(char *)); *orig_txt_ptr=orig_txt; wcdest=xalloc((orig_len+1)*sizeof(wchar_t)); wcdest_ptr=xalloc(sizeof(wchar_t *)); *wcdest_ptr=wcdest; mbsrtowcs(wcdest,(const char **)orig_txt_ptr, orig_len, (mbstate_t *)NULL); memset(wcdest+sizeof(wchar_t),0,sizeof(wchar_t)); fc_len=wcsrtombs(NULL,(const wchar_t **)wcdest_ptr,0,(mbstate_t *)NULL); if(iswlower(*wcdest)) *wcdest=towupper(*wcdest); len=wcsrtombs(NULL,(const wchar_t **)wcdest_ptr,0,(mbstate_t *)NULL); mbdest=malloc(len+1); memset(mbdest,0,len+1); wcsrtombs(mbdest,(const wchar_t **)wcdest_ptr,len,(mbstate_t *)NULL); result=mstring_new_n_string(mbdest,len); result=mstring_append_txt(result,orig_txt+fc_len,orig_len-fc_len); xfree(wcdest); xfree(orig_txt_ptr); xfree(wcdest_ptr); xfree(mbdest); free_string_svalue(sp); put_string(sp, result); } return sp; | ||||
Tags | No tags attached. | ||||
|
Explainer: This bug is desinged to add support for multibyte character sets to string efuns, as designed in bug#432 |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-01-06 19:43 |
|
New Issue | |
2006-01-06 19:49 |
|
Note Added: 0000469 | |
2008-07-02 01:15 | Gnomi | Project | LDMud => LDMud 3.5 |
2008-07-02 01:16 | Gnomi | Relationship added | child of 0000432 |
2019-09-24 08:23 | Gnomi | Assigned To | => Gnomi |
2019-09-24 08:23 | Gnomi | Status | new => closed |
2019-09-24 08:23 | Gnomi | Resolution | open => fixed |