Changes in / [e4f08bf:c720890]


Ignore:
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • .travis.yml

    re4f08bf rc720890  
    44 - ./configure
    55 - make check
    6  - BITLBEE_SKYPE=plugin dpkg-buildpackage -uc -us
     6 - dpkg-buildpackage -uc -us
    77
    88before_install:
  • configure

    re4f08bf rc720890  
    7979                branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD)
    8080
    81                 search='\(.*\)-\([0-9]*\)-\(g[0-9a-f]*\)'
     81                search="(.+)-([0-9]+)-(g[0-9a-f]+)"
    8282                replace="\1+$timestamp+$branch+\2-\3-git"
    8383
    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
     84                BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s#$search#$replace#")
     85
     86                unset timestamp branch search replace
    9287        fi
    9388}
     
    685680fi
    686681
    687 if [ -z "$PYTHON" ]; then
    688         PYTHON=python
    689 fi
    690 
    691682if [ "$doc" = "1" ]; then
    692683        # check this here just in case someone tries to install it in python2.4...
    693         if ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then
     684        if ! python -m xml.etree.ElementTree > /dev/null 2>&1; then
    694685                echo
    695686                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)"
    697687                exit 1
    698688        fi
    699689        echo "DOC=1" >> Makefile.settings
    700         echo "PYTHON=$PYTHON" >> Makefile.settings
    701690fi
    702691
  • debian/control

    re4f08bf rc720890  
    2222Architecture: any
    2323Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${source:Version})
     24Provides: bitlbee (= ${source:Version})
    2425Conflicts: bitlbee
    2526Replaces: bitlbee
  • doc/Makefile

    re4f08bf rc720890  
    55
    66all:
    7         $(MAKE) -C user-guide
     7        # Only build the docs if this is a git tree
     8        test ! '(' -d ../.git -o -d ../.bzr ')' || $(MAKE) -C user-guide
    89
    910install:
  • doc/user-guide/Makefile

    re4f08bf rc720890  
    33_SRCDIR_ := $(_SRCDIR_)doc/user-guide/
    44endif
    5 
    6 ifndef PYTHON
    7 PYTHON = python
    8 endif
    95
    106all: help.txt
     
    3531        xsltproc --xinclude --output $@ docbook.xsl $<
    3632
    37 help.txt: $(_SRCDIR_)help.xml $(_SRCDIR_)commands.xml $(_SRCDIR_)misc.xml $(_SRCDIR_)quickstart.xml
    38         $(PYTHON) $(_SRCDIR_)genhelp.py $< $@
     33help.txt: help.xml help.xsl commands.xml misc.xml quickstart.xml
     34        python genhelp.py $< $@
    3935
    4036clean:
  • doc/user-guide/genhelp.py

    re4f08bf rc720890  
    33# Usage: python genhelp.py input.xml output.txt
    44# (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
    85
    96# This program is free software; you can redistribute it and/or
     
    2320
    2421
    25 import os
    2622import re
    2723import sys
     
    226222        return
    227223
    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 
    231224    txt = process_file(sys.argv[1])
    232225    open(sys.argv[2], "w").write(txt)
  • lib/misc.c

    re4f08bf rc720890  
    751751        return end - string;
    752752}
    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

    re4f08bf rc720890  
    149149G_MODULE_EXPORT char *get_rfc822_header(const char *text, const char *header, int len);
    150150G_MODULE_EXPORT int truncate_utf8(char *string, int maxlen);
    151 G_MODULE_EXPORT gboolean parse_int64(char *string, int base, guint64 *number);
    152151
    153152#endif
  • nick.c

    re4f08bf rc720890  
    186186                   LC_CTYPE being set to something other than C/POSIX. */
    187187                if (!(irc && irc->status & IRC_UTF8_NICKS)) {
    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;
     188                        part = asc = g_convert_with_fallback(part, -1, "ASCII//TRANSLIT",
     189                                                             "UTF-8", "", NULL, NULL, NULL);
    198190                }
    199191
  • protocols/skype/Makefile

    re4f08bf rc720890  
    1919install-doc:
    2020        $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1
    21         $(INSTALL) -m644 $(_SRCDIR_)skyped.1 $(DESTDIR)$(MANDIR)/man1
     21        $(INSTALL) -m644 skyped.1 $(DESTDIR)$(MANDIR)/man1
    2222
    2323uninstall-doc:
  • protocols/twitter/twitter.c

    re4f08bf rc720890  
    469469        g_regex_match(regex, msg, 0, &match_info);
    470470        while (g_match_info_matches(match_info)) {
    471                 gchar *s, *url;
    472 
    473                 url = g_match_info_fetch(match_info, 2);
     471                gchar *url = g_match_info_fetch(match_info, 2);
    474472                url_len_diff += target_len - g_utf8_strlen(url, -1);
    475 
    476473                /* Add another character for https://t.co/... URLs */
    477                 if ((s = g_match_info_fetch(match_info, 3))) {
     474                if (g_match_info_fetch(match_info, 3) != NULL) {
    478475                        url_len_diff += 1;
    479                         g_free(s);
    480476                }
    481477                g_free(url);
     
    863859}
    864860
     861/* Parses a decimal or hex tweet ID, returns TRUE on success */
     862static 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
    865876bee_user_t twitter_log_local_user;
    866877
     
    892903                        arg++;
    893904                }
    894                 if (parse_int64(arg, 16, &id) && id < TWITTER_LOG_LENGTH) {
     905                if (twitter_parse_id(arg, 16, &id) && id < TWITTER_LOG_LENGTH) {
    895906                        bu = td->log[id].bu;
    896907                        id = td->log[id].id;
    897                 } else if (parse_int64(arg, 10, &id)) {
     908                } else if (twitter_parse_id(arg, 10, &id)) {
    898909                        /* Allow normal tweet IDs as well; not a very useful
    899910                           feature but it's always been there. Just ignore
  • sock.h

    re4f08bf rc720890  
    99#define sock_make_nonblocking(fd) fcntl(fd, F_SETFL, O_NONBLOCK)
    1010#define sock_make_blocking(fd) fcntl(fd, F_SETFL, 0)
    11 #define sockerr_again() (errno == EINPROGRESS || errno == EINTR || errno == EAGAIN)
     11#define sockerr_again() (errno == EINPROGRESS || errno == EINTR)
    1212void closesocket(int fd);
Note: See TracChangeset for help on using the changeset viewer.