Add leading blank lines check and trim redundant blank newlines

master
Peter Kokot 2018-10-01 19:52:26 +02:00 committed by Mike Frysinger
parent 906cf7ebcf
commit 434b639d53
23 changed files with 8 additions and 30 deletions

View File

@ -1,4 +1,3 @@
SET (LIBGD_SRC_FILES
bmp.h
gd.c

View File

@ -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.

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
/* maximum number of colours that can be used.
actual number is now passed to initcolors */
#define MAXNETSIZE 256

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,3 @@
/********************************************/
/* gd interface to freetype library */
/* */

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
const int gdCosT[] = {
1024,
1023,

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

View File

@ -1,4 +1,3 @@
if (BUILD_TEST)
SET(DART_TESTING_TIMEOUT 5)

View File

@ -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

View File

@ -1,4 +1,3 @@
# Simple makefile for building and testing libgd under MSYS/MinGW on
# Windows

View File

@ -1,4 +1,3 @@
# MSYS Fallback Makefile
This is a simple, straightforward Makefile for building LibGD with