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