Mercurial > vim
comparison src/xdiff/xemit.c @ 18802:3be01cf0a632 v8.1.2389
patch 8.1.2389: using old C style comments
Commit: https://github.com/vim/vim/commit/707d226ac58da752ecc6b7620055fb1df3957a27
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Dec 4 22:16:54 2019 +0100
patch 8.1.2389: using old C style comments
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 Dec 2019 22:30:07 +0100 |
parents | 9c94cfe5dd31 |
children | d5142d87f898 |
comparison
equal
deleted
inserted
replaced
18801:484c63777038 | 18802:3be01cf0a632 |
---|---|
52 xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg) | 52 xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg) |
53 { | 53 { |
54 xdchange_t *xch, *xchp, *lxch; | 54 xdchange_t *xch, *xchp, *lxch; |
55 long max_common = 2 * xecfg->ctxlen + xecfg->interhunkctxlen; | 55 long max_common = 2 * xecfg->ctxlen + xecfg->interhunkctxlen; |
56 long max_ignorable = xecfg->ctxlen; | 56 long max_ignorable = xecfg->ctxlen; |
57 unsigned long ignored = 0; /* number of ignored blank lines */ | 57 unsigned long ignored = 0; // number of ignored blank lines |
58 | 58 |
59 /* remove ignorable changes that are too far before other changes */ | 59 // remove ignorable changes that are too far before other changes |
60 for (xchp = *xscr; xchp && xchp->ignore; xchp = xchp->next) { | 60 for (xchp = *xscr; xchp && xchp->ignore; xchp = xchp->next) { |
61 xch = xchp->next; | 61 xch = xchp->next; |
62 | 62 |
63 if (xch == NULL || | 63 if (xch == NULL || |
64 xch->i1 - (xchp->i1 + xchp->chg1) >= max_ignorable) | 64 xch->i1 - (xchp->i1 + xchp->chg1) >= max_ignorable) |
97 | 97 |
98 #if 0 | 98 #if 0 |
99 static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED) | 99 static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED) |
100 { | 100 { |
101 if (len > 0 && | 101 if (len > 0 && |
102 (isalpha((unsigned char)*rec) || /* identifier? */ | 102 (isalpha((unsigned char)*rec) || // identifier? |
103 *rec == '_' || /* also identifier? */ | 103 *rec == '_' || // also identifier? |
104 *rec == '$')) { /* identifiers from VMS and other esoterico */ | 104 *rec == '$')) { // identifiers from VMS and other esoterico |
105 if (len > sz) | 105 if (len > sz) |
106 len = sz; | 106 len = sz; |
107 while (0 < len && isspace((unsigned char)rec[len - 1])) | 107 while (0 < len && isspace((unsigned char)rec[len - 1])) |
108 len--; | 108 len--; |
109 memcpy(buf, rec, len); | 109 memcpy(buf, rec, len); |
195 | 195 |
196 #if 0 | 196 #if 0 |
197 if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) { | 197 if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) { |
198 long fs1, i1 = xch->i1; | 198 long fs1, i1 = xch->i1; |
199 | 199 |
200 /* Appended chunk? */ | 200 // Appended chunk? |
201 if (i1 >= xe->xdf1.nrec) { | 201 if (i1 >= xe->xdf1.nrec) { |
202 long i2 = xch->i2; | 202 long i2 = xch->i2; |
203 | 203 |
204 /* | 204 /* |
205 * We don't need additional context if | 205 * We don't need additional context if |