From 8d3f8e1a94dd447cf857c81d8ad2fcb8f1c37970 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Sun, 24 Jan 2016 19:42:23 -0500
Subject: [PATCH] Death to tcl Part 2 (cont.): g_rtext.c

---
 pd/src/g_readwrite.c | 24 +++++++++++++++---------
 pd/src/g_rtext.c     | 30 +++++++++++++++---------------
 2 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/pd/src/g_readwrite.c b/pd/src/g_readwrite.c
index 0402bfbf4..e60f3821c 100644
--- a/pd/src/g_readwrite.c
+++ b/pd/src/g_readwrite.c
@@ -95,12 +95,14 @@ static void glist_readatoms(t_glist *x, int natoms, t_atom *vec,
         }
         else if (template->t_vec[i].ds_type == DT_LIST)
         {
-//            while (1)
-//            {
-//                if (!glist_readscalar(w->w_list, natoms, vec,
-//                    p_nextmsg, 0))
-//                        break;
-//            }
+            /* If we want to keep the canvas field API, this needs to be
+               revisited */
+            //while (1)
+            //{
+            //    if (!glist_readscalar(w->w_list, natoms, vec,
+            //        p_nextmsg, 0))
+            //            break;
+            //}
         }
     }
 }
@@ -432,7 +434,9 @@ void canvas_writescalar(t_symbol *templatesym, t_word *w, t_binbuf *b,
         }
         else if (template->t_vec[i].ds_type == DT_LIST)
         {
-//            glist_writelist(w->w_list->gl_list, b);
+            /* This needs to be revisited if we want to keep the
+               canvas field API */
+            //glist_writelist(w->w_list->gl_list, b);
             binbuf_addsemi(b);
         }
     }
@@ -480,8 +484,10 @@ static void canvas_addtemplatesforscalar(t_symbol *templatesym,
         }
         else if (ds->ds_type == DT_LIST)
         {
-//            canvas_addtemplatesforlist(w->w_list->gl_list,
-//                p_ntemplates, p_templatevec);
+            /* This needs to be revisited if we want to keep the
+               canvas field list */
+            //canvas_addtemplatesforlist(w->w_list->gl_list,
+            //    p_ntemplates, p_templatevec);
         }
     }
 }
diff --git a/pd/src/g_rtext.c b/pd/src/g_rtext.c
index 2d2c822f3..ed03e36ce 100644
--- a/pd/src/g_rtext.c
+++ b/pd/src/g_rtext.c
@@ -534,23 +534,23 @@ void rtext_displace(t_rtext *x, int dx, int dy)
    here until we test a bit more. */
 void rtext_select(t_rtext *x, int state)
 {
-//    t_glist *glist = x->x_glist;
-//    t_canvas *canvas = glist_getcanvas(glist);
-//    if (glist_istoplevel(glist))
-//        sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", canvas, 
-//            x->x_tag, (state? "$pd_colors(selection)" : "$pd_colors(text)"));
-//    if (x->x_text->te_pd->c_wb && x->x_text->te_pd->c_wb->w_displacefnwtag)
-//    {
-//        if (state)
-//            sys_vgui(".x%lx.c addtag selected withtag %s\n",
-//                   glist_getcanvas(glist), x->x_tag);
-//        else
-//            sys_vgui(".x%lx.c dtag %s selected\n",
-//                   glist_getcanvas(glist), x->x_tag);
-//    }
+    //t_glist *glist = x->x_glist;
+    //t_canvas *canvas = glist_getcanvas(glist);
+    //if (glist_istoplevel(glist))
+    //    sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", canvas, 
+    //        x->x_tag, (state? "$pd_colors(selection)" : "$pd_colors(text)"));
+    //if (x->x_text->te_pd->c_wb && x->x_text->te_pd->c_wb->w_displacefnwtag)
+    //{
+    //    if (state)
+    //        sys_vgui(".x%lx.c addtag selected withtag %s\n",
+    //               glist_getcanvas(glist), x->x_tag);
+    //    else
+    //        sys_vgui(".x%lx.c dtag %s selected\n",
+    //               glist_getcanvas(glist), x->x_tag);
+    //}
     /* Not sure the following is needed anymore either-- commenting it
        out to test what (if any) side-effects there are */
-//    canvas_editing = canvas;
+    //canvas_editing = canvas;
 }
 
 void rtext_activate(t_rtext *x, int state)
-- 
GitLab