This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.

View the commit online.

commit d21b5db47db8e6834b1cdbd141c29685812144cc
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Jul 25 16:24:56 2025 +0200

    text: Eliminate obsolete FontOps:TextFit function
    
    Just call TextstateTextFit() directly.
    
    Obsoleted in 2022 by 01eb2aef5961d5acc764d5b098c8bb362b11259f
    ("Drop XFontStruct based font handling").
---
 src/tclass.h     | 4 ----
 src/text.c       | 6 +++---
 src/text_ift.c   | 2 +-
 src/text_pango.c | 2 +-
 src/text_xfs.c   | 2 +-
 src/text_xft.c   | 2 +-
 6 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/tclass.h b/src/tclass.h
index 4e20c92e..3e3c03e7 100644
--- a/src/tclass.h
+++ b/src/tclass.h
@@ -48,8 +48,6 @@ typedef struct {
     void            (*Destroy)(TextState * ts);
     void            (*TextSize)(TextState * ts, const char *text, int len,
                                 int *width, int *height, int *ascent);
-    void            (*TextFit)(TextState * ts, char **ptext,
-                               int *pwidth, int textwidth_limit);
     void            (*TextDraw)(TextState * ts, int x, int y,
                                 const char *text, int len);
     int             (*FdcInit)(TextState * ts, Win win, EX_Drawable draw);
@@ -97,8 +95,6 @@ void            TextclassSetJustification(TextClass * tc, int just);
 /* text.c */
 TextState      *TextclassGetTextState(TextClass * tclass, int state,
                                       int active, int sticky);
-void            TextstateTextFit(TextState * ts, char **ptext, int *pw,
-                                 int textwidth_limit);
 void            TextstateTextDraw(TextState * ts, Win win,
                                   EX_Drawable draw, const char *text,
                                   int x, int y, int w, int h,
diff --git a/src/text.c b/src/text.c
index 6522d1ca..3d586a4c 100644
--- a/src/text.c
+++ b/src/text.c
@@ -534,7 +534,7 @@ TextSize(TextClass *tclass, int active, int sticky, int state,
     StrlistFree(lines, num_lines);
 }
 
-__EXPORT__ void
+static void
 TextstateTextFit(TextState *ts, char **ptext, int *pw, int textwidth_limit)
 {
     if (ts->need_utf8 || MB_CUR_MAX > 1)
@@ -617,7 +617,7 @@ TextstateTextDraw(TextState *ts, Win win, EX_Drawable draw,
 
             ts->ops->TextSize(ts, lines[i], 0, &ww, &hh, &ascent);
             if (ww > textwidth_limit)
-                ts->ops->TextFit(ts, &lines[i], &ww, textwidth_limit);
+                TextstateTextFit(ts, &lines[i], &ww, textwidth_limit);
 
             if (justv && num_lines == 1 && textheight_limit > 0)
                 yy += (textheight_limit - hh) / 2;
@@ -650,7 +650,7 @@ TextstateTextDraw(TextState *ts, Win win, EX_Drawable draw,
         {
             ts->ops->TextSize(ts, lines[i], 0, &ww, &hh, &ascent);
             if (ww > textwidth_limit)
-                ts->ops->TextFit(ts, &lines[i], &ww, textwidth_limit);
+                TextstateTextFit(ts, &lines[i], &ww, textwidth_limit);
 
             if (justv && num_lines == 1 && textheight_limit > 0)
                 yy += (textheight_limit - hh) / 2;
diff --git a/src/text_ift.c b/src/text_ift.c
index c9eccfd0..2a7b26e9 100644
--- a/src/text_ift.c
+++ b/src/text_ift.c
@@ -188,7 +188,7 @@ _ift_FdcSetColor(TextState *ts, unsigned int color)
 }
 
 const FontOps   FontOps_ift = {
-    _ift_Load, _ift_Unload, _ift_TextSize, TextstateTextFit, _ift_TextDraw,
+    _ift_Load, _ift_Unload, _ift_TextSize, _ift_TextDraw,
     _ift_FdcInit, NULL, _ift_FdcSetDrawable, _ift_FdcSetColor
 };
 
diff --git a/src/text_pango.c b/src/text_pango.c
index e614cc3b..a84969d1 100644
--- a/src/text_pango.c
+++ b/src/text_pango.c
@@ -131,6 +131,6 @@ _pango_xft_TextDraw(TextState *ts, int x, int y, const char *text,
 
 const FontOps   FontOps_pango = {
     _pango_xft_Load, _pango_xft_Unload,
-    _pango_xft_TextSize, TextstateTextFit, _pango_xft_TextDraw,
+    _pango_xft_TextSize, _pango_xft_TextDraw,
     _xft_FdcInit, _xft_FdcFini, _xft_FdcSetDrawable, _xft_FdcSetColor
 };
diff --git a/src/text_xfs.c b/src/text_xfs.c
index 611aee3b..1cd57429 100644
--- a/src/text_xfs.c
+++ b/src/text_xfs.c
@@ -163,7 +163,7 @@ _xfs_FdcSetColor(TextState *ts, unsigned int color)
 }
 
 const FontOps   FontOps_xfs = {
-    _xfs_Load, _xfs_Unload, _xfs_TextSize, TextstateTextFit, _xfs_TextDraw,
+    _xfs_Load, _xfs_Unload, _xfs_TextSize, _xfs_TextDraw,
     _xfs_FdcInit, NULL, _xfs_FdcSetDrawable, _xfs_FdcSetColor
 };
 
diff --git a/src/text_xft.c b/src/text_xft.c
index f5857b06..6a16c967 100644
--- a/src/text_xft.c
+++ b/src/text_xft.c
@@ -163,6 +163,6 @@ _xft_FdcSetColor(TextState *ts, unsigned int color)
 }
 
 const FontOps   FontOps_xft = {
-    _xft_Load, _xft_Unload, _xft_TextSize, TextstateTextFit, _xft_TextDraw,
+    _xft_Load, _xft_Unload, _xft_TextSize, _xft_TextDraw,
     _xft_FdcInit, _xft_FdcFini, _xft_FdcSetDrawable, _xft_FdcSetColor
 };

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to