Add leading blank lines check and trim redundant blank newlines
parent
906cf7ebcf
commit
434b639d53
|
@ -1,4 +1,3 @@
|
|||
|
||||
SET (LIBGD_SRC_FILES
|
||||
bmp.h
|
||||
gd.c
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002 by Cold Spring Harbor Laboratory. Funded under Grant
|
||||
P41-RR02188 by the National Institutes of Health.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/* maximum number of colours that can be used.
|
||||
actual number is now passed to initcolors */
|
||||
#define MAXNETSIZE 256
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
/*
|
||||
This is a header file for gd font, generated using
|
||||
bdftogd version 0.51 by Jan Pazdziora, adelton@fi.muni.cz
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
/*
|
||||
This is a header file for gd font, generated using
|
||||
bdftogd version 0.5 by Jan Pazdziora, adelton@fi.muni.cz
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
/*
|
||||
This is a header file for gd font, generated using
|
||||
bdftogd version 0.5 by Jan Pazdziora, adelton@fi.muni.cz
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
/*
|
||||
This is a header file for gd font, generated using
|
||||
bdftogd version 0.5 by Jan Pazdziora, adelton@fi.muni.cz
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/********************************************/
|
||||
/* gd interface to freetype library */
|
||||
/* */
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
const int gdCosT[] = {
|
||||
1024,
|
||||
1023,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
if (BUILD_TEST)
|
||||
SET(DART_TESTING_TIMEOUT 5)
|
||||
|
||||
|
|
|
@ -14,17 +14,21 @@ import sys
|
|||
def check(path):
|
||||
with open(path, 'rb') as fp:
|
||||
# Skip 0 byte files.
|
||||
fp.seek(0, 2)
|
||||
size = fp.tell()
|
||||
if size == 0:
|
||||
first_byte = fp.read(1)
|
||||
if not first_byte:
|
||||
return 0
|
||||
|
||||
# Check for leading blank lines.
|
||||
if b'\n' == first_byte:
|
||||
print('%s: trim leading blank lines' % (path,), file=sys.stderr)
|
||||
return 1
|
||||
|
||||
# Check for missing trailing new line.
|
||||
fp.seek(-1, 2)
|
||||
if b'\n' != fp.read(1):
|
||||
print('%s: missing trailing new line' % (path,), file=sys.stderr)
|
||||
return 1
|
||||
elif size == 1:
|
||||
elif fp.tell() == 1:
|
||||
print('%s: dummy file' % (path,), file=sys.stderr)
|
||||
return 1
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# Simple makefile for building and testing libgd under MSYS/MinGW on
|
||||
# Windows
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# MSYS Fallback Makefile
|
||||
|
||||
This is a simple, straightforward Makefile for building LibGD with
|
||||
|
|
Loading…
Reference in New Issue