mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
fixed libtools portability bug, fixed arc4random() portability,
fixed htobe32 and be32toh portability, fixed error handling in main(), fixed invalid type parameter for randomart image in pcppubkey_printshortinfo(), fixed configure search for libsodium.
This commit is contained in:
@@ -235,7 +235,7 @@ void pcppubkey_printshortinfo(pcp_pubkey_t *key) {
|
||||
int i;
|
||||
printf(" Key-ID: 0x%s\n", key->id);
|
||||
printf(" Owner: %s\n", key->owner);
|
||||
char *r = pcpkey_get_art(key);
|
||||
char *r = pcppubkey_get_art(key);
|
||||
printf(" Random Art ID: ");
|
||||
for (i=0; i<strlen(r); ++i) {
|
||||
if(r[i] == '\n') {
|
||||
|
||||
@@ -9,7 +9,7 @@ void usage() {
|
||||
}
|
||||
|
||||
void version() {
|
||||
fprintf(stderr, "pcp version %d.%d.%d\n",
|
||||
fprintf(stderr, "pcp version %d.%d.%d, use --help to learn how to use.\n",
|
||||
PCP_VERSION_MAJOR, PCP_VERSION_MINOR, PCP_VERSION_PATCH);
|
||||
exit(0);
|
||||
}
|
||||
@@ -168,6 +168,11 @@ int main (int argc, char **argv) {
|
||||
argv += optind;
|
||||
|
||||
|
||||
if(mode == 0) {
|
||||
version();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(usevault == 1) {
|
||||
pcp_inithashes();
|
||||
vault = pcpvault_init(vaultfile);
|
||||
@@ -327,7 +332,7 @@ int main (int argc, char **argv) {
|
||||
|
||||
default:
|
||||
// mode params mixed
|
||||
fatal("Sorry, invalid combinatin of commandline parameters!\n");
|
||||
fatal("Sorry, invalid combination of commandline parameters!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _HAVE_PCP_H
|
||||
#define _HAVE_PCP_H
|
||||
|
||||
#ifndef _BSD_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _HAVE_PCP_Z85
|
||||
#define _HAVE_PCP_Z85
|
||||
|
||||
#ifndef _BSD_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user