Changeset 7e3e00a
- Timestamp:
- Feb 11, 2003, 11:14:36 AM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- a2641cd9
- Parents:
- 8f44c6b
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r8f44c6b r7e3e00a 3 3 2.0.1-pre-1 4 4 Moved the (broken) newmsgproc stuff it a function procedure 5 Added thew 'newlinestrip' variable, on by default, that strips 6 leading and trailing newlines from incoming messages. 5 7 6 8 1.2.8 -
message.c
r5a35ae8e r7e3e00a 361 361 struct hostent *hent; 362 362 int k, ret; 363 char *ptr ;363 char *ptr, *tmp; 364 364 365 365 m->id=owl_global_get_nextmsgid(&g); … … 397 397 /* set the body */ 398 398 ptr=owl_zephyr_get_message(n, &k); 399 m->body=owl_malloc(k+10); 400 memcpy(m->body, ptr, k); 401 m->body[k]='\0'; 399 tmp=owl_malloc(k+10); 400 memcpy(tmp, ptr, k); 401 tmp[k]='\0'; 402 if (owl_global_is_newlinestrip(&g)) { 403 m->body=owl_util_stripnewlines(tmp); 404 owl_free(tmp); 405 } else { 406 m->body=tmp; 407 } 402 408 403 409 /* if zcrypt is enabled try to decrypt the message */ -
util.c
ra15a84f r7e3e00a 616 616 } 617 617 618 char *owl_util_stripnewlines(char *in) { 619 /* strip leading and trailing new lines. 620 caller must free the return */ 621 622 char *tmp, *ptr1, *ptr2, *out; 623 624 ptr1=tmp=owl_strdup(in); 625 while (ptr1[0]=='\n') { 626 ptr1++; 627 } 628 ptr2=ptr1+strlen(ptr1)-1; 629 while (ptr2[0]=='\n' && ptr2>ptr1) { 630 ptr2[0]='\0'; 631 ptr2--; 632 } 633 634 out=owl_strdup(ptr1); 635 owl_free(tmp); 636 return(out); 637 } 638 618 639 /**************************************************************************/ 619 640 /************************* REGRESSION TESTS *******************************/ -
variable.c
rd309eb3 r7e3e00a 84 84 OWLVAR_BOOL( "smartstrip" /* %OwlVarStub */, 1, 85 85 "strip kerberos instance for reply", ""), 86 87 OWLVAR_BOOL( "newlinestrip" /* %OwlVarStub */, 1, 88 "strip leading and trailing newlines", ""), 86 89 87 90 OWLVAR_BOOL( "displayoutgoing" /* %OwlVarStub */, 1,
Note: See TracChangeset
for help on using the changeset viewer.