Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 215269 Details for
Bug 299734
net-im/licq-1.3.8 needs some bugfixing (upstream)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for hebrew support
licq-1.3.8-hebrew.patch (text/plain), 1.86 KB, created by
Andy Crook
on 2010-01-05 11:32:14 UTC
(
hide
)
Description:
patch for hebrew support
Filename:
MIME Type:
Creator:
Andy Crook
Created:
2010-01-05 11:32:14 UTC
Size:
1.86 KB
patch
obsolete
>--- src/hebrev.c.orig 2009-10-08 22:03:20.000000000 +0300 >+++ src/hebrev.c 2010-01-04 18:48:42.000000000 +0200 >@@ -48,6 +48,7 @@ > short int mode = 0, imode; > const char *hmark = NULL, *lmark, *nmark, *nlmark; > char ch; >+ const char* srcstart = src; > > if (src == NULL) > return NULL; >@@ -69,7 +70,7 @@ > if (*src == 0 || iseng(*src)) > { > lmark = src-1; >- while ((!isheb(*lmark)) && (!ispunct(*lmark))) lmark--; >+ while (lmark > srcstart && !isheb(*lmark) && !ispunct(*lmark)) lmark--; > src = lmark; > imode = 0; > nmark = NULL; >@@ -114,6 +115,7 @@ > hmark = NULL; > mode = 0; > } >+ if (*src == '\0') *dest = '\0'; > } > if (!*src++) > break; >@@ -141,15 +143,16 @@ > char *temp=NULL, *tmp=NULL; > char *arg=NULL, *arg2=NULL; > int i=0; >+ char* saveptr = NULL; > > temp = (char*) malloc(strlen(input)+1); > tmp = temp; > > strcpy(temp, input); > >- arg = strtok(temp, "\n"); >+ arg = strtok_r(temp, "\n", &saveptr); > for(i = 0; (i < index) && (arg!=NULL); i++) >- arg = strtok(NULL, "\n"); >+ arg = strtok_r(NULL, "\n", &saveptr); > > if(arg != NULL) > { >@@ -164,6 +167,7 @@ > { > char* temp_str = NULL; > char* temp = NULL; >+ char* arg = NULL; > int i=0; > int size = 0; > if(src == NULL) >@@ -172,21 +176,23 @@ > if((temp_str = (char*)malloc(strlen(src)+1))== NULL) > return NULL; > >- temp = GetArg(src, i); >- while(temp != NULL) >+ arg = GetArg(src, i); >+ while(arg != NULL) > { > i++; >- temp = hebrew(temp); >+ temp = hebrew(arg); >+ free(arg); > memcpy(temp_str + size , temp, strlen(temp)); > size += strlen(temp) ; > temp_str[size++] = '\n'; > > free(temp); > temp = NULL; >- temp = GetArg(src, i); >+ arg = GetArg(src, i); > } >- free(temp); >- temp_str[size]= '\0'; >+ // Above loop adds a line break after last line that wasn't there in src >+ // replace it with the null terminator >+ temp_str[--size]= '\0'; > return temp_str; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 299734
:
215267
|
215268
| 215269 |
215271