Clean up include guards.
* src/tparam.c: Remove include guards for config.h, string.h and code that assumes #ifndef emacs. * src/termcap.c: * src/unexalpha.c: * src/sysdep.c: * src/filemode.c: * src/filelock.c: * src/bidi.c: Likewise.
This commit is contained in:
parent
49d9e6b07b
commit
295d0d8f20
8 changed files with 10 additions and 120 deletions
|
@ -1,5 +1,15 @@
|
|||
2010-07-08 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
Clean up include guards.
|
||||
* tparam.c: Remove include guards for config.h, string.h and code
|
||||
that assumes #ifndef emacs.
|
||||
* termcap.c:
|
||||
* unexalpha.c:
|
||||
* sysdep.c:
|
||||
* filemode.c:
|
||||
* filelock.c:
|
||||
* bidi.c: Likewise.
|
||||
|
||||
Remove prefix-args.c
|
||||
* prefix-args.c: Remove file.
|
||||
* autodeps.mk (ALLOBJS): Remove reference to prefix-args.
|
||||
|
|
|
@ -49,16 +49,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
rule X9 and to its modifications decribed in the "Implementation
|
||||
Notes" section of UAX#9, under "Retaining Format Codes". */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "lisp.h"
|
||||
|
|
|
@ -34,9 +34,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
|
|
@ -18,10 +18,7 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -18,12 +18,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Emacs config.h may rename various library functions such as malloc. */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <lisp.h> /* xmalloc is here */
|
||||
/* Get the O_* definitions for open et al. */
|
||||
|
@ -35,26 +30,6 @@ Boston, MA 02110-1301, USA. */
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#else /* not emacs */
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
char *getenv ();
|
||||
char *malloc ();
|
||||
char *realloc ();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#endif /* not emacs */
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (char *) 0
|
||||
#endif
|
||||
|
@ -84,37 +59,6 @@ int bufsize = 128;
|
|||
#define TERMCAP_FILE "/etc/termcap"
|
||||
#endif
|
||||
|
||||
#ifndef emacs
|
||||
static void
|
||||
memory_out ()
|
||||
{
|
||||
write (2, "virtual memory exhausted\n", 25);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static char *
|
||||
xmalloc (size)
|
||||
unsigned size;
|
||||
{
|
||||
register char *tem = malloc (size);
|
||||
|
||||
if (!tem)
|
||||
memory_out ();
|
||||
return tem;
|
||||
}
|
||||
|
||||
static char *
|
||||
xrealloc (ptr, size)
|
||||
char *ptr;
|
||||
unsigned size;
|
||||
{
|
||||
register char *tem = realloc (ptr, size);
|
||||
|
||||
if (!tem)
|
||||
memory_out ();
|
||||
return tem;
|
||||
}
|
||||
#endif /* not emacs */
|
||||
|
||||
/* Looking up capabilities in the entry already found. */
|
||||
|
||||
|
|
47
src/tparam.c
47
src/tparam.c
|
@ -18,61 +18,14 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Emacs config.h may rename various library functions such as malloc. */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
#include <setjmp.h>
|
||||
#include "lisp.h" /* for xmalloc */
|
||||
#else
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
char *realloc ();
|
||||
#endif
|
||||
|
||||
#endif /* not emacs */
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (char *) 0
|
||||
#endif
|
||||
|
||||
#ifndef emacs
|
||||
static void
|
||||
memory_out ()
|
||||
{
|
||||
write (2, "virtual memory exhausted\n", 25);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static char *
|
||||
xmalloc (size)
|
||||
unsigned size;
|
||||
{
|
||||
register char *tem = malloc (size);
|
||||
|
||||
if (!tem)
|
||||
memory_out ();
|
||||
return tem;
|
||||
}
|
||||
|
||||
static char *
|
||||
xrealloc (ptr, size)
|
||||
char *ptr;
|
||||
unsigned size;
|
||||
{
|
||||
register char *tem = realloc (ptr, size);
|
||||
|
||||
if (!tem)
|
||||
memory_out ();
|
||||
return tem;
|
||||
}
|
||||
#endif /* not emacs */
|
||||
|
||||
/* Assuming STRING is the value of a termcap string entry
|
||||
containing `%' constructs to expand parameters,
|
||||
merge in parameter values and store result in block OUTSTRING points to.
|
||||
|
|
|
@ -28,9 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#include <sys/mman.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if !defined (__NetBSD__) && !defined (__OpenBSD__)
|
||||
#include <filehdr.h>
|
||||
#include <aouthdr.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue