Skip to content

Commit

Permalink
Various fixes and small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
watamario15 committed Jan 26, 2024
1 parent 5ad25ff commit 9e17e1f
Show file tree
Hide file tree
Showing 24 changed files with 546 additions and 394 deletions.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Gnuplot 4.4.3 for Windows CE Rev. 2

![](image.png)

This is a *Windows CE only partial* port of Gnuplot 4.4.3. This port is as destructive as dropping support for environments except for Windows Mobile 5.0 Pocket PC SDK on Visual Studio 2005/2008, and implementing only basic features. This is a slight update to the version made by [skawamoto0](https://github.com/skawamoto0) distributed [here](https://kawamoto.no-ip.org/henteko/myapp/gplotwce4431.zip), incorporating some fixes and small improvements.

## How To Run

Download from [Releases](../../releases), extract it into a ASCII-only path (the top folder is recommended), and run `wgnuplot.exe` on your device.

The console screen expects "MS Gothic" font to be available. While this app should run without it, you might face some issues in that case.

`wgnuplot.ini` is not supported.

The charset recognized for this software is UTF-8, thus write `.plt` file in UTF-8. You can use non-ASCII characters on the console although they don't show up while on console.

You must set a font with required glyphs with commands like `set title font` to correctly render a graph contains non-ASCII characters.

## How To Build

Use the `.sln` file located in `vs2005`/`vs2008` on Visual Studio 2005/2008. "Smart Device Programability" and [Windows Mobile 5.0 Pocket PC SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42) must be installed to build this project.

## License

My ([watamario15](https://github.com/watamario15)'s) modifications are provided as public domain. If you want more formal license, I will license my modifications under the terms of the [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/) license.

However, this work is just a modification of another piece of software. Carefully read original documents (especially [Copyright](Copyright)) and [skawamoto0's readme](readme-kawamoto.txt) before using this software.

My contact information can be obtained by invoking the `git log` command within the Git repository.

----

# Gnuplot 4.4.3 for Windows CE Rev 2

![](image-ja.png)

これは **Windows CE 専用で部分的な** Gnuplot 4.4.3 の移植版です。破壊的な移植なので、Visual Studio 2005/2008 上の Windows Mobile 5.0 Pocket PC SDK のみに対応し、実装されている機能も最低限です。[skawamoto0](https://github.com/skawamoto0) 氏が[こちら](https://kawamoto.no-ip.org/henteko/myapp/gplotwce4431.zip)で公開されているものに対し、修正や少しの改良を施した版となります。

## 実行方法

[Releases](../../releases) からダウンロード・展開し、日本語などの非 ASCII 文字を含まない場所(最上層を推奨)に配置します。その後、`wgnuplot.exe` を直接起動します。日本語を含むパスに配置できない制約から「アプリ」フォルダに配置できないので、辞書アプリからの起動には対応しません。Explorer や ceOpener などを用いてください。

コンソール画面には「MS Gothic」フォントを用いるように指定しているので、このフォントを導入した環境での利用を推奨します。

日本語化済みの環境では、元の `wgnuplot.mnu` を削除・移動・改名などした上で `wgnuplot-ja.mnu``wgnuplot.mnu` に改名することで、メニューを日本語表示にできます。

`wgnuplot.ini` の読み込みには対応しません。

このソフトウェアは UTF-8 でファイルの入出力を行います。そのため、`.plt` ファイルは UTF-8 で作成してください。コンソール画面での直接入力でも日本語等を使用できますが、コンソール上では ASCII 文字のみが表示されます。

グラフにおいて日本語などの非 ASCII 文字を表示する場合は、`set title font` コマンドなどを用いて必要なグリフを持つフォントを指定する必要があります。

## ビルド方法

Visual Studio 2005/2008 を用いて `vs2005`/`vs2008` フォルダ内の `.sln` ファイルを開き、ビルドします。「スマート デバイス プログラマビリティ」と [Windows Mobile 5.0 Pocket PC SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42) が必須です。

## ライセンス

私([watamario15](https://github.com/watamario15))の変更分に関しては public domain とします。より正式なライセンスが必要な場合は [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/) でライセンスします。

ただし、本ソフトウェアはあくまでも既存ソフトウェアへの修正に過ぎないことに注意し、元の Gnuplot の文書(特に [Copyright](Copyright))や [skawamoto0 氏の readme](readme-kawamoto.txt) を必ず確認してください。

私への連絡先は、Git リポジトリ内で `git log` コマンドを打つことで取得できます。
Binary file added image-ja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static char *RCSid() { return RCSid("$Id: binary.c,v 1.12 2004/07/25 12:25:00 br

#include "alloc.h"
#include "util.h"
#include "wrapper.h"

/* This routine scans the first block of the file to see if the file
* is a binary file. A file is considered binary if 10% of the
Expand Down
1 change: 1 addition & 0 deletions src/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static char *RCSid() { return RCSid("$Id: command.c,v 1.181.2.9 2010/11/12 19:34
#include "tables.h"
#include "term_api.h"
#include "util.h"
#include "wrapper.h"

#ifdef USE_MOUSE
# include "mouse.h"
Expand Down
1 change: 1 addition & 0 deletions src/datafile.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ static char *RCSid() { return RCSid("$Id: datafile.c,v 1.172.2.11 2010/07/01 22:
#include "util.h"
#include "breaders.h"
#include "variable.h" /* For locale handling */
#include "wrapper.h"

/* test to see if the end of an inline datafile is reached */
#define is_EOF(c) ((c) == 'e' || (c) == 'E')
Expand Down
7 changes: 3 additions & 4 deletions src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static char *RCSid() { return RCSid("$Id: eval.c,v 1.74.2.2 2010/05/12 20:06:10
#include "standard.h"
#include "util.h"
#include "version.h"
#include "wrapper.h"

#include <signal.h>
#include <setjmp.h>
Expand Down Expand Up @@ -620,7 +621,7 @@ evaluate_at(struct at_type *at_ptr, struct value *val_ptr)
double temp = 0;

undefined = FALSE;
errno = 0;
// errno = 0;
reset_stack();

#ifndef DOSX286
Expand All @@ -639,9 +640,7 @@ evaluate_at(struct at_type *at_ptr, struct value *val_ptr)
}
#endif

if (errno == EDOM || errno == ERANGE) {
undefined = TRUE;
} else if (!undefined) { /* undefined (but not errno) may have been set by matherr */
if (!undefined) { /* undefined (but not errno) may have been set by matherr */
(void) pop(val_ptr);
check_stack();
/* At least one machine (ATT 3b1) computes Inf without a SIGFPE */
Expand Down
1 change: 1 addition & 0 deletions src/fit.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static char *RCSid() { return RCSid("$Id: fit.c,v 1.69.2.1 2010/05/02 21:00:58 s
#include "misc.h"
#include "util.h"
#include "variable.h" /* For locale handling */
#include "wrapper.h"

/* Just temporary */
#if defined(VA_START) && defined(STDC_HEADERS)
Expand Down
3 changes: 2 additions & 1 deletion src/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ static char *RCSid() { return RCSid("$Id: mouse.c,v 1.117.2.5 2010/09/10 18:29:1
#include "term_api.h"
#include "util3d.h"
#include "hidden3d.h"
#include "wrapper.h"

#ifdef _Windows
# include "win/winmain.h"
Expand Down Expand Up @@ -550,7 +551,7 @@ GetRulerString(char *p, double x, double y)
if (mouse_setting.polardistance == 1) { /* (distance, angle) */
phi = (180 / M_PI) * atan2(y - ry, x - rx);
# ifdef OS2
strcat(format, ";% #.4gø)");
strcat(format, ";% #.4gø)");
# else
strcat(format, ", % #.4gdeg)");
# endif
Expand Down
5 changes: 2 additions & 3 deletions src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,9 @@ get_num(char str[])
if (token[t_num].l_val.type == INTGR) {
long lval;
char *endptr;
errno = 0;
// errno = 0;
lval = strtol(str, &endptr, 0);
if (!errno &&
((token[t_num].l_val.v.int_val = lval) == lval))
if (((token[t_num].l_val.v.int_val = lval) == lval))
return(endptr-str);
int_warn(t_num, "integer overflow; changing to floating point");
token[t_num].l_val.type = CMPLX;
Expand Down
1 change: 1 addition & 0 deletions src/set.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static char *RCSid() { return RCSid("$Id: set.c,v 1.299.2.15 2010/12/09 03:52:12
#include "variable.h"
#include "pm3d.h"
#include "getcolor.h"
#include "wrapper.h"
#include <ctype.h>

static palette_color_mode pm3d_last_set_palette_mode = SMPAL_COLOR_MODE_NONE;
Expand Down
1 change: 1 addition & 0 deletions src/show.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static char *RCSid() { return RCSid("$Id: show.c,v 1.227.2.8 2010/09/18 02:48:02
#include "color.h"
#include "pm3d.h"
#include "getcolor.h"
#include "wrapper.h"
#include <ctype.h>

/******** Local functions ********/
Expand Down
1 change: 1 addition & 0 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static char *RCSid() { return RCSid("$Id: term.c,v 1.184.2.11 2010/10/07 05:31:4
#include "version.h"
#include "misc.h"
#include "getcolor.h"
#include "wrapper.h"

#ifdef USE_MOUSE
#include "mouse.h"
Expand Down
1 change: 1 addition & 0 deletions src/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static char *RCSid() { return RCSid("$Id: time.c,v 1.20.2.1 2009/06/12 05:02:14

#include "util.h"
#include "variable.h"
#include "wrapper.h"

/* build as a standalone test */

Expand Down
1 change: 1 addition & 0 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static char *RCSid() { return RCSid("$Id: util.c,v 1.84.2.3 2010/03/14 00:51:36
#include "plot.h"
#include "term_api.h" /* for term_end_plot() used by graph_error() */
#include "variable.h" /* For locale handling */
#include "wrapper.h"

#if defined(HAVE_DIRENT_H)
# include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions src/variable.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static char *RCSid() { return RCSid("$Id: variable.c,v 1.34 2008/06/04 02:38:11
#include "command.h"
#include "util.h"
#include "term_api.h"
#include "wrapper.h"

#define PATHSEP_TO_NUL(arg) \
do { \
Expand Down
2 changes: 1 addition & 1 deletion src/win/wcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
/* winmain.c */
#ifdef WIN32
# define PACKVERSION(major,minor) MAKELONG(minor,major)
extern DWORD GetDllVersion(LPCTSTR lpszDllName);
extern DWORD GetDllVersion0(LPCTSTR lpszDllName);
extern char *appdata_directory(void);
#endif

Expand Down
Loading

0 comments on commit 9e17e1f

Please sign in to comment.