#! /bin/sh -e
## 02-FFTblocksizenorm.dpatch by Nick Rusnov <nickrusnov@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Normalize the two FFT blocksize arguments

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
diff -udr enscribe-0.1.0-orig/enscribe.c enscribe-0.1.0/enscribe.c
--- enscribe-0.1.0-orig/enscribe.c	2009-08-10 20:52:16.000000000 -0700
+++ enscribe-0.1.0/enscribe.c	2009-08-10 20:58:28.000000000 -0700
@@ -195,6 +195,9 @@
 	printf("                           2 = 2048\n");
 	printf("                           3 = 4096\n");
 	printf("                           4 = 8192\n");
+        printf("			   5 = 16384\n");
+        printf("			   6 = 32768\n");
+        printf("			   7 = 65536\n");
 	printf("\n");
 //	printf("  -t text                Print text instead of image\n");
 //	printf("  -fs=[font size]        Sets text font size (0 to 4)\n");
@@ -488,9 +491,9 @@
 					{
 					strncpy(arg,&(argv[i][6]),255);
 					j=atoi(arg);
-					if ((j<0) || (j>4))
+					if ((j<0) || (j>7))
 						{
-						fprintf(stderr,"Error: You need to specify a transform size between 0 and 4.\n");
+						fprintf(stderr,"Error: You need to specify a transform size between 0 and 7.\n");
 						exit(BAD_ARGS);
 						}
 					else
