Changes in / [c720890:e4f08bf]
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
.travis.yml
rc720890 re4f08bf 4 4 - ./configure 5 5 - make check 6 - dpkg-buildpackage -uc -us6 - BITLBEE_SKYPE=plugin dpkg-buildpackage -uc -us 7 7 8 8 before_install: -
configure
rc720890 re4f08bf 79 79 branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD) 80 80 81 search= "(.+)-([0-9]+)-(g[0-9a-f]+)"81 search='\(.*\)-\([0-9]*\)-\(g[0-9a-f]*\)' 82 82 replace="\1+$timestamp+$branch+\2-\3-git" 83 83 84 BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s#$search#$replace#") 85 86 unset timestamp branch search replace 84 describe=$(cd $srcdir; git describe --long --tags 2>/dev/null) 85 if [ $? -ne 0 ]; then 86 describe=${REAL_BITLBEE_VERSION}-0-g$(cd $srcdir; git rev-parse --short HEAD) 87 fi 88 89 BITLBEE_VERSION=$(echo $describe | sed "s#$search#$replace#") 90 91 unset timestamp branch search replace describe 87 92 fi 88 93 } … … 680 685 fi 681 686 687 if [ -z "$PYTHON" ]; then 688 PYTHON=python 689 fi 690 682 691 if [ "$doc" = "1" ]; then 683 692 # check this here just in case someone tries to install it in python2.4... 684 if ! python-m xml.etree.ElementTree > /dev/null 2>&1; then693 if ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then 685 694 echo 686 695 echo 'ERROR: Python (>=2.5 or 3.x) is required to generate docs' 696 echo "(Use the PYTHON environment variable if it's in a weird location)" 687 697 exit 1 688 698 fi 689 699 echo "DOC=1" >> Makefile.settings 700 echo "PYTHON=$PYTHON" >> Makefile.settings 690 701 fi 691 702 -
debian/control
rc720890 re4f08bf 22 22 Architecture: any 23 23 Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${source:Version}) 24 Provides: bitlbee (= ${source:Version})25 24 Conflicts: bitlbee 26 25 Replaces: bitlbee -
doc/Makefile
rc720890 re4f08bf 5 5 6 6 all: 7 # Only build the docs if this is a git tree 8 test ! '(' -d ../.git -o -d ../.bzr ')' || $(MAKE) -C user-guide 7 $(MAKE) -C user-guide 9 8 10 9 install: -
doc/user-guide/Makefile
rc720890 re4f08bf 3 3 _SRCDIR_ := $(_SRCDIR_)doc/user-guide/ 4 4 endif 5 6 ifndef PYTHON 7 PYTHON = python 8 endif 5 9 6 10 all: help.txt … … 31 35 xsltproc --xinclude --output $@ docbook.xsl $< 32 36 33 help.txt: help.xml help.xsl commands.xml misc.xmlquickstart.xml34 pythongenhelp.py $< $@37 help.txt: $(_SRCDIR_)help.xml $(_SRCDIR_)commands.xml $(_SRCDIR_)misc.xml $(_SRCDIR_)quickstart.xml 38 $(PYTHON) $(_SRCDIR_)genhelp.py $< $@ 35 39 36 40 clean: -
doc/user-guide/genhelp.py
rc720890 re4f08bf 3 3 # Usage: python genhelp.py input.xml output.txt 4 4 # (Both python2 (>=2.5) or python3 work) 5 # 6 # The shebang above isn't used, set the PYTHON environment variable 7 # before running ./configure instead 5 8 6 9 # This program is free software; you can redistribute it and/or … … 20 23 21 24 25 import os 22 26 import re 23 27 import sys … … 222 226 return 223 227 228 # ensure that we really are in the same directory as the input file 229 os.chdir(os.path.dirname(os.path.abspath(sys.argv[1]))) 230 224 231 txt = process_file(sys.argv[1]) 225 232 open(sys.argv[2], "w").write(txt) -
lib/misc.c
rc720890 re4f08bf 751 751 return end - string; 752 752 } 753 754 /* Parses a guint64 from string, returns TRUE on success */ 755 gboolean parse_int64(char *string, int base, guint64 *number) 756 { 757 guint64 parsed; 758 char *endptr; 759 760 errno = 0; 761 parsed = g_ascii_strtoull(string, &endptr, base); 762 if (errno || endptr == string || *endptr != '\0') { 763 return FALSE; 764 } 765 *number = parsed; 766 return TRUE; 767 } 768 -
lib/misc.h
rc720890 re4f08bf 149 149 G_MODULE_EXPORT char *get_rfc822_header(const char *text, const char *header, int len); 150 150 G_MODULE_EXPORT int truncate_utf8(char *string, int maxlen); 151 G_MODULE_EXPORT gboolean parse_int64(char *string, int base, guint64 *number); 151 152 152 153 #endif -
nick.c
rc720890 re4f08bf 186 186 LC_CTYPE being set to something other than C/POSIX. */ 187 187 if (!(irc && irc->status & IRC_UTF8_NICKS)) { 188 part = asc = g_convert_with_fallback(part, -1, "ASCII//TRANSLIT", 189 "UTF-8", "", NULL, NULL, NULL); 188 asc = g_convert_with_fallback(part, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, NULL, NULL); 189 190 if (!asc) { 191 /* If above failed, try again without //TRANSLIT. 192 //TRANSLIT is a GNU iconv special and is not POSIX. 193 Other platforms may not support it. */ 194 asc = g_convert_with_fallback(part, -1, "ASCII", "UTF-8", "", NULL, NULL, NULL); 195 } 196 197 part = asc; 190 198 } 191 199 -
protocols/skype/Makefile
rc720890 re4f08bf 19 19 install-doc: 20 20 $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1 21 $(INSTALL) -m644 skyped.1 $(DESTDIR)$(MANDIR)/man121 $(INSTALL) -m644 $(_SRCDIR_)skyped.1 $(DESTDIR)$(MANDIR)/man1 22 22 23 23 uninstall-doc: -
protocols/twitter/twitter.c
rc720890 re4f08bf 469 469 g_regex_match(regex, msg, 0, &match_info); 470 470 while (g_match_info_matches(match_info)) { 471 gchar *url = g_match_info_fetch(match_info, 2); 471 gchar *s, *url; 472 473 url = g_match_info_fetch(match_info, 2); 472 474 url_len_diff += target_len - g_utf8_strlen(url, -1); 475 473 476 /* Add another character for https://t.co/... URLs */ 474 if ( g_match_info_fetch(match_info, 3) != NULL) {477 if ((s = g_match_info_fetch(match_info, 3))) { 475 478 url_len_diff += 1; 479 g_free(s); 476 480 } 477 481 g_free(url); … … 859 863 } 860 864 861 /* Parses a decimal or hex tweet ID, returns TRUE on success */862 static gboolean twitter_parse_id(char *string, int base, guint64 *id)863 {864 guint64 parsed;865 char *endptr;866 867 errno = 0;868 parsed = g_ascii_strtoull(string, &endptr, base);869 if (errno || endptr == string || *endptr != '\0') {870 return FALSE;871 }872 *id = parsed;873 return TRUE;874 }875 876 865 bee_user_t twitter_log_local_user; 877 866 … … 903 892 arg++; 904 893 } 905 if ( twitter_parse_id(arg, 16, &id) && id < TWITTER_LOG_LENGTH) {894 if (parse_int64(arg, 16, &id) && id < TWITTER_LOG_LENGTH) { 906 895 bu = td->log[id].bu; 907 896 id = td->log[id].id; 908 } else if ( twitter_parse_id(arg, 10, &id)) {897 } else if (parse_int64(arg, 10, &id)) { 909 898 /* Allow normal tweet IDs as well; not a very useful 910 899 feature but it's always been there. Just ignore -
sock.h
rc720890 re4f08bf 9 9 #define sock_make_nonblocking(fd) fcntl(fd, F_SETFL, O_NONBLOCK) 10 10 #define sock_make_blocking(fd) fcntl(fd, F_SETFL, 0) 11 #define sockerr_again() (errno == EINPROGRESS || errno == EINTR )11 #define sockerr_again() (errno == EINPROGRESS || errno == EINTR || errno == EAGAIN) 12 12 void closesocket(int fd);
Note: See TracChangeset
for help on using the changeset viewer.