[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/lib/libxfont][debian-unstable] 10 commits: README: Remove mention of libXfont 1.5



Title: GitLab

Timo Aaltonen pushed to branch debian-unstable at X Strike Force / lib / libxfont

Commits:

9 changed files:

Changes:

  • README.md
    ... ... @@ -3,15 +3,10 @@ libXfont - X font handling library for server & utilities
    3 3
     
    
    4 4
     libXfont provides the core of the legacy X11 font system, handling the index
    
    5 5
     files (fonts.dir, fonts.alias, fonts.scale), the various font file formats,
    
    6
    -and rasterizing them.  It is used by the X servers, and will eventually be
    
    7
    -used by the X Font Server (xfs), but should not be used by normal X11 clients.
    
    8
    -X11 clients access fonts via either the new APIs in libXft, or the legacy
    
    9
    -APIs in libX11.
    
    10
    -
    
    11
    -This version of libXfont is not compatible with xfs, or with the legacy
    
    12
    -bdftopcf utility; these packages require libXfont 1.5, not libXfont 2.0
    
    13
    -or later. The two versions can be installed in parallel, and eventually
    
    14
    -the need for 1.5 will go away. We apologize for the inconvenience.
    
    6
    +and rasterizing them.  It is used by the X display servers (Xorg, Xvfb, etc.)
    
    7
    +and the X Font Server (xfs), but should not be used by normal X11 clients.  X11
    
    8
    +clients access fonts via either the new APIs in libXft, or the legacy APIs in
    
    9
    +libX11.
    
    15 10
     
    
    16 11
     libXfont supports a number of compression and font formats, and the
    
    17 12
     configure script takes various options to enable or disable them:
    

  • configure.ac
    ... ... @@ -21,7 +21,7 @@
    21 21
     
    
    22 22
     # Initialize Autoconf
    
    23 23
     AC_PREREQ([2.60])
    
    24
    -AC_INIT([libXfont2], [2.0.4],
    
    24
    +AC_INIT([libXfont2], [2.0.5],
    
    25 25
     	[https://gitlab.freedesktop.org/xorg/lib/libXfont/issues], [libXfont2])
    
    26 26
     AC_CONFIG_SRCDIR([Makefile.am])
    
    27 27
     AC_CONFIG_HEADERS([config.h])
    
    ... ... @@ -53,8 +53,14 @@ AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
    53 53
     # Checks for library functions.
    
    54 54
     AC_CHECK_FUNCS([poll readlink])
    
    55 55
     AC_SEARCH_LIBS([strlcat], [bsd])
    
    56
    +if test "$ac_cv_search_strlcat" = "-lbsd"; then
    
    57
    +  AC_DEFINE(HAVE_LIBBSD,1,[Has libbsd])
    
    58
    +fi
    
    56 59
     AC_CONFIG_LIBOBJ_DIR([src/util])
    
    57
    -AC_REPLACE_FUNCS([reallocarray strlcat strlcpy])
    
    60
    +AC_REPLACE_FUNCS([reallocarray realpath strlcat strlcpy])
    
    61
    +
    
    62
    +# Check for BSDish err.h
    
    63
    +AC_CHECK_HEADERS([err.h])
    
    58 64
     
    
    59 65
     # If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
    
    60 66
     # must first be located explicitly.
    

  • debian/changelog
    1
    +libxfont (1:2.0.5-1) unstable; urgency=medium
    
    2
    +
    
    3
    +  * New upstream release.
    
    4
    +
    
    5
    + -- Timo Aaltonen <tjaalton@debian.org>  Wed, 17 Nov 2021 11:43:44 +0200
    
    6
    +
    
    1 7
     libxfont (1:2.0.4-1) unstable; urgency=medium
    
    2 8
     
    
    3 9
       * New upstream release.
    

  • src/fc/fserve.c
    ... ... @@ -124,14 +124,14 @@ static CARD32 fs_blockState;
    124 124
     static int _fs_restart_connection ( FSFpePtr conn );
    
    125 125
     static void fs_send_query_bitmaps ( FontPathElementPtr fpe,
    
    126 126
     				   FSBlockDataPtr blockrec );
    
    127
    -static int fs_send_close_font ( FontPathElementPtr fpe, Font id );
    
    127
    +static int fs_send_close_font (FSFpePtr conn, Font id);
    
    128 128
     static void fs_client_died ( pointer client, FontPathElementPtr fpe );
    
    129 129
     static void _fs_client_access ( FSFpePtr conn, pointer client, Bool sync );
    
    130 130
     static void _fs_client_resolution ( FSFpePtr conn );
    
    131 131
     static fsGenericReply *fs_get_reply (FSFpePtr conn, int *error);
    
    132 132
     static int fs_await_reply (FSFpePtr conn);
    
    133 133
     static void _fs_do_blocked (FSFpePtr conn);
    
    134
    -static void fs_cleanup_bfont (FSBlockedFontPtr bfont);
    
    134
    +static void fs_cleanup_bfont (FSFpePtr conn, FSBlockedFontPtr bfont);
    
    135 135
     
    
    136 136
     char _fs_glyph_undefined;
    
    137 137
     char _fs_glyph_requested;
    
    ... ... @@ -546,7 +546,7 @@ _fs_clean_aborted_blockrec(FSFpePtr conn, FSBlockDataPtr blockrec)
    546 546
         case FS_OPEN_FONT: {
    
    547 547
     	FSBlockedFontPtr bfont = (FSBlockedFontPtr)blockrec->data;
    
    548 548
     
    
    549
    -	fs_cleanup_bfont (bfont);
    
    549
    +	fs_cleanup_bfont (conn, bfont);
    
    550 550
     	_fs_signal_clients_depending(&bfont->clients_depending);
    
    551 551
     	break;
    
    552 552
         }
    
    ... ... @@ -585,16 +585,12 @@ fs_abort_blockrec(FSFpePtr conn, FSBlockDataPtr blockrec)
    585 585
      * then unload the partially created font
    
    586 586
      */
    
    587 587
     static void
    
    588
    -fs_cleanup_bfont (FSBlockedFontPtr bfont)
    
    588
    +fs_cleanup_bfont (FSFpePtr conn, FSBlockedFontPtr bfont)
    
    589 589
     {
    
    590
    -    FSFontDataRec *fsd;
    
    591
    -
    
    592 590
         if (bfont->pfont)
    
    593 591
         {
    
    594
    -	fsd = (FSFontDataRec *) bfont->pfont->fpePrivate;
    
    595
    -
    
    596 592
     	/* make sure the FS knows we choked on it */
    
    597
    -	fs_send_close_font(bfont->pfont->fpe, bfont->fontid);
    
    593
    +	fs_send_close_font(conn, bfont->fontid);
    
    598 594
     
    
    599 595
     	/*
    
    600 596
     	 * Either unload the font if it's being opened for
    
    ... ... @@ -612,7 +608,10 @@ fs_cleanup_bfont (FSBlockedFontPtr bfont)
    612 608
     	    bfont->pfont = 0;
    
    613 609
     	}
    
    614 610
     	else
    
    611
    +	{
    
    612
    +	    FSFontDataRec *fsd = (FSFontDataRec *)bfont->pfont->fpePrivate;
    
    615 613
     	    fsd->generation = -1;
    
    614
    +	}
    
    616 615
         }
    
    617 616
     }
    
    618 617
     
    
    ... ... @@ -746,7 +745,7 @@ fs_read_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    746 745
     	    return StillWorking;
    
    747 746
     	if (rep)
    
    748 747
     	    _fs_done_read (conn, rep->length << 2);
    
    749
    -	fs_cleanup_bfont (bfont);
    
    748
    +	fs_cleanup_bfont (conn, bfont);
    
    750 749
     	_fs_reply_failed (rep, fsOpenBitmapFontReply, "!=");
    
    751 750
     	return BadFontName;
    
    752 751
         }
    
    ... ... @@ -762,7 +761,7 @@ fs_read_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    762 761
     
    
    763 762
         if (rep->otherid && !(bfont->flags & FontReopen))
    
    764 763
         {
    
    765
    -	fs_cleanup_bfont (bfont);
    
    764
    +	fs_cleanup_bfont (conn, bfont);
    
    766 765
     
    
    767 766
     	/* Find old font if we're completely done getting it from server. */
    
    768 767
     	bfont->pfont = find_old_font(rep->otherid);
    
    ... ... @@ -891,7 +890,7 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    891 890
     	    return StillWorking;
    
    892 891
     	if (rep)
    
    893 892
     	    _fs_done_read (conn, rep->length << 2);
    
    894
    -	fs_cleanup_bfont (bfont);
    
    893
    +	fs_cleanup_bfont (conn, bfont);
    
    895 894
     	_fs_reply_failed (rep, fsQueryXInfoReply, "<");
    
    896 895
     	return BadFontName;
    
    897 896
         }
    
    ... ... @@ -964,7 +963,7 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    964 963
     
    
    965 964
         if (ret == -1)
    
    966 965
         {
    
    967
    -	fs_cleanup_bfont (bfont);
    
    966
    +	fs_cleanup_bfont (conn, bfont);
    
    968 967
     	return AllocError;
    
    969 968
         }
    
    970 969
     
    
    ... ... @@ -983,7 +982,7 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    983 982
     	}
    
    984 983
     	else
    
    985 984
     	{
    
    986
    -	    fs_cleanup_bfont (bfont);
    
    985
    +	    fs_cleanup_bfont (conn, bfont);
    
    987 986
     	    err = BadFontName;
    
    988 987
     	}
    
    989 988
     	_fs_free_props (pInfo);
    
    ... ... @@ -1056,7 +1055,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    1056 1055
     	    return StillWorking;
    
    1057 1056
     	if (rep)
    
    1058 1057
     	    _fs_done_read (conn, rep->length << 2);
    
    1059
    -	fs_cleanup_bfont (bfont);
    
    1058
    +	fs_cleanup_bfont (conn, bfont);
    
    1060 1059
     	_fs_reply_failed (rep, fsQueryXExtents16Reply, "<");
    
    1061 1060
     	return BadFontName;
    
    1062 1061
         }
    
    ... ... @@ -1094,7 +1093,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
    1094 1093
         if (!pCI)
    
    1095 1094
         {
    
    1096 1095
     	_fs_done_read (conn, rep->length << 2);
    
    1097
    -	fs_cleanup_bfont(bfont);
    
    1096
    +	fs_cleanup_bfont(conn, bfont);
    
    1098 1097
     	return AllocError;
    
    1099 1098
         }
    
    1100 1099
         fsfont->encoding = pCI;
    
    ... ... @@ -1697,16 +1696,6 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
    1697 1696
     	return AllocError;
    
    1698 1697
         }
    
    1699 1698
     
    
    1700
    -    /*
    
    1701
    -     * Must check this before generating any protocol, otherwise we'll
    
    1702
    -     * mess up a reconnect in progress
    
    1703
    -     */
    
    1704
    -    if (conn->blockState & (FS_BROKEN_CONNECTION | FS_RECONNECTING))
    
    1705
    -    {
    
    1706
    -	_fs_pending_reply (conn);
    
    1707
    -	return Suspended;
    
    1708
    -    }
    
    1709
    -
    
    1710 1699
         fsd->generation = conn->generation;
    
    1711 1700
     
    
    1712 1701
         bfont = (FSBlockedFontPtr) blockrec->data;
    
    ... ... @@ -1718,6 +1707,16 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
    1718 1707
         bfont->clients_depending = (FSClientsDependingPtr)0;
    
    1719 1708
         bfont->freeFont = (flags & FontReopen) == 0;
    
    1720 1709
     
    
    1710
    +    /*
    
    1711
    +     * Must check this before generating any protocol, otherwise we'll
    
    1712
    +     * mess up a reconnect in progress
    
    1713
    +     */
    
    1714
    +    if (conn->blockState & (FS_BROKEN_CONNECTION | FS_RECONNECTING))
    
    1715
    +    {
    
    1716
    +	_fs_pending_reply (conn);
    
    1717
    +	return Suspended;
    
    1718
    +    }
    
    1719
    +
    
    1721 1720
         _fs_client_access (conn, client, (flags & FontOpenSync) != 0);
    
    1722 1721
         _fs_client_resolution(conn);
    
    1723 1722
     
    
    ... ... @@ -1788,7 +1787,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
    1788 1787
     	if (err == Successful)
    
    1789 1788
     	    *ppfont = bfont->pfont;
    
    1790 1789
     	else
    
    1791
    -	    fs_cleanup_bfont (bfont);
    
    1790
    +	    fs_cleanup_bfont (conn, bfont);
    
    1792 1791
     	bfont->freeFont = FALSE;
    
    1793 1792
     	_fs_remove_block_rec (conn, blockrec);
    
    1794 1793
         }
    
    ... ... @@ -1845,7 +1844,7 @@ fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
    1845 1844
     	    if (err == Successful)
    
    1846 1845
     		*ppfont = bfont->pfont;
    
    1847 1846
     	    else
    
    1848
    -		fs_cleanup_bfont (bfont);
    
    1847
    +		fs_cleanup_bfont (conn, bfont);
    
    1849 1848
     	    _fs_remove_block_rec (conn, blockrec);
    
    1850 1849
     	    return err;
    
    1851 1850
     	}
    
    ... ... @@ -1856,9 +1855,8 @@ fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
    1856 1855
     
    
    1857 1856
     /* ARGSUSED */
    
    1858 1857
     static int
    
    1859
    -fs_send_close_font(FontPathElementPtr fpe, Font id)
    
    1858
    +fs_send_close_font(FSFpePtr conn, Font id)
    
    1860 1859
     {
    
    1861
    -    FSFpePtr    conn = (FSFpePtr) fpe->private;
    
    1862 1860
         fsCloseReq  req;
    
    1863 1861
     
    
    1864 1862
         if (conn->blockState & FS_GIVE_UP)
    
    ... ... @@ -1882,7 +1880,7 @@ fs_close_font(FontPathElementPtr fpe, FontPtr pfont)
    1882 1880
         FSFpePtr	    conn = (FSFpePtr) fpe->private;
    
    1883 1881
     
    
    1884 1882
         if (conn->generation == fsd->generation)
    
    1885
    -	fs_send_close_font(fpe, fsd->fontid);
    
    1883
    +	fs_send_close_font(conn, fsd->fontid);
    
    1886 1884
     
    
    1887 1885
     #ifdef DEBUG
    
    1888 1886
         {
    

  • src/fontfile/fontdir.c
    ... ... @@ -125,10 +125,7 @@ FontFileMakeDir(const char *dirName, int size)
    125 125
     	dirlen = strlen(dirName);
    
    126 126
     	attriblen = 0;
    
    127 127
         }
    
    128
    -    if (dirName[dirlen - 1] != '/')
    
    129
    -#ifdef NCD
    
    130
    -    if (dirlen)     /* leave out slash for builtins */
    
    131
    -#endif
    
    128
    +    if (dirlen && dirName[dirlen - 1] != '/')
    
    132 129
     	needslash = 1;
    
    133 130
         dir = malloc(sizeof *dir + dirlen + needslash + 1 +
    
    134 131
     		 (attriblen ? attriblen + 1 : 0));
    

  • src/util/realpath.c
    1
    +/*
    
    2
    + * Copyright © 2019 Jon Turney.
    
    3
    + *
    
    4
    + * Permission to use, copy, modify, and distribute this software for any
    
    5
    + * purpose with or without fee is hereby granted, provided that the above
    
    6
    + * copyright notice and this permission notice appear in all copies.
    
    7
    + *
    
    8
    + * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
    
    9
    + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
    
    10
    + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
    
    11
    + * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    
    12
    + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
    
    13
    + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
    
    14
    + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    
    15
    + */
    
    16
    +
    
    17
    +#ifdef HAVE_CONFIG_H
    
    18
    +#include <config.h>
    
    19
    +#endif
    
    20
    +
    
    21
    +#include "src/util/replace.h"
    
    22
    +
    
    23
    +#ifdef WIN32
    
    24
    +char *
    
    25
    +realpath(const char *path, char *resolved_path)
    
    26
    +{
    
    27
    +  return _fullpath(resolved_path, path, _MAX_PATH);
    
    28
    +}
    
    29
    +#endif

  • src/util/replace.h
    ... ... @@ -57,5 +57,21 @@ extern _X_HIDDEN size_t
    57 57
     strlcat(char *dst, const char *src, size_t siz);
    
    58 58
     #endif
    
    59 59
     
    
    60
    +#ifndef HAVE_ERR_H
    
    61
    +#define err(eval, ...) do { \
    
    62
    +  fprintf(stderr, __VA_ARGS__); \
    
    63
    +  fprintf(stderr, "\n"); \
    
    64
    +  exit(eval); \
    
    65
    +  } while (0)
    
    66
    +#define vwarn(...) do { \
    
    67
    +  fprintf(stderr, __VA_ARGS__); \
    
    68
    +  fprintf(stderr, "\n"); \
    
    69
    +  } while (0)
    
    70
    +#endif
    
    71
    +
    
    72
    +#ifndef HAVE_REALPATH
    
    73
    +extern _X_HIDDEN char *
    
    74
    +realpath(const char *path, char *resolved_path);
    
    75
    +#endif
    
    60 76
     
    
    61 77
     #endif /* XFONT_REPLACE_H */

  • test/utils/font-test-utils.c
    ... ... @@ -58,7 +58,10 @@ SOFTWARE.
    58 58
     #include <stdlib.h>
    
    59 59
     #include <limits.h>
    
    60 60
     #include <assert.h>
    
    61
    +#ifdef HAVE_ERR_H
    
    61 62
     #include <err.h>
    
    63
    +#endif
    
    64
    +#include "src/util/replace.h"
    
    62 65
     #include <X11/X.h>
    
    63 66
     
    
    64 67
     static unsigned long server_generation;
    

  • test/utils/lsfontdir.c
    ... ... @@ -30,7 +30,10 @@
    30 30
     #include "font-test-utils.h"
    
    31 31
     #include <stdio.h>
    
    32 32
     #include <assert.h>
    
    33
    +#ifdef HAVE_ERR_H
    
    33 34
     #include <err.h>
    
    35
    +#endif
    
    36
    +#include "src/util/replace.h"
    
    34 37
     
    
    35 38
     int
    
    36 39
     main(int argc, char **argv)
    


  • Reply to: