> convert.exe image.bmp image.jpgPNG から XPM への変換
> convert.exe image.png image.xpmディレクトリ内の画像フォーマットを一括変換
ディレクトリ内の BMP 画像をすべて JPEG に変換するには mogrify.exe を使う
> mogrify.exe -format jpg *.bmp
> convert.exe image.bmp image.jpgPNG から XPM への変換
> convert.exe image.png image.xpmディレクトリ内の画像フォーマットを一括変換
> mogrify.exe -format jpg *.bmp
python txt2tags
(add-to-list 'load-path "~/projetos/txt2tags/2.x/")
(setq auto-mode-alist (append (list
'("\\.t2t$" . t2t-mode)
)
(if (boundp 'auto-mode-alist) auto-mode-alist)
))
(autoload 't2t-mode "txt2tags-mode" "Txt2tags Mode" t)
Title Author Data %%date(%Y/%m/%d) = Title level 1 = + Numberd titile level 1 + ++ Numberd title level 2 ++ == Title level 2 == === Title level 3 === % comment **bold** and //italic// = Lists = == list == - List 1 - List 2 - list 2.1 == Numberd list == + List 1 + List 2 == Definition list == : Definition list This is definition list = Table = | cell1 | cell2 | cell3 | | cell4 | cell5 || | cell6 | cell7 | cell8 |
hello
└─src
│ hello.c
│ hello.h
│ main.c
│ Makefile.am
│
└─extfunc
extfunc.c
extfunc.h
Makefile.am
main.c から extfunc.c 内の関数をコールするようにしている。
#include "hello.h"
#include "extfunc/extfunc.h"
int main(void)
{
say_hello();
test();
extfunc();
return 0;
}
Example 1. extfunc.c
#include "extfunc.h"
int extfunc(void)
{
printf("extfunc is called!!\n");
return 0;
}
Example 2. extfunc.h
#ifndef __EXTFUNC_H__ #define __EXTFUNC_H__ extern int extfunc(void); #endif /* __EXTFUNC_H__ */automake では直接サブディレクトリのソースを取り込んでコンパイルすることができないようなので、extfunc ディレクトリ内のオブジェクトはライブラリにして最後にリンクさせるようにする。
noinst_LIBRARIES = libextfunc.a libextfunc_a_SOURCES = extfunc.cExample 4. src/Makefile.am
bin_PROGRAMS = hello hello_SOURCES = hello.c hello.h main.c hello_LDADD = extfunc/libextfunc.a SUBDIRS = extfuncLDADD を使用するために configure.ac に AC_PROG_RANLIB を追加する必要がある。そのため automake を行うスクリプトも修正する。
#!/bin/bash -v autoscan sed -e "s/FULL-PACKAGE-NAME/hello/g" -e "s/VERSION/1.0/g" -e "s/BUG-REPORT-ADDRESS/hoge@hogehoge/g" -e "6 i AM_INIT_AUTOMAKE([foreign])" -e "$ i AC_PROG_RANLIB" configure.scan > configure.ac autoheader aclocal automake --add-missing --copy autoconf ./configure
sed -e "$ i AC_PROG_RANLIB" configure.scan > configure.acで configure.scan の最後の行に AC_PROG_RANLIB を追加している。
#!/bin/bash -v autoscan sed -e "s/FULL-PACKAGE-NAME/hello/g" -e "s/VERSION/1.0/g" -e "s/BUG-REPORT-ADDRESS/hoge@hogehoge/g" -e "6 i AM_INIT_AUTOMAKE([foreign])" configure.scan > configure.ac autoheader aclocal automake --add-missing --copy autoconf ./configure
#!/bin/bash -vとしておくことで実行コマンドを表示させることができる。
hello
│
└─src
hello.c
hello.h
main.c
SUBDIRS = src
bin_PROGRAMS = hello hello_SOURCES = hello.c hello.h main.cこの時点でのディレクトリ構成は以下の通り(*は新規追加されたファイル)
hello
│ Makefile.am (*)
│
└─src
hello.c
hello.h
main.c
Makefile.am (*)
AC_INIT([hello, 1.0], [hoge@hogehoge])
AM_INIT_AUTOMAKE([foreign])
hello
│ autoscan-2.63.log (*)
│ configure.ac (*)
│ Makefile.am
│
└─src
hello.c
hello.h
main.c
Makefile.am
hello
│ autoscan-2.63.log
│ config.h.in (*)
│ configure.ac
│ Makefile.am
│
├─autom4te.cache (*)
│ output.0 (*)
│ requests (*)
│ traces.0 (*)
│
└─src
hello.c
hello.h
main.c
Makefile.am
hello
│ aclocal.m4 (*)
│ autoscan-2.63.log
│ config.h.in
│ configure.ac
│ Makefile.am
│
├─autom4te.cache
│ output.0
│ output.1 (*)
│ requests
│ traces.0
│ traces.1 (*)
│
└─src
hello.c
hello.h
main.c
Makefile.am
hello
│ aclocal.m4
│ autoscan-2.63.log
│ config.h.in
│ configure.ac
│ depcomp (*)
│ install-sh (*)
│ Makefile.am
│ Makefile.in (*)
│ missing (*)
│
├─autom4te.cache
│ output.0
│ output.1
│ output.2 (*)
│ requests
│ traces.0
│ traces.1
│ traces.2 (*)
│
└─src
hello.c
hello.h
main.c
Makefile.am
Makefile.in (*)
hello
│ aclocal.m4
│ autoscan-2.63.log
│ config.h.in
│ configure (*)
│ configure.ac
│ depcomp
│ install-sh
│ Makefile.am
│ Makefile.in
│ missing
│
├─autom4te.cache
│ output.0
│ output.1
│ output.2
│ requests
│ traces.0
│ traces.1
│ traces.2
│
└─src
hello.c
hello.h
main.c
Makefile.am
Makefile.in
hello
│ aclocal.m4
│ autoscan-2.63.log
│ config.h (*)
│ config.h.in
│ config.log (*)
│ config.status (*)
│ configure
│ configure.ac
│ depcomp
│ install-sh
│ Makefile (*)
│ Makefile.am
│ Makefile.in
│ missing
│ stamp-h1 (*)
│
├─autom4te.cache
│ output.0
│ output.1
│ output.2
│ requests
│ traces.0
│ traces.1
│ traces.2
│
└─src
│ hello.c
│ hello.h
│ main.c
│ Makefile (*)
│ Makefile.am
│ Makefile.in
│
└─.deps (*)
hello.Po (*)
main.Po (*)
hello
│ aclocal.m4
│ autoscan-2.63.log
│ config.h
│ config.h.in
│ config.h.in~ (*)
│ config.log
│ config.status
│ configure
│ configure.ac
│ depcomp
│ install-sh
│ Makefile
│ Makefile.am
│ Makefile.in
│ missing
│ stamp-h1
│
├─autom4te.cache
│ output.0
│ output.1
│ output.2
│ requests
│ traces.0
│ traces.1
│ traces.2
│
└─src
│ hello.c
│ hello.exe (*)
│ hello.h
│ hello.o (*)
│ main.c
│ main.o (*)
│ Makefile
│ Makefile.am
│ Makefile.in
│
└─.deps
hello.Po
main.Po
> tar zxvf gsl-1.14.tar.gz
> sh ./configure --prefix=/c/usr/MinGW
> make > make install
> gcc -o blas.exe blas.c -lgsl > gcc -o vector.exe vector.c -lgsl > gcc -o vectorview.exe vectorview.c -lgsl > gcc -o eigen.exe eigen.c -lgsl > gcc -o matrix.exe matrix.c -lgsl
> sh automake --add-missing --copy