}
}
- for ( nb = pos = 0; pos < stat_buf.st_size ; pos++)
- {
- if ( buf[pos] == '\n' ) {
+ for (nb = pos = 0; pos < stat_buf.st_size ; pos++) {
+ if (buf[pos] == '\n') {
nb++;
buf[pos] = 0;
}
res = p_new(char*, nb + 2);
nb = pos = 0;
- while (pos < stat_buf.st_size)
- {
+ while (pos < stat_buf.st_size) {
len = strlen(&(buf[pos]));
if (len) {
res[nb++] = &(buf[pos]);
}
-static char *encode(char * secret, char * sender, char * alias)
+static char *encode(char *secret, char *sender, char *alias)
{
int err = 0;
char *res = NULL;
return res;
}
-static char * decode(char * secret, char * secrets[], char * sender)
+static char *decode(char *secret, char *secrets[], char *sender)
{
- int err = 0;
- char * res = NULL;
- srs_t * srs = srs_new();
+ int err = 0;
+ char *res = NULL;
+ srs_t *srs = srs_new();
if (secret) {
srs_add_secret(srs, secret);
exit (1);
}
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
{
char *buf = NULL;
char *domain = NULL;
bool rev = false;
char **secr = NULL;
- while ((opt = getopt(argc, argv, "d:e:s:f:r")) != -1)
- {
+ while ((opt = getopt(argc, argv, "d:e:s:f:r")) != -1) {
switch (opt) {
case 'd': domain = optarg; break;
case 'e': sender = optarg; break;
}
}
- if ( !sender || !(secret||sfile) || !(rev||domain) ) {
+ if (!sender || !(secret||sfile) || !(rev||domain)) {
help ();
}