Changes in / [e1e59a7:1fdca1b]
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r1703f72 r42ad917 4 4 *~ 5 5 .#* 6 .*.swp7 6 .deps 8 7 META.yml -
Makefile.am
rb373d44 r39e81f7 20 20 perl_tester_SOURCES = $(BASE_SRCS) \ 21 21 owl.h owl_perl.h config.h \ 22 libzcrypt.a \ 22 23 $(GEN_C) $(GEN_H) \ 23 24 perl_tester.c 24 25 25 perl_tester_LDADD = libfaim/libfaim.a 26 perl_tester_LDADD = libfaim/libfaim.a libzcrypt.a 26 27 27 28 TESTS=runtests.sh -
commands.c
r5ade618 r61de085 861 861 OWLCMD_VOID_CTX("edit:history-next", owl_command_edit_history_next, 862 862 OWL_CTX_EDIT, 863 "replaces the text with the nexthistory",863 "replaces the text with the previous history", 864 864 "", ""), 865 865 -
editwin.c
r6c171f1 r2184001 326 326 static void oe_release_excursion(owl_editwin *e, oe_excursion *x) 327 327 { 328 oe_excursion * *px;328 oe_excursion *p; 329 329 330 330 x->valid = 0; 331 for (px = &e->excursions; *px != NULL; px = &(*px)->next) 332 if (*px == x) { 333 *px = x->next; 334 return; 335 } 336 abort(); 331 if (e->excursions == NULL) 332 /* XXX huh. */ ; 333 else if (e->excursions == x) 334 e->excursions = x->next; 335 else { 336 for (p = e->excursions; p->next != NULL; p = p->next) 337 if (p->next == x) { 338 p->next = p->next->next; 339 break; 340 } 341 /* and if we ran off the end? XXX */ 342 } 337 343 } 338 344 … … 1252 1258 1253 1259 if (!g_unichar_iscntrl(c) || c == '\n' || c== '\t' ) { 1260 memset(tmp, 0, 7); 1261 1254 1262 if (c == '\n' && e->style == OWL_EDITWIN_STYLE_ONELINE) { 1255 1263 return; … … 1294 1302 return; /* our work here is done */ 1295 1303 1296 tmp[g_unichar_to_utf8(c, tmp)] = '\0';1304 g_unichar_to_utf8(c, tmp); 1297 1305 owl_editwin_replace(e, 0, tmp); 1298 1306 } -
fmtext.c
r6c171f1 rf119757 57 57 58 58 /* Set attributes */ 59 if (a) 60 strncat(f->textbuff, attrbuff, 61 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff)); 62 if (fg) 63 strncat(f->textbuff, attrbuff, 64 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff)); 65 if (bg) 66 strncat(f->textbuff, attrbuff, 67 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff)); 59 if (a) { 60 memset(attrbuff,0,6); 61 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff); 62 strcat(f->textbuff, attrbuff); 63 } 64 if (fg) { 65 memset(attrbuff,0,6); 66 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff); 67 strcat(f->textbuff, attrbuff); 68 } 69 if (bg) { 70 memset(attrbuff,0,6); 71 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff); 72 strcat(f->textbuff, attrbuff); 73 } 68 74 69 75 strcat(f->textbuff, text); … … 196 202 _owl_fmtext_realloc(f, newlen); 197 203 198 if (a) 199 strncat(f->textbuff, attrbuff, 200 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff)); 201 if (fg) 202 strncat(f->textbuff, attrbuff, 203 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff)); 204 if (bg) 205 strncat(f->textbuff, attrbuff, 206 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff)); 204 if (a) { 205 memset(attrbuff,0,6); 206 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff); 207 strcat(f->textbuff, attrbuff); 208 } 209 if (fg) { 210 memset(attrbuff,0,6); 211 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff); 212 strcat(f->textbuff, attrbuff); 213 } 214 if (bg) { 215 memset(attrbuff,0,6); 216 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff); 217 strcat(f->textbuff, attrbuff); 218 } 207 219 208 220 strncat(f->textbuff, in->textbuff+start, stop-start+1); … … 303 315 int start, end; 304 316 while (owl_regex_compare(owl_global_get_search_re(&g), s, &start, &end) == 0) { 305 /* Prevent an infinite loop matching the empty string. */306 if (end == 0)307 break;308 309 317 /* Found search string, highlight it. */ 310 318 -
functions.c
rdca3b27 r340c3e7 1941 1941 { 1942 1942 owl_fmtext fm; 1943 char *ptr; 1944 char *result; 1943 char *ptr, buff[LINE]; 1945 1944 int i; 1946 1945 … … 1948 1947 1949 1948 for (i=0; i<argc; i++) { 1950 ptr = long_zuser(argv[i]); 1951 result = owl_zephyr_zlocate(ptr, auth); 1952 owl_fmtext_append_normal(&fm, result); 1953 owl_free(result); 1949 ptr=long_zuser(argv[i]); 1950 owl_zephyr_zlocate(ptr, buff, auth); 1951 owl_fmtext_append_normal(&fm, buff); 1954 1952 owl_free(ptr); 1955 1953 } -
perl/lib/BarnOwl.pm
r77c87b2 rde3f641 435 435 sub default_zephyr_signature 436 436 { 437 my $zsig = getvar('zsig'); 438 if (!$zsig && (my $zsigproc = getvar('zsigproc'))) { 439 $zsig = `$zsigproc`; 440 } elsif (!defined($zsig = get_zephyr_variable('zwrite-signature'))) { 441 $zsig = ((getpwuid($<))[6]); 442 $zsig =~ s/,.*//; 437 if (my $zsig = getvar('zsig')) { 438 return $zsig; 443 439 } 444 chomp($zsig); 445 return $zsig; 440 if (my $zsigproc = getvar('zsigproc')) { 441 return `$zsigproc`; 442 } 443 my $zwrite_signature = get_zephyr_variable('zwrite-signature'); 444 if (defined($zwrite_signature)) { 445 return $zwrite_signature; 446 } 447 my $name = ((getpwuid($<))[6]); 448 $name =~ s/,.*//; 449 return $name; 446 450 } 447 451 -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
r26cde20 r5118b32 321 321 . "add <jid> Adds <jid> to your roster.\n\n" 322 322 . "unsub <jid> Unsubscribe from <jid>'s presence.\n\n" 323 . "remove <jid> Removes <jid> fromyour roster. (implicit unsub)\n\n"323 . "remove <jid> Removes <jid> to your roster. (implicit unsub)\n\n" 324 324 . "auth <jid> Authorizes <jid> to subscribe to your presence.\n\n" 325 325 . "deauth <jid> De-authorizes <jid>'s subscription to your presence.\n\n" -
perl_tester.c
r737b8f1 r42ad917 32 32 perl_free(my_perl); 33 33 PERL_SYS_TERM(); 34 return 0;35 34 } 36 35 -
perlglue.xs
r5791bf7 r39e81f7 142 142 if (rv) owl_free(rv); 143 143 144 void 145 queue_message(msg) 144 void queue_message(msg) 146 145 SV *msg 147 146 PREINIT: … … 158 157 } 159 158 160 void 161 admin_message(header, body) 159 void admin_message(header, body) 162 160 const char *header 163 161 const char *body … … 167 165 } 168 166 169 void 170 start_question(line, callback) 167 void start_question(line, callback) 171 168 const char *line 172 169 SV *callback … … 183 180 } 184 181 185 void 186 start_password(line, callback) 182 void start_password(line, callback) 187 183 const char *line 188 184 SV *callback … … 199 195 } 200 196 201 void 202 start_edit_win(line, callback) 197 void start_edit_win(line, callback) 203 198 const char *line 204 199 SV *callback -
zephyr.c
rdca3b27 rc79a047 911 911 #endif 912 912 913 char *owl_zephyr_zlocate(const char *user, int auth)913 void owl_zephyr_zlocate(const char *user, char *out, int auth) 914 914 { 915 915 #ifdef HAVE_LIBZEPHYR … … 918 918 ZLocations_t locations; 919 919 char *myuser; 920 char *p, *result;921 920 921 strcpy(out, ""); 922 922 ZResetAuthentication(); 923 ret = ZLocateUser(zstr(user), &numlocs, auth ? ZAUTH : ZNOAUTH); 924 if (ret != ZERR_NONE) 925 return owl_sprintf("Error locating user %s: %s\n", 926 user, error_message(ret)); 927 928 myuser = short_zuser(user); 929 if (numlocs == 0) { 930 result = owl_sprintf("%s: Hidden or not logged in\n", myuser); 931 } else { 932 result = owl_strdup(""); 933 for (; numlocs; numlocs--) { 934 ZGetLocations(&locations, &one); 935 p = owl_sprintf("%s%s: %s\t%s\t%s\n", 936 result, myuser, 937 locations.host ? locations.host : "?", 938 locations.tty ? locations.tty : "?", 939 locations.time ? locations.time : "?"); 940 owl_free(result); 941 result = p; 942 } 943 } 944 945 return result; 946 #else 947 return owl_strdup(""); 923 ret=ZLocateUser(zstr(user),&numlocs,auth?ZAUTH:ZNOAUTH); 924 if (ret != ZERR_NONE) { 925 sprintf(out, "Error locating user %s\n", user); 926 return; 927 } 928 929 if (numlocs==0) { 930 myuser=short_zuser(user); 931 sprintf(out, "%s: Hidden or not logged in\n", myuser); 932 owl_free(myuser); 933 return; 934 } 935 936 for (;numlocs;numlocs--) { 937 ZGetLocations(&locations,&one); 938 myuser=short_zuser(user); 939 sprintf(out + strlen(out), "%s: %s\t%s\t%s\n", myuser, 940 locations.host ? locations.host : "?", 941 locations.tty ? locations.tty : "?", 942 locations.time ? locations.time : "?"); 943 owl_free(myuser); 944 } 948 945 #endif 949 946 }
Note: See TracChangeset
for help on using the changeset viewer.