Commit 9889dfee authored by Peter Pentchev's avatar Peter Pentchev

Skip termlib.c in the depend target.

parent 8b3d8180
......@@ -104,8 +104,10 @@ depend: *.c *.h
-echo '#' Dependencies: >> Makefile~
-echo >> Makefile~
@{ for i in *.c; do \
if [ "$$i" != 'termlib.c' ]; then \
echo $(CC) -MM $(CINCLUDE) $(CFLAGS) $$i '>>' Makefile~; \
$(CC) -MM $(CINCLUDE) $(CFLAGS) $$i >> Makefile~; \
fi \
done; }
-echo >> Makefile~
mv -f Makefile~ Makefile
......
......@@ -63,6 +63,24 @@ struct BufferOptions b_default_options = {
BUFFER_MAX_BLOCKS
};
long last_position = 0;
/* `last_position' is the position of the first byte in line `last_number'.
*/
long last_number = 1;
/* `last_number' is the number of the line most recently accessed using one
* of the following functions.
*/
long last_length = -1;
/* `last_length' is the length of the line `last_number'. A value of -1
* means that the length of that line hasn't been evaluated yet.
*/
Buffer *last_buffer = 0;
/* `last_buffer' is a pointer to the buffer that the above counters are
* talking about.
* NOTE: If `last_buffer' is modified, the variables `last_position',
* `last_number' and `last_length' are set to 0, 1, -1 (respectively).
*/
#if !HAVE_MEMMOVE
static void
b_memmove(t, s, count)
......@@ -86,10 +104,6 @@ b_memmove(t, s, count)
* Purpose: 1. The buffer is marked modified; 2. Discard all information
* line numbers that could have become invalid by the modification.
*/
extern long last_position;
extern long last_number;
extern long last_length;
extern Buffer* last_buffer;
#define BUFFER_CHANGED(buffer) { \
if (buffer == last_buffer) \
last_position = 0, last_number = 1, last_length = -1; \
......@@ -681,24 +695,6 @@ b_paste_from_file(buffer, filename, position)
/* The following set of functions is for dealing with text-buffers.
*/
long last_position = 0;
/* `last_position' is the position of the first byte in line `last_number'.
*/
long last_number = 1;
/* `last_number' is the number of the line most recently accessed using one
* of the following functions.
*/
long last_length = -1;
/* `last_length' is the length of the line `last_number'. A value of -1
* means that the length of that line hasn't been evaluated yet.
*/
Buffer *last_buffer = 0;
/* `last_buffer' is a pointer to the buffer that the above counters are
* talking about.
* NOTE: If `last_buffer' is modified, the variables `last_position',
* `last_number' and `last_length' are set to 0, 1, -1 (respectively).
*/
long
b_no_lines(buffer)
Buffer *buffer;
......
......@@ -62,7 +62,9 @@
char *alloca();
#endif
#include "exh.h"
#include "hexer.h"
#include "util.h"
#define EXIT_EXEC_FAILED 27
......@@ -70,15 +72,6 @@ char *alloca();
#define ERESTARTSYS EINTR
#endif
extern char *
strerror();
extern char *
exh_skip_expression();
extern char *
exh_skip_replace();
extern
util_trunc();
......
......@@ -65,6 +65,7 @@
char *alloca();
#endif
#include "exh.h"
#include "hexer.h"
extern char *alternate_buffer;
......
......@@ -64,8 +64,7 @@
#endif
#include "hexer.h"
extern char *strerror();
#include "util.h"
const struct buffer_s NO_BUFFER = { 0, 0, 0, 0, 0, 0 };
......
/* Copyright (c) 2009 Peter Pentchev
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* If you modify any part of HEXER and resitribute it, you must add
* a notice to the `README' file and the modified source files containing
* information about the changes you made. I do not want to take
* credit or be blamed for your modifications.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* If you modify any part of HEXER and resitribute it in binary form,
* you must supply a `README' file containing information about the
* changes you made.
* 3. The name of the developer may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* HEXER WAS DEVELOPED BY SASCHA DEMETRIO.
* THIS SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT.
* THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT
* NOT MAKE USE OF THIS WORK.
*
* DISCLAIMER:
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE DEVELOPER BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _UTIL_H_
#define _UTIL_H_
#if !HAVE_STRERROR
char *strerror();
#endif
#endif /* _UTIL_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment