外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。
gccで線色を取得する(lc)
:gccで線色を取得する(lc)
@echo off
if not exist %~dpn0.exe (
for /f "delims=:" %%n in ('findstr /n "^#!" %0') do (
more +%%n %0 > %~dpn0.c
gcc -Os %~dpn0.c -o %~dpn0.exe -s
)
)
%~dpn0
goto:eof
REM #jww
REM #e
#!この次の行からプログラムを書いてください
#include "jw.h"
int main(void)
{
FILE *f;
int n;
char S_[256], *F[20];
char lc[4], plc[4];
int flg = 0;
if ( (f = fopen("jwc_temp.txt", "r")) != NULL) {
while (fgets(S_, 256, f) != NULL) {
split(chomp(S_), F);
if (strncmp(S_, "lc", 2) == 0) {
n = strlen(S_);
substr(S_, 2, n-1, plc);
if (flg == 0) { strcpy(lc, plc); flg = 1; }
}
}
} else {
exit(MISSING_JWC_TEMP_TXT);
}
fclose(f);
f = fopen("jwc_temp.txt", "w");
fprintf(f, "h#lc=%s\n", lc);
fclose(f);
return 0;
}