aboutsummaryrefslogtreecommitdiff
path: root/graphics/svgalib
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-07-30 07:58:12 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-07-30 07:58:12 +0000
commit1bcc4cf74d6d2727f19ab74154bd675842274219 (patch)
tree4c87b7aa4dc986b48baecb8652654062e0da6523 /graphics/svgalib
parentd235dd8d40acd20a16d9aaf91c5b8083e8d45df5 (diff)
downloadports-1bcc4cf74d6d2727f19ab74154bd675842274219.tar.gz
ports-1bcc4cf74d6d2727f19ab74154bd675842274219.zip
Notes
Diffstat (limited to 'graphics/svgalib')
-rw-r--r--graphics/svgalib/Makefile2
-rw-r--r--graphics/svgalib/files/patch-aj9
-rw-r--r--graphics/svgalib/files/patch-ay198
-rw-r--r--graphics/svgalib/files/patch-src::s3.c10
4 files changed, 119 insertions, 100 deletions
diff --git a/graphics/svgalib/Makefile b/graphics/svgalib/Makefile
index 77c407e7cfb9..d3fefd0d66b2 100644
--- a/graphics/svgalib/Makefile
+++ b/graphics/svgalib/Makefile
@@ -7,7 +7,7 @@
PORTNAME= svgalib
PORTVERSION= 1.4.3
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= graphics devel
MASTER_SITES= http://www.svgalib.org/
diff --git a/graphics/svgalib/files/patch-aj b/graphics/svgalib/files/patch-aj
index dbc29722c3c4..47dc7045e832 100644
--- a/graphics/svgalib/files/patch-aj
+++ b/graphics/svgalib/files/patch-aj
@@ -1,6 +1,15 @@
diff -druN svgalib-1.4.2.orig/src/mach32.c src/mach32.c
--- svgalib-1.4.2.orig/src/mach32.c Fri Aug 25 04:39:39 2000
+++ src/mach32.c Fri Aug 25 04:39:57 2000
+@@ -1544,7 +1544,7 @@
+ goto writerr;
+ printf("mach32: Notice: new EEPROM file >%s< succesful created.\n",
+ eeprom_fname);
+- finish_w_eeprom:
++ finish_w_eeprom: ;
+ }
+ /* Change eeprom contents if requested: */
+ if (!(eeprom_option & EEPROM_USE_MEMCFG))
@@ -2415,7 +2415,7 @@
return ptr;
}
diff --git a/graphics/svgalib/files/patch-ay b/graphics/svgalib/files/patch-ay
index 31c2f7dce469..134b863e3434 100644
--- a/graphics/svgalib/files/patch-ay
+++ b/graphics/svgalib/files/patch-ay
@@ -54,105 +54,6 @@
+ compressed_font_fg = fg;
+}
+
-+void gl_ccwriten(int x, int y, int n, char *s)
-+{
-+ char *str = alloca(n + 1);
-+ memcpy(str, s, n);
-+ str[n] = 0;
-+ gl_ccwrite(x, y, str);
-+}
-+
-+#ifndef SVGA_AOUT
-+
-+static int ccnprintf(int sx, int sy,
-+ size_t bufs, const char *fmt, va_list args)
-+{
-+ char *buf;
-+ static int x = 0, y = 0, x_start = 0;
-+ int n;
-+
-+ buf = alloca(bufs);
-+ n = vsnprintf(buf, bufs, fmt, args);
-+ if (n < 0)
-+ return n; /* buffer did not suffice, return and retry */
-+
-+ if ((sx >= 0) && (sy >= 0)) {
-+ x = x_start = sx;
-+ y = sy;
-+ }
-+
-+ for (; *buf; buf++)
-+ switch (*buf) {
-+ case '\a': /* badly implemented */
-+ fputc('\a', stdout);
-+ fflush(stdout);
-+ break;
-+ case '\b':
-+ x -= afont_width;
-+ if (x < x_start) {
-+ x = WIDTH + (x_start % afont_width);
-+ while(x + afont_width > WIDTH)
-+ x -= afont_width;
-+ if (y >= font_height)
-+ y -= font_height;
-+ }
-+ break;
-+ case '\n':
-+ newline:
-+ y += font_height;
-+ if (y + font_height > HEIGHT)
-+ y %= font_height;
-+ case '\r':
-+ x = x_start;
-+ break;
-+ case '\t':
-+ x += ((TEXT_TABSIZE -
-+ ((x - x_start) / afont_width) % TEXT_TABSIZE) * afont_width);
-+ goto chk_wrap;
-+ break;
-+ case '\v':
-+ y += font_height;
-+ if (y + font_height > HEIGHT)
-+ y %= font_height;
-+ break;
-+ default:
-+ if( ((unsigned char)(*buf) > 0xa0)
-+ && ((unsigned char)(*(buf + 1)) > 0xa0)) {
-+ gl_ccwriten(x, y, 2, buf);
-+ buf += 1;
-+ x += cfont_width;
-+ }
-+ else {
-+ gl_ccwriten(x, y, 1, buf);
-+ x += afont_width;
-+ }
-+ chk_wrap:
-+ if (x + afont_width > WIDTH)
-+ goto newline;
-+ }
-+ return n;
-+}
-+
-+int gl_ccprintf(int x, int y, const char *fmt, ...)
-+{
-+ size_t bufs = BUFSIZ;
-+ int result;
-+ va_list args;
-+
-+ va_start(args, fmt);
-+
-+ /* Loop until buffer size suffices */
-+ do {
-+ result = ccnprintf(x, y, bufs, fmt, args);
-+ bufs <<= 1;
-+ } while(result < 0);
-+
-+ va_end(args);
-+ return result;
-+}
-+
-+#endif
-+
+static int getnextchar(char* s, uchar* cc)
+{
+ if( s[0] == '\0') return 0;
@@ -323,3 +224,102 @@
+ }
+}
+
++void gl_ccwriten(int x, int y, int n, char *s)
++{
++ char *str = alloca(n + 1);
++ memcpy(str, s, n);
++ str[n] = 0;
++ gl_ccwrite(x, y, str);
++}
++
++#ifndef SVGA_AOUT
++
++static int ccnprintf(int sx, int sy,
++ size_t bufs, const char *fmt, va_list args)
++{
++ char *buf;
++ static int x = 0, y = 0, x_start = 0;
++ int n;
++
++ buf = alloca(bufs);
++ n = vsnprintf(buf, bufs, fmt, args);
++ if (n < 0)
++ return n; /* buffer did not suffice, return and retry */
++
++ if ((sx >= 0) && (sy >= 0)) {
++ x = x_start = sx;
++ y = sy;
++ }
++
++ for (; *buf; buf++)
++ switch (*buf) {
++ case '\a': /* badly implemented */
++ fputc('\a', stdout);
++ fflush(stdout);
++ break;
++ case '\b':
++ x -= afont_width;
++ if (x < x_start) {
++ x = WIDTH + (x_start % afont_width);
++ while(x + afont_width > WIDTH)
++ x -= afont_width;
++ if (y >= font_height)
++ y -= font_height;
++ }
++ break;
++ case '\n':
++ newline:
++ y += font_height;
++ if (y + font_height > HEIGHT)
++ y %= font_height;
++ case '\r':
++ x = x_start;
++ break;
++ case '\t':
++ x += ((TEXT_TABSIZE -
++ ((x - x_start) / afont_width) % TEXT_TABSIZE) * afont_width);
++ goto chk_wrap;
++ break;
++ case '\v':
++ y += font_height;
++ if (y + font_height > HEIGHT)
++ y %= font_height;
++ break;
++ default:
++ if( ((unsigned char)(*buf) > 0xa0)
++ && ((unsigned char)(*(buf + 1)) > 0xa0)) {
++ gl_ccwriten(x, y, 2, buf);
++ buf += 1;
++ x += cfont_width;
++ }
++ else {
++ gl_ccwriten(x, y, 1, buf);
++ x += afont_width;
++ }
++ chk_wrap:
++ if (x + afont_width > WIDTH)
++ goto newline;
++ }
++ return n;
++}
++
++int gl_ccprintf(int x, int y, const char *fmt, ...)
++{
++ size_t bufs = BUFSIZ;
++ int result;
++ va_list args;
++
++ va_start(args, fmt);
++
++ /* Loop until buffer size suffices */
++ do {
++ result = ccnprintf(x, y, bufs, fmt, args);
++ bufs <<= 1;
++ } while(result < 0);
++
++ va_end(args);
++ return result;
++}
++
++#endif
++
diff --git a/graphics/svgalib/files/patch-src::s3.c b/graphics/svgalib/files/patch-src::s3.c
new file mode 100644
index 000000000000..7ee38e646313
--- /dev/null
+++ b/graphics/svgalib/files/patch-src::s3.c
@@ -0,0 +1,10 @@
+--- src/s3.c.orig Wed May 3 19:23:57 2000
++++ src/s3.c Fri Jul 30 13:21:55 2004
+@@ -474,7 +474,6 @@
+ dac_used->restoreState(regs);
+ return old_values;
+ }
+- default:
+ }
+ return 0;
+ }