This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Version 2014-03-31 | |
osecpu-driver-linux-fbdev-x86-32bit.c は、osecpu の linux ドライバーです。 | |
これは X11 を用いずに(GUI環境を用いずに)、起動直後のターミナル環境(昔のDOSのような環境)のみで osecpu を動作させるためのドライバーとなります。 | |
(このドライバーを、実際に osecpu078d/osecpu.c へ組み込んだ、サンプルコードは osecpu078d-linux-fbdev.c です。 | |
また、Ubuntu13.10 など GCC4.8.x でビルドした場合に動作しなかったバグの修正も行ってあります。 | |
なお、現状のOsecpuが対応してるCPUは x86-32bit のみです。64bit環境では動作しないはずです。 | |
(32bit/64bit のマルチライブラリー環境の場合ならば GCC へのビルドオプションとして -m32 を追加することで |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GCC-4.7.x と GCC-4.8.x とでは、後置インクリメントの際のインクリメント実行タイミングが異なるので、 | |
この実行タイミングに暗黙に依存したコードでは動作に違いが生じてしまう場合があるようです。 | |
具体的には以下のようなコードの場合に違いが生じるようです: | |
int a[] = {10, 11, 12}; | |
int *p = a; | |
*p++ = p[1]; | |
GCC-4.7.x では結果は a[] = {11, 11, 12} となりました。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
使い方: | |
ソースファイルパッケージのルートディレクトリ(app0100.ask などのソースファイルが置かれてる所)に、この Makefile を置いた状態で: | |
make osectols | |
これで osectols バイナリーをビルドできます。(ファイル名 osectols) | |
make osecpu | |
これで osecpu-vm バイナリーをビルドできます。(ファイル名 osecpu) | |
make osecpu-vm32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
RM = rm | |
DEFS = | |
CFLAGS = -Os -Wl,-s | |
LIBS = | |
TOL_PROG = osectols | |
TOL_DIR = tol | |
TOL_SRCS = $(TOL_DIR)/osectols.c | |
TOL_OBJS = $(TOL_SRCS:.c=.o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--GHC version 7.6.2, terminfo-0.3.2.5 | |
import System.Console.Terminfo.Base (setupTermFromEnv, getCapability, tiGetOutput1, runTermOutput, TermOutput) | |
import Data.Maybe (fromJust) | |
clearConsole :: IO () | |
clearConsole = do | |
term <- setupTermFromEnv | |
let termOutput = getCapability term (tiGetOutput1 "clear") :: Maybe TermOutput | |
runTermOutput term (fromJust termOutput) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--GHC version 7.6.2, terminfo-0.3.2.5 | |
import System.Console.Terminfo.Base (setupTermFromEnv, getCapability, TermOutput, runTermOutput) | |
import System.Console.Terminfo.Cursor | |
import Data.Maybe (fromJust) | |
setCursorPosition :: Int -> Int -> IO () | |
setCursorPosition xpos ypos = do | |
term <- setupTermFromEnv | |
let cura = fromJust (getCapability term cursorAddress :: Maybe (Point -> TermOutput)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--GHC version 7.6.2, terminfo-0.3.2.5 | |
import System.Console.Terminfo.Base (setupTermFromEnv, getCapability, runTermOutput, TermOutput) | |
import System.Console.Terminfo.Color | |
import Data.Maybe (fromJust) | |
setConsoleColor :: Int -> Int -> IO () | |
setConsoleColor textcol bgcol = do | |
term <- setupTermFromEnv | |
let set_textcol = fromJust (getCapability term setForegroundColor :: Maybe (Color -> TermOutput)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mergeSort :: Eq a => (a -> a -> Bool) -> [a] -> [a] | |
mergeSort _ [] = [] | |
mergeSort f a = concat.loop $ map (\x -> [x]) a | |
where | |
pack [] = [([],[])] | |
pack (a:[]) = [(a,[])] | |
pack (a:b:s) = (a,b) : pack s | |
sort ([],[]) = [] | |
sort ([],b) = b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/tools/gimpinkoptions-gui.c b/app/tools/gimpinkoptions-gui.c | |
index 6daba3b..b457b06 100644 | |
--- a/app/tools/gimpinkoptions-gui.c | |
+++ b/app/tools/gimpinkoptions-gui.c | |
@@ -29,6 +29,7 @@ | |
#include "widgets/gimpblobeditor.h" | |
#include "widgets/gimppropwidgets.h" | |
+#include "widgets/gimpspinscale.h" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
更新:2013.08.23 | |
00-osecpu072d | |
osecpu072d.cのそれを、これに置き換えてビルドすれば動く。 | |
・とりあえず絵は出る。 | |
・アニメーションも動く。 | |
・新しいキー入力に対応。( editor.ose、othello.ose で動作確認) | |
・c_blike_01f_linux の最新版 (commit: 83868bb8067f4209f4409e5b2d268b164b7a653e 以降)が別途必須。 |
OlderNewer