Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/99299845e71df9e534e3ae7d4f78e80a46102b3e
...commit
http://git.netsurf-browser.org/netsurf.git/commit/99299845e71df9e534e3ae7d4f78e80a46102b3e
...tree
http://git.netsurf-browser.org/netsurf.git/tree/99299845e71df9e534e3ae7d4f78e80a46102b3e
The branch, master has been updated
via 99299845e71df9e534e3ae7d4f78e80a46102b3e (commit)
via 54441c7c58dca51b1b47e2a942d0c6d93e9845c1 (commit)
from 990598ccdcb9610799dd22aa76056527574d0b6b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=99299845e71df9e534e3ae7d4f78e80a46102b3e
commit 99299845e71df9e534e3ae7d4f78e80a46102b3e
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Indentation
diff --git a/amiga/iff_dr2d.c b/amiga/iff_dr2d.c
index d286070..a4d1738 100644
--- a/amiga/iff_dr2d.c
+++ b/amiga/iff_dr2d.c
@@ -214,14 +214,14 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
for (j = 0;
j != diagram->shape[i].path_length; ) {
switch ((int) diagram->shape[i].path[j]) {
- case svgtiny_PATH_MOVE:
- if(j != 0)
- {
- poly[NumPoints*2].val =
INDICATOR;
- poly[(NumPoints*2)+1].val =
IND_MOVETO;
- NumPoints++;
- }
- poly[(NumPoints*2)].PolyPoints =
diagram->shape[i].path[j + 1];
+ case svgtiny_PATH_MOVE:
+ if(j != 0)
+ {
+ poly[NumPoints*2].val =
INDICATOR;
+
poly[(NumPoints*2)+1].val = IND_MOVETO;
+ NumPoints++;
+ }
+ poly[(NumPoints*2)].PolyPoints
= diagram->shape[i].path[j + 1];
poly[(NumPoints*2)+1].PolyPoints = diagram->shape[i].path[j + 2];
NumPoints++;
curx = (float)
diagram->shape[i].path[j + 1];
@@ -260,7 +260,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
cury =
poly[(NumPoints*2)+1].PolyPoints;
NumPoints++;
j += 7;
- break;
+ break;
default:
printf("error\n");
j += 1;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=54441c7c58dca51b1b47e2a942d0c6d93e9845c1
commit 54441c7c58dca51b1b47e2a942d0c6d93e9845c1
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Ensure we don't leak random memory into our IFF DR2D files
diff --git a/amiga/iff_dr2d.c b/amiga/iff_dr2d.c
index 0d4d77e..d286070 100644
--- a/amiga/iff_dr2d.c
+++ b/amiga/iff_dr2d.c
@@ -28,10 +28,12 @@
#ifndef AMIGA_DR2D_STANDALONE
#include "amiga/os3support.h"
#include "amiga/iff_dr2d.h"
+#include "amiga/misc.h"
#include "content/hlcache.h"
#else
#include "os3support.h"
#include "iff_dr2d.h"
+#include "misc.h"
#endif
struct ColorRegister cm[1000];
@@ -123,9 +125,9 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
PopChunk(iffh);
}
- if(!(PushChunk(iffh,0,ID_ANNO,18)))
+ if(!(PushChunk(iffh,0,ID_ANNO,19)))
{
- WriteChunkBytes(iffh,"Created by NetSurf",18);
+ WriteChunkBytes(iffh,"Created by NetSurf\0",19);
PopChunk(iffh);
}
@@ -170,7 +172,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
}
for (i = 0; i != diagram->shape_count; i++) {
- attr = AllocVecTagList(sizeof(struct attr_struct), NULL);
+ attr = ami_misc_allocvec_clear(sizeof(struct attr_struct), 0);
if (diagram->shape[i].fill == svgtiny_TRANSPARENT)
attr->FillType = FT_NONE;
else
@@ -271,13 +273,13 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
PopChunk(iffh);
}
} else if (diagram->shape[i].text) {
- stxt = AllocVecTagList(sizeof(struct
stxt_struct), NULL);
+ stxt = ami_misc_allocvec_clear(sizeof(struct
stxt_struct), 0);
stxt->BaseX = diagram->shape[i].text_x;
stxt->BaseY = diagram->shape[i].text_y;
stxt->NumChars = strlen(diagram->shape[i].text);
if(!fons_written)
{
- fons = AllocVecTagList(sizeof(struct
fons_struct), NULL);
+ fons =
ami_misc_allocvec_clear(sizeof(struct fons_struct), 0);
if(!(PushChunk(iffh,0,ID_FONS,IFFSIZE_UNKNOWN)))
{
WriteChunkBytes(iffh, fons,
sizeof(struct fons_struct));
-----------------------------------------------------------------------
Summary of changes:
amiga/iff_dr2d.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/amiga/iff_dr2d.c b/amiga/iff_dr2d.c
index 0d4d77e..a4d1738 100644
--- a/amiga/iff_dr2d.c
+++ b/amiga/iff_dr2d.c
@@ -28,10 +28,12 @@
#ifndef AMIGA_DR2D_STANDALONE
#include "amiga/os3support.h"
#include "amiga/iff_dr2d.h"
+#include "amiga/misc.h"
#include "content/hlcache.h"
#else
#include "os3support.h"
#include "iff_dr2d.h"
+#include "misc.h"
#endif
struct ColorRegister cm[1000];
@@ -123,9 +125,9 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
PopChunk(iffh);
}
- if(!(PushChunk(iffh,0,ID_ANNO,18)))
+ if(!(PushChunk(iffh,0,ID_ANNO,19)))
{
- WriteChunkBytes(iffh,"Created by NetSurf",18);
+ WriteChunkBytes(iffh,"Created by NetSurf\0",19);
PopChunk(iffh);
}
@@ -170,7 +172,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
}
for (i = 0; i != diagram->shape_count; i++) {
- attr = AllocVecTagList(sizeof(struct attr_struct), NULL);
+ attr = ami_misc_allocvec_clear(sizeof(struct attr_struct), 0);
if (diagram->shape[i].fill == svgtiny_TRANSPARENT)
attr->FillType = FT_NONE;
else
@@ -212,14 +214,14 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
for (j = 0;
j != diagram->shape[i].path_length; ) {
switch ((int) diagram->shape[i].path[j]) {
- case svgtiny_PATH_MOVE:
- if(j != 0)
- {
- poly[NumPoints*2].val =
INDICATOR;
- poly[(NumPoints*2)+1].val =
IND_MOVETO;
- NumPoints++;
- }
- poly[(NumPoints*2)].PolyPoints =
diagram->shape[i].path[j + 1];
+ case svgtiny_PATH_MOVE:
+ if(j != 0)
+ {
+ poly[NumPoints*2].val =
INDICATOR;
+
poly[(NumPoints*2)+1].val = IND_MOVETO;
+ NumPoints++;
+ }
+ poly[(NumPoints*2)].PolyPoints
= diagram->shape[i].path[j + 1];
poly[(NumPoints*2)+1].PolyPoints = diagram->shape[i].path[j + 2];
NumPoints++;
curx = (float)
diagram->shape[i].path[j + 1];
@@ -258,7 +260,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
cury =
poly[(NumPoints*2)+1].PolyPoints;
NumPoints++;
j += 7;
- break;
+ break;
default:
printf("error\n");
j += 1;
@@ -271,13 +273,13 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char
*buffer,
PopChunk(iffh);
}
} else if (diagram->shape[i].text) {
- stxt = AllocVecTagList(sizeof(struct
stxt_struct), NULL);
+ stxt = ami_misc_allocvec_clear(sizeof(struct
stxt_struct), 0);
stxt->BaseX = diagram->shape[i].text_x;
stxt->BaseY = diagram->shape[i].text_y;
stxt->NumChars = strlen(diagram->shape[i].text);
if(!fons_written)
{
- fons = AllocVecTagList(sizeof(struct
fons_struct), NULL);
+ fons =
ami_misc_allocvec_clear(sizeof(struct fons_struct), 0);
if(!(PushChunk(iffh,0,ID_FONS,IFFSIZE_UNKNOWN)))
{
WriteChunkBytes(iffh, fons,
sizeof(struct fons_struct));
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org