The cl_putchar() function does nothing, but call putchar(). stacklevel--

cheers,
natano


Index: cl/cl_funcs.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_funcs.c,v
retrieving revision 1.17
diff -u -r1.17 cl_funcs.c
--- cl/cl_funcs.c       12 Nov 2014 16:29:04 -0000      1.17
+++ cl/cl_funcs.c       15 Nov 2014 20:41:22 -0000
@@ -112,7 +112,7 @@
                        if (clp->smcup == NULL)
                                (void)cl_getcap(sp, "smcup", &clp->smcup);
                        if (clp->smcup != NULL)
-                               (void)tputs(clp->smcup, 1, cl_putchar);
+                               (void)tputs(clp->smcup, 1, putchar);
                }
        } else
                if (clp->ti_te != TE_SENT) {
@@ -120,7 +120,7 @@
                        if (clp->rmcup == NULL)
                                (void)cl_getcap(sp, "rmcup", &clp->rmcup);
                        if (clp->rmcup != NULL)
-                               (void)tputs(clp->rmcup, 1, cl_putchar);
+                               (void)tputs(clp->rmcup, 1, putchar);
                        (void)fflush(stdout);
                }
                (void)fflush(stdout);
@@ -130,9 +130,9 @@
                        if (clp->smso == NULL)
                                return (1);
                        if (on)
-                               (void)tputs(clp->smso, 1, cl_putchar);
+                               (void)tputs(clp->smso, 1, putchar);
                        else
-                               (void)tputs(clp->rmso, 1, cl_putchar);
+                               (void)tputs(clp->rmso, 1, putchar);
                        (void)fflush(stdout);
                } else {
                        if (on)
@@ -316,10 +316,10 @@
        case EX_TERM_SCROLL:
                /* Move the cursor up one line if that's possible. */
                if (clp->cuu1 != NULL)
-                       (void)tputs(clp->cuu1, 1, cl_putchar);
+                       (void)tputs(clp->cuu1, 1, putchar);
                else if (clp->cup != NULL)
                        (void)tputs(tgoto(clp->cup,
-                           0, LINES - 2), 1, cl_putchar);
+                           0, LINES - 2), 1, putchar);
                else
                        return (0);
                /* FALLTHROUGH */
@@ -327,7 +327,7 @@
                /* Clear the line. */
                if (clp->el != NULL) {
                        (void)putchar('\r');
-                       (void)tputs(clp->el, 1, cl_putchar);
+                       (void)tputs(clp->el, 1, putchar);
                } else {
                        /*
                         * Historically, ex didn't erase the line, so, if the
Index: cl/cl_screen.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_screen.c,v
retrieving revision 1.22
diff -u -r1.22 cl_screen.c
--- cl/cl_screen.c      12 Nov 2014 16:29:04 -0000      1.22
+++ cl/cl_screen.c      15 Nov 2014 20:41:37 -0000
@@ -107,7 +107,7 @@
                 */
                if (F_ISSET(sp, SC_EX) && clp->cup != NULL)
                        tputs(tgoto(clp->cup,
-                           0, O_VAL(sp, O_LINES) - 1), 1, cl_putchar);
+                           0, O_VAL(sp, O_LINES) - 1), 1, putchar);
        } else {
                if (cl_vi_init(sp))
                        return (1);
Index: cl/cl_term.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_term.c,v
retrieving revision 1.19
diff -u -r1.19 cl_term.c
--- cl/cl_term.c        12 Nov 2014 16:29:04 -0000      1.19
+++ cl/cl_term.c        15 Nov 2014 20:45:21 -0000
@@ -423,15 +423,3 @@
                *colp = col;
        return (0);
 }
-
-/*
- * cl_putchar --
- *     Function version of putchar, for tputs.
- *
- * PUBLIC: int cl_putchar(int);
- */
-int
-cl_putchar(int ch)
-{
-       return (putchar(ch));
-}
Index: include/cl_extern.h
===================================================================
RCS file: /cvs/src/usr.bin/vi/include/cl_extern.h,v
retrieving revision 1.7
diff -u -r1.7 cl_extern.h
--- include/cl_extern.h 6 Nov 2014 10:48:52 -0000       1.7
+++ include/cl_extern.h 15 Nov 2014 20:44:06 -0000
@@ -26,4 +26,3 @@
 int cl_optchange(SCR *, int, char *, u_long *);
 int cl_omesg(SCR *, CL_PRIVATE *, int);
 int cl_ssize(SCR *, int, size_t *, size_t *, int *);
-int cl_putchar(int);

Reply via email to