== システムプログラム 第2週 == === 参考文献 === * 今日の講義内容 http://www.coins.tsukuba.ac.jp/~syspro/2013/shui/1stHalf.html#sec:data-representation * scanfのマトモな使い方 http://stackoverflow.com/questions/9245682/in-c-what-is-a-safe-alternative-to-sscanf * 無限ループにSIGINTを食わせたときのプロセスの終わらせ方 http://stackoverflow.com/questions/13010531/leaving-an-infinite-while-loop-in-c * 文字列のイテレーション http://stackoverflow.com/questions/3213827/how-to-iterate-over-a-string-in-c * gdb使ってるときに標準入力を食わせる http://stackoverflow.com/questions/455544/how-to-load-program-reading-stdin-and-taking-parameters-in-gdb 関係なかったけどおもしろいと思ったもの: * リダイレクトで入ってきたファイル名を表示 http://stackoverflow.com/questions/1734243/in-c-how-do-i-print-filename-of-file-that-is-redirected-as-input-in-shell * fstat http://codewiki.wikidot.com/c:system-calls:fstat * fstatの使用例 http://ronor.blog81.fc2.com/blog-entry-129.html * 入力がパイプかリダイレクトかttyかの判定 http://stackoverflow.com/questions/1312922/detect-if-stdin-is-a-terminal-or-pipe-in-c-c-qt * gccでC99 http://stackoverflow.com/questions/5210424/how-to-change-linux-to-compile-in-c99-mode * C99だとstdio.hからfilenoが引っ張ってこれない件 http://stackoverflow.com/questions/1423185/fileno-f-lock-and-f-ulock-become-undeclared-and-unavailable-when-i-add-std-c99