OpenBSDでのコンパイラーが発生された問題を修正した
このコミットが含まれているのは:
コミット
c42f23f79f
|
@ -1,3 +1,6 @@
|
||||||
|
# 1.1.2
|
||||||
|
* OpenBSDでのコンパイラーが発生された問題を修正した
|
||||||
|
|
||||||
# 1.1.1
|
# 1.1.1
|
||||||
* make install-zsh部分を修正
|
* make install-zsh部分を修正
|
||||||
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -1,10 +1,10 @@
|
||||||
NAME=sp
|
NAME=sp
|
||||||
VERSION=1.1.1
|
VERSION=1.1.2
|
||||||
# Linux、Haiku、かIllumos = /usr、FreeBSDかOpenBSD = /usr/local、NetBSD = /usr/pkg
|
# Linux、Haiku、かIllumos = /usr、FreeBSDかOpenBSD = /usr/local、NetBSD = /usr/pkg
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
CC=cc
|
CC=cc
|
||||||
FILES=main.c showpass.c yankpass.c addpass.c delpass.c listpass.c genpass.c initpass.c otppass.c
|
FILES=main.c showpass.c yankpass.c addpass.c delpass.c listpass.c genpass.c initpass.c otppass.c
|
||||||
CFLAGS=-Wall -Wextra -g
|
CFLAGS=-Wall -Wextra -g -I${PREFIX}/include -L${PREFIX}/lib
|
||||||
LDFLAGS=-lgpgme -lcrypto
|
LDFLAGS=-lgpgme -lcrypto
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
2
main.c
2
main.c
|
@ -16,7 +16,7 @@
|
||||||
void helpme();
|
void helpme();
|
||||||
|
|
||||||
const char* sofname = "sp";
|
const char* sofname = "sp";
|
||||||
const char* version = "1.1.1";
|
const char* version = "1.1.2";
|
||||||
|
|
||||||
void helpme() {
|
void helpme() {
|
||||||
printf("076 sp - シンプルなパスワードマネージャー\n");
|
printf("076 sp - シンプルなパスワードマネージャー\n");
|
||||||
|
|
14
showpass.c
14
showpass.c
|
@ -18,7 +18,7 @@ void clean_up(gpgme_ctx_t ctx, gpgme_data_t in, gpgme_data_t out, FILE* gpgfile,
|
||||||
void showpass(char* file) {
|
void showpass(char* file) {
|
||||||
gpgme_ctx_t ctx;
|
gpgme_ctx_t ctx;
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
gpgme_data_t in, out;
|
gpgme_data_t in = NULL, out = NULL;
|
||||||
FILE *gpgfile;
|
FILE *gpgfile;
|
||||||
|
|
||||||
// GPGMEライブラリを設置
|
// GPGMEライブラリを設置
|
||||||
|
@ -52,7 +52,7 @@ void showpass(char* file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(gpgpath, "%s%s%s%s", homedir, basedir, file, ext);
|
snprintf(gpgpath, alllen, "%s%s%s%s", homedir, basedir, file, ext);
|
||||||
gpgfile = fopen(gpgpath, "rb");
|
gpgfile = fopen(gpgpath, "rb");
|
||||||
if (gpgfile == NULL) {
|
if (gpgfile == NULL) {
|
||||||
perror("ファイルを開くに失敗。");
|
perror("ファイルを開くに失敗。");
|
||||||
|
@ -61,7 +61,15 @@ void showpass(char* file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpgme_data_new_from_stream(&in, gpgfile) != GPG_ERR_NO_ERROR || gpgme_data_new(&out) != GPG_ERR_NO_ERROR) {
|
// ファイルからinデータオブジェクトを創作
|
||||||
|
if (gpgme_data_new_from_stream(&in, gpgfile) != GPG_ERR_NO_ERROR) {
|
||||||
|
fprintf(stderr, "GPGMEデータオブジェクトを創作に失敗。\n");
|
||||||
|
clean_up(ctx, in, out, gpgfile, gpgpath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// outデータオブジェクトを創作
|
||||||
|
if (gpgme_data_new(&out) != GPG_ERR_NO_ERROR) {
|
||||||
fprintf(stderr, "GPGMEデータオブジェクトを創作に失敗。\n");
|
fprintf(stderr, "GPGMEデータオブジェクトを創作に失敗。\n");
|
||||||
clean_up(ctx, in, out, gpgfile, gpgpath);
|
clean_up(ctx, in, out, gpgfile, gpgpath);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -52,7 +52,7 @@ void yankpass(char* file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(gpgpath, "%s%s%s%s", homedir, basedir, file, ext);
|
snprintf(gpgpath, alllen, "%s%s%s%s", homedir, basedir, file, ext);
|
||||||
gpgfile = fopen(gpgpath, "rb");
|
gpgfile = fopen(gpgpath, "rb");
|
||||||
if (gpgfile == NULL) {
|
if (gpgfile == NULL) {
|
||||||
perror("ファイルを開くに失敗。");
|
perror("ファイルを開くに失敗。");
|
||||||
|
|
読み込み中…
新しいイシューから参照