Changeset 0c0734d
- Timestamp:
- Dec 26, 2013, 7:11:16 PM (11 years ago)
- Parents:
- d779a1a (diff), 1598444 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
.travis.yml
r48c09d4 r1598444 17 17 # In lp:~barnowl/barnowl/packaging, we use apt-get. Here, we use cpanm. 18 18 # - sudo apt-get install libanyevent-perl libclass-accessor-perl libextutils-depends-perl libglib-perl libmodule-install-perl libnet-twitter-lite-perl libpar-perl libperl-dev 19 - cpanm AnyEvent Class::Accessor ExtUtils::Depends Glib Module::Install Net::Twitter::Lite PAR 19 - cpanm AnyEvent Class::Accessor ExtUtils::Depends Module::Install Net::Twitter::Lite PAR 20 - cpanm Glib || cpanm Glib@1.302 # Glib@1.303 is broken, and is currently the latest 20 21 script: "./autogen.sh && ./configure && make distcheck" -
.gitignore
rca1fb26a r7834bb5 1 # Generated by autoreconf 2 Makefile.in 3 /aclocal.m4 4 /autom4te.cache/ 5 /compile 6 /config.h.in 7 /config.h.in~ 8 /configure 9 /depcomp 10 /install-sh 11 /missing 12 /test-driver 13 14 # Generated by configure 15 Makefile 16 .deps/ 17 /config.cache 18 /config.h 19 /config.log 20 /config.status 21 /stamp-h1 22 23 # Generated by make 24 *.o 1 25 *.a 2 *.o 3 *.par 4 .deps 26 /BUILD_VERSION.mk 27 /barnowl 5 28 /bin/ 6 BUILD_VERSION.mk 7 META.yml 8 MYMETA.yml 9 Makefile 10 Makefile.in 11 Makefile.old 29 /gmarshal_funcs.c 30 /gmarshal_funcs.h 31 /owl_prototypes.h 32 /owl_prototypes.h.new 33 /perlglue.c 34 /varstubs.c 35 /version.c 36 /version.c.new 37 /zcrypt 38 39 # Generated by make check 40 /runtests.sh.log 41 /runtests.sh.trs 42 /test-suite.log 43 /tester 44 45 # Generated by make tags et al. 46 ID 12 47 TAGS 13 aclocal.m4 14 autom4te.cache 15 barnowl 16 blib 17 config.cache 18 config.h 19 config.h.in 20 config.h.in~ 21 config.log 22 config.status 23 configure 24 core 25 depcomp 26 gmarshal_funcs.c 27 gmarshal_funcs.h 28 inc/ 29 install-sh 30 jabber.log 31 missing 32 owl_prototypes.h 33 owl_prototypes.h.new 34 perlglue.c 35 pm_to_blib 36 runtests.sh.log 37 runtests.sh.trs 38 stamp-h1 39 test-driver 40 test-suite.log 41 tester 42 varstubs.c 43 version.c 44 version.c.new 45 zcrypt 48 tags 49 /GPATH 50 /GRTAGS 51 /GSYMS 52 /GTAGS 53 /cscope.files 54 /cscope.in.out 55 /cscope.out 56 /cscope.po.out -
ChangeLog
r441fd42 r6f87658 1 1 1.9 2 * Update Jabber module for Net::DNS changes -james2vegas@aim.com 3 * Update and make configurable the Zephyr default format -adehnert@mit.edu 4 * Fix a crash when zcrypt fails -andersk@mit.edu 5 * Fix building with OpenSSL before 0.9.8 -andersk@mit.edu 6 * Make :loadsubs reload instanced personals too -davidben@mit.edu 7 * Make Perl zephyr_zwrite call die() when it fails -jgross@mit.edu 8 * Tell gpg calls from zcrypt to ignore ~/.gnupg -andersk@mit.edu 9 * Replace outgoing zephyr default format with a small URL -geofft@mit.edu 2 10 * Add getnumlines() to perl interface -asedeno@mit.edu 3 11 * Include names of invalid filters on filter errors -adehnert@mit.edu -
perl/lib/BarnOwl/Style/Default.pm
r732d5c0 rebc6f77 129 129 my $self = shift; 130 130 my $m = shift; 131 my $sender = $m->long_sender; 132 $sender =~ s/\n.*$//s; 131 my $sender = $self->humanize($m->long_sender, 1); 133 132 if (BarnOwl::getvar('colorztext') eq 'on') { 134 133 return " (" . $sender . '@color[default]' . ")"; -
tester.c
r6a8b519 r21dc927 25 25 int owl_history_regtest(void); 26 26 int call_filter_regtest(void); 27 int owl_smartstrip_regtest(void); 27 28 28 29 extern void owl_perl_xs_init(pTHX); … … 116 117 numfailures += owl_history_regtest(); 117 118 numfailures += call_filter_regtest(); 119 numfailures += owl_smartstrip_regtest(); 118 120 if (numfailures) { 119 121 fprintf(stderr, "# *** WARNING: %d failures total\n", numfailures); … … 1018 1020 return numfailed; 1019 1021 } 1022 1023 int owl_smartstrip_regtest(void) 1024 { 1025 int numfailed = 0; 1026 1027 printf("# BEGIN testing owl_zephyr_smartstripped_user\n"); 1028 1029 #define CHECK_SMARTSTRIP(in, expected) \ 1030 do { \ 1031 char *__value = owl_zephyr_smartstripped_user(in); \ 1032 FAIL_UNLESS("owl_zephyr_smartstripped_user " in, \ 1033 strcmp((expected), __value) == 0); \ 1034 g_free(__value); \ 1035 } while (0) 1036 1037 CHECK_SMARTSTRIP("foo", "foo"); 1038 CHECK_SMARTSTRIP("foo.bar", "foo"); 1039 CHECK_SMARTSTRIP("foo/bar", "foo"); 1040 CHECK_SMARTSTRIP("host/bar", "host/bar"); 1041 CHECK_SMARTSTRIP("rcmd.bar", "rcmd.bar"); 1042 CHECK_SMARTSTRIP("daemon/bar", "daemon/bar"); 1043 CHECK_SMARTSTRIP("daemon.bar", "daemon.bar"); 1044 1045 CHECK_SMARTSTRIP("foo@ATHENA.MIT.EDU", "foo@ATHENA.MIT.EDU"); 1046 CHECK_SMARTSTRIP("foo.bar@ATHENA.MIT.EDU", "foo@ATHENA.MIT.EDU"); 1047 CHECK_SMARTSTRIP("foo/bar@ATHENA.MIT.EDU", "foo@ATHENA.MIT.EDU"); 1048 CHECK_SMARTSTRIP("host/bar@ATHENA.MIT.EDU", "host/bar@ATHENA.MIT.EDU"); 1049 CHECK_SMARTSTRIP("rcmd.bar@ATHENA.MIT.EDU", "rcmd.bar@ATHENA.MIT.EDU"); 1050 CHECK_SMARTSTRIP("daemon/bar@ATHENA.MIT.EDU", "daemon/bar@ATHENA.MIT.EDU"); 1051 CHECK_SMARTSTRIP("daemon.bar@ATHENA.MIT.EDU", "daemon.bar@ATHENA.MIT.EDU"); 1052 1053 printf("# END testing owl_zephyr_smartstripped_user\n"); 1054 1055 return numfailed; 1056 } -
zephyr.c
rc55930e rebcdf4d 1319 1319 CALLER_OWN char *owl_zephyr_smartstripped_user(const char *in) 1320 1320 { 1321 char *slash, *dot, *realm, *out; 1322 1323 out = g_strdup(in); 1324 1325 /* bail immeaditly if we don't have to do any work */ 1326 slash = strchr(out, '/'); 1327 dot = strchr(out, '.'); 1328 if (!slash && !dot) { 1329 return(out); 1330 } 1331 1332 if (!strncasecmp(out, OWL_ZEPHYR_NOSTRIP_HOST, strlen(OWL_ZEPHYR_NOSTRIP_HOST)) || 1333 !strncasecmp(out, OWL_ZEPHYR_NOSTRIP_RCMD, strlen(OWL_ZEPHYR_NOSTRIP_RCMD)) || 1334 !strncasecmp(out, OWL_ZEPHYR_NOSTRIP_DAEMON5, strlen(OWL_ZEPHYR_NOSTRIP_DAEMON5)) || 1335 !strncasecmp(out, OWL_ZEPHYR_NOSTRIP_DAEMON4, strlen(OWL_ZEPHYR_NOSTRIP_DAEMON4))) { 1336 return(out); 1337 } 1338 1339 realm = strchr(out, '@'); 1340 if (!slash && dot && realm && (dot > realm)) { 1341 /* There's no '/', and the first '.' is in the realm */ 1342 return(out); 1343 } 1344 1345 /* remove the realm from out, but hold on to it */ 1346 if (realm) realm[0]='\0'; 1347 1348 /* strip */ 1349 if (slash) slash[0] = '\0'; /* krb5 style user/instance */ 1350 else if (dot) dot[0] = '\0'; /* krb4 style user.instance */ 1351 1352 /* reattach the realm if we had one */ 1353 if (realm) { 1354 strcat(out, "@"); 1355 strcat(out, realm+1); 1356 } 1357 1358 return(out); 1321 int n = strcspn(in, "./"); 1322 char *realm = strchrnul(in, '@'); 1323 1324 if (in + n >= realm || 1325 g_str_has_prefix(in, OWL_ZEPHYR_NOSTRIP_HOST) || 1326 g_str_has_prefix(in, OWL_ZEPHYR_NOSTRIP_RCMD) || 1327 g_str_has_prefix(in, OWL_ZEPHYR_NOSTRIP_DAEMON5) || 1328 g_str_has_prefix(in, OWL_ZEPHYR_NOSTRIP_DAEMON4)) 1329 return g_strdup(in); 1330 else 1331 return g_strdup_printf("%.*s%s", n, in, realm); 1359 1332 } 1360 1333
Note: See TracChangeset
for help on using the changeset viewer.