Commit dd7452a9 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Revert "Merge branch 'soundfiler-fixes'"

This reverts commit 16973649, reversing
changes made to 15094e4c.
parent 16973649
...@@ -16,6 +16,3 @@ ...@@ -16,6 +16,3 @@
[submodule "externals/lyonpotpourri"] [submodule "externals/lyonpotpourri"]
path = externals/lyonpotpourri path = externals/lyonpotpourri
url = https://github.com/ericlyon/lyonpotpourri3.0.git url = https://github.com/ericlyon/lyonpotpourri3.0.git
[submodule "externals/cyclone"]
path = externals/cyclone
url = https://git.purrdata.net/jwilkes/pd-cyclone.git
...@@ -431,26 +431,16 @@ cxc_clean: ...@@ -431,26 +431,16 @@ cxc_clean:
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# CYCLONE # CYCLONE
cyclone: cyclone:
ifeq ($(OS_NAME),windows) make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
make -C $(externals_src)/cyclone \ PD_PATH=$(pd_src) PD_INCLUDE=$(DESTDIR)$(includedir)
pdbinpath=$(pd_src)/src PDINCLUDEDIR=$(DESTDIR)$(includedir)
else
make -C $(externals_src)/cyclone \
PDDIR=$(pd_src)
endif
cyclone_install: cyclone_install:
make -C $(externals_src)/cyclone \ make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" \ DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" \
install install
install -p $(externals_src)/cyclone/documentation/purr_help/*.pd \
$(DESTDIR)$(objectsdir)/cyclone
install -p \
$(externals_src)/cyclone/documentation/purr_help/abs_GUI/*.pd \
$(DESTDIR)$(objectsdir)/cyclone
cyclone_clean: cyclone_clean:
make -C $(externals_src)/cyclone \ make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
clean clean
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
......
Subproject commit d22585a21bf88246298e0ae0cd80c45b803e3fd5
...@@ -350,18 +350,18 @@ static void grid_properties(t_gobj *z, t_glist *owner) ...@@ -350,18 +350,18 @@ static void grid_properties(t_gobj *z, t_glist *owner)
gui_start_vmess("gui_external_dialog", "ss", gfx_tag, "grid"); gui_start_vmess("gui_external_dialog", "ss", gfx_tag, "grid");
gui_start_array(); gui_start_array();
gui_s("symbol"); gui_s("receive_symbol"); gui_s(x->x_name->s_name); gui_s("receive_symbol"); gui_s(x->x_name->s_name);
gui_s("int"); gui_s("width"); gui_i(x->x_width); gui_s("width"); gui_i(x->x_width);
gui_s("int"); gui_s("min"); gui_f(x->x_min); gui_s("min"); gui_f(x->x_min);
gui_s("float"); gui_s("max"); gui_f(x->x_max); gui_s("max"); gui_f(x->x_max);
gui_s("int"); gui_s("height"); gui_i(x->x_height); gui_s("height"); gui_i(x->x_height);
gui_s("float"); gui_s("y-min"); gui_f(x->y_min); gui_s("y-min"); gui_f(x->y_min);
gui_s("float"); gui_s("y-max"); gui_f(x->y_max); gui_s("y-max"); gui_f(x->y_max);
gui_s("toggle"); gui_s("show_grid"); gui_i(x->x_grid); gui_s("grid_toggle"); gui_i(x->x_grid);
gui_s("float"); gui_s("x-steps"); gui_f(x->x_xstep); gui_s("x-steps"); gui_f(x->x_xstep);
gui_s("float"); gui_s("y-steps"); gui_f(x->x_ystep); gui_s("y-steps"); gui_f(x->x_ystep);
gui_s("int"); gui_s("x-lines"); gui_i(x->x_xlines); gui_s("x-lines"); gui_i(x->x_xlines);
gui_s("int"); gui_s("y-lines"); gui_i(x->x_ylines); gui_s("y-lines"); gui_i(x->x_ylines);
gui_end_array(); gui_end_array();
gui_end_vmess(); gui_end_vmess();
...@@ -450,11 +450,6 @@ static void grid_displace(t_gobj *z, t_glist *glist, int dx, int dy) ...@@ -450,11 +450,6 @@ static void grid_displace(t_gobj *z, t_glist *glist, int dx, int dy)
x->y_current += dy; x->y_current += dy;
if (xold != text_xpix(&x->x_obj, glist) || yold != text_ypix(&x->x_obj, glist)) if (xold != text_xpix(&x->x_obj, glist) || yold != text_ypix(&x->x_obj, glist))
{ {
gui_vmess("gui_text_displace", "xxii",
glist,
x,
dx,
dy);
//grid_draw_move(x, x->x_glist); //grid_draw_move(x, x->x_glist);
canvas_fixlinesfor(glist, (t_text *)z); canvas_fixlinesfor(glist, (t_text *)z);
} }
...@@ -887,10 +882,10 @@ void grid_setup(void) ...@@ -887,10 +882,10 @@ void grid_setup(void)
/* Big hack for receiving edit-mode resize anchor clicks from /* Big hack for receiving edit-mode resize anchor clicks from
g_editor.c. */ g_editor.c. */
class_addmethod(grid_class, (t_method)grid_click_for_resizing, class_addmethod(grid_class, (t_method)grid_click_for_resizing,
gensym("_click"), gensym("_click_for_resizing"),
A_FLOAT, A_FLOAT, A_FLOAT, 0); A_FLOAT, A_FLOAT, A_FLOAT, 0);
class_addmethod(grid_class, (t_method)grid_motion_for_resizing, class_addmethod(grid_class, (t_method)grid_motion_for_resizing,
gensym("_motion"), gensym("_motion_for_resizing"),
A_FLOAT, A_FLOAT, 0); A_FLOAT, A_FLOAT, 0);
grid_widgetbehavior.w_getrectfn = grid_getrect; grid_widgetbehavior.w_getrectfn = grid_getrect;
grid_widgetbehavior.w_displacefn = grid_displace; grid_widgetbehavior.w_displacefn = grid_displace;
......
...@@ -86,31 +86,30 @@ function ok() { ...@@ -86,31 +86,30 @@ function ok() {
// value: a value for the input // value: a value for the input
function parse_attrs(attrs) { function parse_attrs(attrs) {
var ret = [], var ret = [],
elem, elem;
gate = false; attrs.forEach(function(token, i) {
attrs.forEach(function(attr, i) { if (i % 2 === 0) {
if (i % 3 === 0) { elem = {};
elem = gate ? elem : {}; token = token.split("_");
gate = attr === "enum"; if (token.length > 1) {
elem.type = attr; elem.type = token[token.length - 1];
} else if (i % 3 === 1) { if (elem.type !== "symbol" &&
elem.name = attr; elem.type !== "toggle") {
elem.label = attr.replace("_", " "); // no suffix defaults to "number"
} else { elem.type = "number";
if (elem.type === "enum") {
if (elem.options) {
elem.options.push(attr);
} else { } else {
elem.options = [attr]; // remove the type suffix
token = token.slice(0, -1);
} }
} else { } else {
elem.value = attr; elem.type = "number";
} }
elem.name = token.join("_");
elem.label = token.join(" ");
} else {
elem.value = token;
// now push the object onto the array // now push the object onto the array
if (elem.type !== "enum") { ret.push(elem);
elem.type = elem.type === "enum_index" ? "enum" : elem.type;
ret.push(elem);
}
} }
}); });
return ret; return ret;
...@@ -135,6 +134,7 @@ function register_window_id(gfxstub, args) { ...@@ -135,6 +134,7 @@ function register_window_id(gfxstub, args) {
translate_form(); translate_form();
build_form(external_name, array_of_objects); build_form(external_name, array_of_objects);
// We don't turn on rendering of the "container" div until // We don't turn on rendering of the "container" div until
// We've finished displaying all the spans and populating the // We've finished displaying all the spans and populating the
// labels and form elements. That makes it more efficient and // labels and form elements. That makes it more efficient and
...@@ -160,10 +160,7 @@ function translate_form() { ...@@ -160,10 +160,7 @@ function translate_form() {
function get_input_type(t) { function get_input_type(t) {
return t === "symbol" ? "text" : return t === "symbol" ? "text" :
t === "int" ? "text" : t === "number" ? "text" :
t === "float" ? "text" :
t === "color" ? "color" :
t === "enum" ? "select" :
t === "toggle" ? "checkbox": t === "toggle" ? "checkbox":
"text"; "text";
} }
...@@ -171,39 +168,23 @@ function get_input_type(t) { ...@@ -171,39 +168,23 @@ function get_input_type(t) {
function build_form(external_name, array_of_objects) { function build_form(external_name, array_of_objects) {
var fieldset = document.querySelector("fieldset"); var fieldset = document.querySelector("fieldset");
document.querySelector("legend").textContent = external_name; document.querySelector("legend").textContent = external_name;
array_of_objects.forEach(function(ob) { array_of_objects.forEach(function(elem) {
var elem, var input_elem = document.createElement("input"),
label, label = document.createElement("label");
type = get_input_type(ob.type); input_elem.type = get_input_type(elem.type);
if (type === "select") { if (input_elem.type === "checkbox") {
elem = document.createElement("select"); input_elem.checked = elem.value !== 0;
ob.options.forEach(function(e) { input_elem.onchange = function() {
var option = document.createElement("option"); elem.value = input_elem.checked ? 1 : 0;
option.textContent = e;
elem.appendChild(option);
});
elem.selectedIndex = ob.value;
elem.onchange = function() {
ob.value = elem.selectedIndex;
}
} else if (type === "checkbox") {
elem = document.createElement("input");
elem.type = "checkbox";
elem.checked = ob.value !== 0;
elem.onchange = function() {
ob.value = elem.checked ? 1 : 0;
}; };
} else { } else {
elem = document.createElement("input"); input_elem.value = elem.value;
elem.type = type; input_elem.onchange = function() {
elem.value = ob.value; elem.value = input_elem.value;
elem.onchange = function() {
ob.value = elem.value;
} }
} }
label = document.createElement("label"); label.textContent = elem.label;
label.textContent = ob.label; label.appendChild(input_elem);
label.appendChild(elem);
fieldset.appendChild(label); fieldset.appendChild(label);
// stop-gap until we make this prettier through css: insert a break // stop-gap until we make this prettier through css: insert a break
fieldset.appendChild(document.createElement("br")); fieldset.appendChild(document.createElement("br"));
......
...@@ -3751,7 +3751,6 @@ function gui_scope_draw_bg(cid, tag, fg_color, bg_color, w, h, grid_width, dx, d ...@@ -3751,7 +3751,6 @@ function gui_scope_draw_bg(cid, tag, fg_color, bg_color, w, h, grid_width, dx, d
path_string = "", path_string = "",
fg_xy_path, // to be used for the foreground lines fg_xy_path, // to be used for the foreground lines
fg_mono_path, fg_mono_path,
border,
i, x, y, align_x, align_y; i, x, y, align_x, align_y;
// Path strings for the grid lines // Path strings for the grid lines
// vertical lines... // vertical lines...
...@@ -3768,7 +3767,6 @@ function gui_scope_draw_bg(cid, tag, fg_color, bg_color, w, h, grid_width, dx, d ...@@ -3768,7 +3767,6 @@ function gui_scope_draw_bg(cid, tag, fg_color, bg_color, w, h, grid_width, dx, d
d: path_string, d: path_string,
fill: "none", fill: "none",
stroke: "black", stroke: "black",
class: "grid",
"stroke-width": grid_width, "stroke-width": grid_width,
}); });
// We go ahead and create a path to be used in the foreground. We'll // We go ahead and create a path to be used in the foreground. We'll
...@@ -3785,18 +3783,10 @@ function gui_scope_draw_bg(cid, tag, fg_color, bg_color, w, h, grid_width, dx, d ...@@ -3785,18 +3783,10 @@ function gui_scope_draw_bg(cid, tag, fg_color, bg_color, w, h, grid_width, dx, d
stroke: fg_color, stroke: fg_color,
class: "fgmono" class: "fgmono"
}); });
border = create_item(cid, "rect", {
style: "fill: none;",
width: w,
height: h,
class: "border",
"stroke-width": grid_width
});
g.appendChild(bg); g.appendChild(bg);
g.appendChild(path); g.appendChild(path);
g.appendChild(fg_xy_path); g.appendChild(fg_xy_path);
g.appendChild(fg_mono_path); g.appendChild(fg_mono_path);
g.appendChild(border);
} }
function scope_configure_fg(cid, tag, type, data_array) { function scope_configure_fg(cid, tag, type, data_array) {
...@@ -3815,13 +3805,13 @@ function gui_scope_configure_fg_mono(cid, tag, data_array) { ...@@ -3815,13 +3805,13 @@ function gui_scope_configure_fg_mono(cid, tag, data_array) {
scope_configure_fg(cid, tag, ".fgmono", data_array); scope_configure_fg(cid, tag, ".fgmono", data_array);
} }
function scope_configure_bg_color(cid, tag, color) { function gui_scope_configure_bg_color(cid, tag, color) {
var g = get_gobj(cid, tag), var g = get_gobj(cid, tag),
elem = g.querySelector(".bg"); elem = g.querySelector(".bg");
configure_item(elem, { fill: color }); configure_item(elem, { fill: color });
} }
function scope_configure_fg_color(cid, tag, color) { function gui_scope_configure_fg_color(cid, tag, color) {
var g = get_gobj(cid, tag), var g = get_gobj(cid, tag),
xy = g.querySelector(".fgxy"), xy = g.querySelector(".fgxy"),
mono = g.querySelector(".fgmono"); mono = g.querySelector(".fgmono");
...@@ -3829,33 +3819,11 @@ function scope_configure_fg_color(cid, tag, color) { ...@@ -3829,33 +3819,11 @@ function scope_configure_fg_color(cid, tag, color) {
configure_item(mono, { stroke: color }); configure_item(mono, { stroke: color });
} }
function scope_configure_grid_color(cid, tag, color) {
var g = get_gobj(cid, tag),
grid = g.querySelector(".grid");
configure_item(grid, { stroke: color });
}
function gui_scope_configure_color(cid, tag, layer, color) {
if (layer === "fg") {
scope_configure_fg_color(cid, tag, color);
} else if (layer === "bg") {
scope_configure_bg_color(cid, tag, color);
} else if (layer === "grid") {
scope_configure_grid_color(cid, tag, color);
}
}
function gui_scope_clear_fg(cid, tag) { function gui_scope_clear_fg(cid, tag) {
scope_configure_fg(cid, tag, ".fgxy", []); scope_configure_fg(cid, tag, ".fgxy", []);
scope_configure_fg(cid, tag, ".fgmono", []); scope_configure_fg(cid, tag, ".fgmono", []);
} }
function gui_scope_erase_innards(cid, tag) {
var g = get_gobj(cid, tag);
// Nuke it
g.innerHTML = '';
}
// unauthorized/grid // unauthorized/grid
function get_grid_data(w, h, x_l, y_l) { function get_grid_data(w, h, x_l, y_l) {
......
...@@ -298,7 +298,6 @@ static t_int *tabread_tilde_perform(t_int *w) ...@@ -298,7 +298,6 @@ static t_int *tabread_tilde_perform(t_int *w)
int i; int i;
maxindex = x->x_npoints - 1; maxindex = x->x_npoints - 1;
if (maxindex < 0) goto zero;
if (!buf) goto zero; if (!buf) goto zero;
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
...@@ -399,7 +398,6 @@ static t_int *tabread4_tilde_perform(t_int *w) ...@@ -399,7 +398,6 @@ static t_int *tabread4_tilde_perform(t_int *w)
int i; int i;
maxindex = x->x_npoints - 3; maxindex = x->x_npoints - 3;
if (maxindex < 0) goto zero;
if (!buf) goto zero; if (!buf) goto zero;
......
...@@ -29,7 +29,6 @@ objects use Posix-like threads. */ ...@@ -29,7 +29,6 @@ objects use Posix-like threads. */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <math.h>
#include "m_pd.h" #include "m_pd.h"
...@@ -201,21 +200,6 @@ static void swapstring(char *foo, int doit) ...@@ -201,21 +200,6 @@ static void swapstring(char *foo, int doit)
} }
} }
/* write a sample rate as an 80-bit AIFF-compatible number */
static void makeaiffsamprate(double sr, unsigned char *shit)
{
int exponent;
double mantissa = frexp(sr, &exponent);
unsigned long fixmantissa = ldexp(mantissa, 32);
shit[0] = (exponent+16382)>>8;
shit[1] = exponent+16382;
shit[2] = fixmantissa >> 24;
shit[3] = fixmantissa >> 16;
shit[4] = fixmantissa >> 8;
shit[5] = fixmantissa;
shit[6] = shit[7] = shit[8] = shit[9] = 0;
}
/******************** soundfile access routines **********************/ /******************** soundfile access routines **********************/
/* This routine opens a file, looks for either a nextstep or "wave" header, /* This routine opens a file, looks for either a nextstep or "wave" header,
...@@ -308,8 +292,7 @@ int open_soundfile_via_fd(int fd, int headersize, ...@@ -308,8 +292,7 @@ int open_soundfile_via_fd(int fd, int headersize,
{ {
long chunksize = swap4(((t_wavechunk *)buf)->wc_size, long chunksize = swap4(((t_wavechunk *)buf)->wc_size,
swap), seekto = headersize + chunksize + 8, seekout; swap), seekto = headersize + chunksize + 8, seekout;
if (seekto & 1) /* pad up to even number of bytes */
seekto++;
if (!strncmp(((t_wavechunk *)buf)->wc_id, "fmt ", 4)) if (!strncmp(((t_wavechunk *)buf)->wc_id, "fmt ", 4))
{ {
long commblockonset = headersize + 8; long commblockonset = headersize + 8;
...@@ -361,8 +344,6 @@ int open_soundfile_via_fd(int fd, int headersize, ...@@ -361,8 +344,6 @@ int open_soundfile_via_fd(int fd, int headersize,
{ {
long chunksize = swap4(((t_datachunk *)buf)->dc_size, long chunksize = swap4(((t_datachunk *)buf)->dc_size,
swap), seekto = headersize + chunksize + 8, seekout; swap), seekto = headersize + chunksize + 8, seekout;
if (seekto & 1) /* pad up to even number of bytes */
seekto++;
/* post("chunk %c %c %c %c seek %d", /* post("chunk %c %c %c %c seek %d",
((t_datachunk *)buf)->dc_id[0], ((t_datachunk *)buf)->dc_id[0],
((t_datachunk *)buf)->dc_id[1], ((t_datachunk *)buf)->dc_id[1],
...@@ -393,8 +374,8 @@ int open_soundfile_via_fd(int fd, int headersize, ...@@ -393,8 +374,8 @@ int open_soundfile_via_fd(int fd, int headersize,
goto badheader; goto badheader;
headersize = seekto; headersize = seekto;
} }
bytelimit = swap4(((t_datachunk *)buf)->dc_size, swap) - 8; bytelimit = swap4(((t_datachunk *)buf)->dc_size, swap);
headersize += sizeof(t_datachunk); headersize += 8;
} }
} }
/* seek past header and any sample frames to skip */ /* seek past header and any sample frames to skip */
...@@ -800,6 +781,8 @@ static int create_soundfile(t_canvas *canvas, const char *filename, ...@@ -800,6 +781,8 @@ static int create_soundfile(t_canvas *canvas, const char *filename,
{ {
long datasize = nframes * nchannels * bytespersamp; long datasize = nframes * nchannels * bytespersamp;
long longtmp; long longtmp;
static unsigned char dogdoo[] =
{0x40, 0x0e, 0xac, 0x44, 0, 0, 0, 0, 0, 0, 'S', 'S', 'N', 'D'};
if (strcmp(filenamebuf + strlen(filenamebuf)-4, ".aif") && if (strcmp(filenamebuf + strlen(filenamebuf)-4, ".aif") &&
strcmp(filenamebuf + strlen(filenamebuf)-5, ".aiff")) strcmp(filenamebuf + strlen(filenamebuf)-5, ".aiff"))
strcat(filenamebuf, ".aif"); strcat(filenamebuf, ".aif");
...@@ -812,11 +795,10 @@ static int create_soundfile(t_canvas *canvas, const char *filename, ...@@ -812,11 +795,10 @@ static int create_soundfile(t_canvas *canvas, const char *filename,
longtmp = swap4(nframes, swap); longtmp = swap4(nframes, swap);
memcpy(&aiffhdr->a_nframeshi, &longtmp, 4); memcpy(&aiffhdr->a_nframeshi, &longtmp, 4);
aiffhdr->a_bitspersamp = swap2(8 * bytespersamp, swap); aiffhdr->a_bitspersamp = swap2(8 * bytespersamp, swap);
makeaiffsamprate(samplerate, aiffhdr->a_samprate); memcpy(aiffhdr->a_samprate, dogdoo, sizeof(dogdoo));
strncpy(((char *)(&aiffhdr->a_samprate))+10, "SSND", 4); longtmp = swap4(datasize, swap);
longtmp = swap4(datasize + 8, swap); memcpy(aiffhdr->a_samprate + sizeof(dogdoo), &longtmp, 4);
memcpy(((char *)(&aiffhdr->a_samprate))+14, &longtmp, 4); memset(aiffhdr->a_samprate + sizeof(dogdoo) + 4, 0, 8);
memset(((char *)(&aiffhdr->a_samprate))+18, 0, 8);
headersize = AIFFPLUS; headersize = AIFFPLUS;
} }
else /* WAVE format */ else /* WAVE format */
...@@ -1282,9 +1264,9 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s, ...@@ -1282,9 +1264,9 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
poswas = lseek(fd, 0, SEEK_CUR); poswas = lseek(fd, 0, SEEK_CUR);
eofis = lseek(fd, 0, SEEK_END); eofis = lseek(fd, 0, SEEK_END);
if (poswas < 0 || eofis < 0 || eofis < poswas) if (poswas < 0 || eofis < 0)
{ {
pd_error(x, "lseek failed: %ld..%ld", poswas, eofis); pd_error(x, "lseek failed");
goto done; goto done;
} }
lseek(fd, poswas, SEEK_SET); lseek(fd, poswas, SEEK_SET);
...@@ -1301,13 +1283,14 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s, ...@@ -1301,13 +1283,14 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
{ {
int vecsize; int vecsize;
garray_resize_long(garrays[i], finalsize); garray_resize(garrays[i], finalsize);
/* for sanity's sake let's clear the save-in-patch flag here */ /* for sanity's sake let's clear the save-in-patch flag here */
garray_setsaveit(garrays[i], 0); garray_setsaveit(garrays[i], 0);
if (!garray_getfloatwords(garrays[i], &vecsize, &vecs[i]) garray_getfloatwords(garrays[i], &vecsize,
|| (vecsize != framesinfile)) &vecs[i]);
{
/* if the resize failed, garray_resize reported the error */ /* if the resize failed, garray_resize reported the error */
if (vecsize != framesinfile)
{
pd_error(x, "resize failed"); pd_error(x, "resize failed");
goto done; goto done;
} }
...@@ -1335,18 +1318,18 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s, ...@@ -1335,18 +1318,18 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
{ {
int vecsize; int vecsize;
if (garray_getfloatwords(garrays[i], &vecsize, &vecs[i])) garray_getfloatwords(garrays[i], &vecsize, &vecs[i]);
for (j = itemsread; j < vecsize; j++) for (j = itemsread; j < vecsize; j++)
vecs[i][j].w_float = 0; vecs[i][j].w_float = 0;
} }
/* zero out vectors in excess of number of channels */ /* zero out vectors in excess of number of channels */
for (i = channels; i < argc; i++) for (i = channels; i < argc; i++)
{ {
int vecsize; int vecsize;
t_word *foo; t_word *foo;
if (garray_getfloatwords(garrays[i], &vecsize, &foo)) garray_getfloatwords(garrays[i], &vecsize, &foo);
for (j = 0; j < vecsize; j++) for (j = 0; j < vecsize; j++)
foo[j].w_float = 0; foo[j].w_float = 0;
} }
/* do all graphics updates */ /* do all graphics updates */