Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit libedit: fix indentation



details:   https://anonhg.NetBSD.org/src/rev/11f7bc39eaa6
branches:  trunk
changeset: 1023479:11f7bc39eaa6
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Sep 10 18:51:36 2021 +0000

description:
libedit: fix indentation

No change to the resulting object files.

diffstat:

 lib/libedit/readline.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (64 lines):

diff -r 839422b39eae -r 11f7bc39eaa6 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Fri Sep 10 14:56:26 2021 +0000
+++ b/lib/libedit/readline.c    Fri Sep 10 18:51:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.167 2021/09/10 13:29:06 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.168 2021/09/10 18:51:36 rillig Exp $    */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.167 2021/09/10 13:29:06 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.168 2021/09/10 18:51:36 rillig Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -596,7 +596,7 @@
                if (sub && cmd[idx] == '?')
                        break;
                if (!sub && (cmd[idx] == ':' || cmd[idx] == ' '
-                                   || cmd[idx] == '\t' || cmd[idx] == qchar))
+                   || cmd[idx] == '\t' || cmd[idx] == qchar))
                        break;
                idx++;
        }
@@ -824,7 +824,8 @@
                } else {
                        int     qchar;
 
-                       qchar = (offs > 0 && command[offs - 1] == '"')? '"':0;
+                       qchar = (offs > 0 && command[offs - 1] == '"')
+                           ? '"' : '\0';
                        ptr = get_history_event(command + offs, &idx, qchar);
                }
                has_mods = command[offs + (size_t)idx] == ':';
@@ -902,7 +903,7 @@
                switch (*cmd) {
                case ':':
                        continue;
-               case 'h':       /* remove trailing path */
+               case 'h':       /* remove trailing path */
                        if ((aptr = strrchr(tmp, '/')) != NULL)
                                *aptr = '\0';
                        continue;
@@ -1402,7 +1403,7 @@
                return errno;
        errno = 0;
        if (history(h, &ev, H_LOAD, filename) == -1)
-           return errno ? errno : EINVAL;
+               return errno ? errno : EINVAL;
        if (history(h, &ev, H_GETSIZE) == 0)
                history_length = ev.num;
        if (history_length < 0)
@@ -2080,7 +2081,7 @@
 rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
 {
        if (map[c] == NULL)
-           return CC_ERROR;
+               return CC_ERROR;
 
        _rl_update_pos();
 



Home | Main Index | Thread Index | Old Index