Changeset e4f08bf


Ignore:
Timestamp:
2015-06-08T18:25:08Z (5 years ago)
Author:
dequis <dx@…>
Children:
29ff5c2
Parents:
c720890 (diff), 61e7e02 (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.
Message:

Merge branch 'develop' into feat/hip-cat

Conflicts:

configure

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • .travis.yml

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

    rc720890 re4f08bf  
    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                 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
    8792        fi
    8893}
     
    680685fi
    681686
     687if [ -z "$PYTHON" ]; then
     688        PYTHON=python
     689fi
     690
    682691if [ "$doc" = "1" ]; then
    683692        # 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; then
     693        if ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then
    685694                echo
    686695                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)"
    687697                exit 1
    688698        fi
    689699        echo "DOC=1" >> Makefile.settings
     700        echo "PYTHON=$PYTHON" >> Makefile.settings
    690701fi
    691702
  • debian/control

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

    rc720890 re4f08bf  
    55
    66all:
    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
    98
    109install:
  • doc/user-guide/Makefile

    rc720890 re4f08bf  
    33_SRCDIR_ := $(_SRCDIR_)doc/user-guide/
    44endif
     5
     6ifndef PYTHON
     7PYTHON = python
     8endif
    59
    610all: help.txt
     
    3135        xsltproc --xinclude --output $@ docbook.xsl $<
    3236
    33 help.txt: help.xml help.xsl commands.xml misc.xml quickstart.xml
    34         python genhelp.py $< $@
     37help.txt: $(_SRCDIR_)help.xml $(_SRCDIR_)commands.xml $(_SRCDIR_)misc.xml $(_SRCDIR_)quickstart.xml
     38        $(PYTHON) $(_SRCDIR_)genhelp.py $< $@
    3539
    3640clean:
  • doc/user-guide/genhelp.py

    rc720890 re4f08bf  
    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
    58
    69# This program is free software; you can redistribute it and/or
     
    2023
    2124
     25import os
    2226import re
    2327import sys
     
    222226        return
    223227
     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
    224231    txt = process_file(sys.argv[1])
    225232    open(sys.argv[2], "w").write(txt)
  • lib/misc.c

    rc720890 re4f08bf  
    751751        return end - string;
    752752}
     753
     754/* Parses a guint64 from string, returns TRUE on success */
     755gboolean 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  
    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);
     151G_MODULE_EXPORT gboolean parse_int64(char *string, int base, guint64 *number);
    151152
    152153#endif
  • nick.c

    rc720890 re4f08bf  
    186186                   LC_CTYPE being set to something other than C/POSIX. */
    187187                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;
    190198                }
    191199
  • protocols/skype/Makefile

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

    rc720890 re4f08bf  
    469469        g_regex_match(regex, msg, 0, &match_info);
    470470        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);
    472474                url_len_diff += target_len - g_utf8_strlen(url, -1);
     475
    473476                /* 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))) {
    475478                        url_len_diff += 1;
     479                        g_free(s);
    476480                }
    477481                g_free(url);
     
    859863}
    860864
    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 
    876865bee_user_t twitter_log_local_user;
    877866
     
    903892                        arg++;
    904893                }
    905                 if (twitter_parse_id(arg, 16, &id) && id < TWITTER_LOG_LENGTH) {
     894                if (parse_int64(arg, 16, &id) && id < TWITTER_LOG_LENGTH) {
    906895                        bu = td->log[id].bu;
    907896                        id = td->log[id].id;
    908                 } else if (twitter_parse_id(arg, 10, &id)) {
     897                } else if (parse_int64(arg, 10, &id)) {
    909898                        /* Allow normal tweet IDs as well; not a very useful
    910899                           feature but it's always been there. Just ignore
  • sock.h

    rc720890 re4f08bf  
    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)
     11#define sockerr_again() (errno == EINPROGRESS || errno == EINTR || errno == EAGAIN)
    1212void closesocket(int fd);
Note: See TracChangeset for help on using the changeset viewer.