Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
/* Copyright (C) 2000 The PARI group.12This file is part of the PARI/GP package.34PARI/GP is free software; you can redistribute it and/or modify it under the5terms of the GNU General Public License as published by the Free Software6Foundation; either version 2 of the License, or (at your option) any later7version. It is distributed in the hope that it will be useful, but WITHOUT8ANY WARRANTY WHATSOEVER.910Check the License for details. You should have received a copy of it, along11with the package; see the file 'COPYING'. If not, write to the Free Software12Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */1314/*******************************************************************/15/* HIGH RESOLUTION PLOT VIA POSTSCRIPT FILE */16/*******************************************************************/17#include "pari.h"18#include "rect.h"1920static void21draw(PARI_plot *T, GEN w, GEN x, GEN y)22{23if (pari_daemon()) return; /* parent process returns */24pari_plot_by_file("GP_POSTSCRIPT_VIEWER", ".ps", rect2ps_i(w,x,y,T,1));25exit(0);26}2728void29gp_get_plot(PARI_plot *T)30{31T->width = 400;32T->height = 300;33T->fheight= 9;34T->fwidth = 5;35T->hunit = 3;36T->vunit = 3;37gp_get_ploth_default_sizes(T);38T->dwidth = 0;39T->dheight= 0;40T->draw = &draw;41}424344