Mercurial > vim
annotate src/xdiff/xutils.h @ 16706:77bcb5055fec v8.1.1355
patch 8.1.1355: obvious mistakes are accepted as valid expressions
commit https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 19 19:59:35 2019 +0200
patch 8.1.1355: obvious mistakes are accepted as valid expressions
Problem: Obvious mistakes are accepted as valid expressions.
Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto,
closes #3981)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 May 2019 20:00:09 +0200 |
parents | 195e8b1fcbbf |
children | 3be01cf0a632 |
rev | line source |
---|---|
14696
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 /* |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 * LibXDiff by Davide Libenzi ( File Differential Library ) |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 * Copyright (C) 2003 Davide Libenzi |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 * |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 * This library is free software; you can redistribute it and/or |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 * modify it under the terms of the GNU Lesser General Public |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 * License as published by the Free Software Foundation; either |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 * version 2.1 of the License, or (at your option) any later version. |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 * |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 * This library is distributed in the hope that it will be useful, |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 * Lesser General Public License for more details. |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 * |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU Lesser General Public |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 * License along with this library; if not, see |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 * <http://www.gnu.org/licenses/>. |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 * |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 * Davide Libenzi <davidel@xmailserver.org> |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 * |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 */ |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 #if !defined(XUTILS_H) |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 #define XUTILS_H |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 long xdl_bogosqrt(long n); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize, |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 xdemitcb_t *ecb); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 int xdl_cha_init(chastore_t *cha, long isize, long icount); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 void xdl_cha_free(chastore_t *cha); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 void *xdl_cha_alloc(chastore_t *cha); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 long xdl_guess_lines(mmfile_t *mf, long sample); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 int xdl_blankline(const char *line, long size, long flags); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 unsigned long xdl_hash_record(char const **data, char const *top, long flags); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 unsigned int xdl_hashbits(unsigned int size); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 int xdl_num_out(char *out, long val); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2, |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 const char *func, long funclen, xdemitcb_t *ecb); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 int xdl_fall_back_diff(xdfenv_t *diff_env, xpparam_t const *xpp, |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 int line1, int count1, int line2, int count2); |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 |
195e8b1fcbbf
patch 8.1.0360: using an external diff program is slow and inflexible
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 #endif /* #if !defined(XUTILS_H) */ |