Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28495 views
License: GPL3
ubuntu2004
1
/* Copyright (C) 2009 The PARI group.
2
3
This file is part of the PARI/GP package.
4
5
PARI/GP is free software; you can redistribute it and/or modify it under the
6
terms of the GNU General Public License as published by the Free Software
7
Foundation; either version 2 of the License, or (at your option) any later
8
version. It is distributed in the hope that it will be useful, but WITHOUT
9
ANY WARRANTY WHATSOEVER.
10
11
Check the License for details. You should have received a copy of it, along
12
with the package; see the file 'COPYING'. If not, write to the Free Software
13
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
14
15
/* Written by Vasili Burdo */
16
17
#include <windows.h>
18
#include <stdio.h>
19
20
char*
21
win32_datadir(void)
22
{
23
char datadir[1024];
24
char* slash;
25
GetModuleFileNameA(0, datadir, sizeof(datadir));
26
slash = strrchr(datadir, '\\');
27
if (slash) slash[1] = 0;
28
strcat(datadir, "data");
29
return strdup(datadir);
30
}
31
32