lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
July 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
1 participants
220 discussions
Start a n
N
ew thread
[geany/geany-plugins] 469cfa: GeanyPG: Fix a few integer-signedness issues
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/1.22_release Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:26:47 Commit: 469cfa6d829e92065ebcabe883f688083b61e088
https://github.com/geany/geany-plugins/commit/469cfa6d829e92065ebcabe883f68…
Log Message: ----------- GeanyPG: Fix a few integer-signedness issues Modified Paths: -------------- geanypg/src/pinentry.c Modified: geanypg/src/pinentry.c 13 files changed, 7 insertions(+), 6 deletions(-) =================================================================== @@ -45,17 +45,18 @@ static void geanypg_read_till(int fd, char delim) while (1) { char val; - unsigned long rv = read(fd, &val, 1); - if (!rv || val == delim) + ssize_t rv = read(fd, &val, 1); + if (rv <= 0 || val == delim) break; } } static int geanypg_read(int fd, char delim, int max, char * buffer) { - int idx, rv = 1; + int idx; + ssize_t rv = 1; char ch = 0; - for (idx = 0; (idx < max - 1) && rv && ch != delim; ++idx) + for (idx = 0; (idx < max - 1) && rv > 0 && ch != delim; ++idx) { rv = read(fd, &ch, 1); buffer[idx] = ch; @@ -146,8 +147,8 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, while (1) { char val; - register unsigned long rv = read(outpipe[READ], &val, 1); - if (!rv || val == '\n') + register ssize_t rv = read(outpipe[READ], &val, 1); + if (rv <= 0 || val == '\n') { while (!write(fd, "\n", 1)); break; @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 5542e5: GeanyPG: Initialize arrays only with values computable at load time
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:24:58 Commit: 5542e515f36a31e0bf2ab90e0d2623806e48206c
https://github.com/geany/geany-plugins/commit/5542e515f36a31e0bf2ab90e0d262…
Log Message: ----------- GeanyPG: Initialize arrays only with values computable at load time Modified Paths: -------------- geanypg/src/pinentry.c Modified: geanypg/src/pinentry.c 4 files changed, 3 insertions(+), 1 deletions(-) =================================================================== @@ -91,7 +91,9 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, if (!childpid) { /* pinentry */ char arg1[] = "pinentry"; - char * argv[] = {arg1, NULL}; + char * argv[] = {NULL, NULL}; + + argv[0] = arg1; close(outpipe[READ]); dup2(outpipe[WRITE], STDOUT_FILENO); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 5542e5: GeanyPG: Initialize arrays only with values computable at load time
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/1.22_release Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:24:58 Commit: 5542e515f36a31e0bf2ab90e0d2623806e48206c
https://github.com/geany/geany-plugins/commit/5542e515f36a31e0bf2ab90e0d262…
Log Message: ----------- GeanyPG: Initialize arrays only with values computable at load time Modified Paths: -------------- geanypg/src/pinentry.c Modified: geanypg/src/pinentry.c 4 files changed, 3 insertions(+), 1 deletions(-) =================================================================== @@ -91,7 +91,9 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, if (!childpid) { /* pinentry */ char arg1[] = "pinentry"; - char * argv[] = {arg1, NULL}; + char * argv[] = {NULL, NULL}; + + argv[0] = arg1; close(outpipe[READ]); dup2(outpipe[WRITE], STDOUT_FILENO); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 195f5a: GeanyPG: Initialize local arrays for better safety
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:22:41 Commit: 195f5a30ad5a3796cc4a820605712750bf807fd6
https://github.com/geany/geany-plugins/commit/195f5a30ad5a3796cc4a820605712…
Log Message: ----------- GeanyPG: Initialize local arrays for better safety Modified Paths: -------------- geanypg/src/pinentry.c geanypg/src/verify_aux.c Modified: geanypg/src/pinentry.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -73,7 +73,7 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, int inpipe[2]; int childpid; int status; - char readbuffer[2080]; /* pinentry should at least support passphrases of up to 2048 characters */ + char readbuffer[2080] = {0}; /* pinentry should at least support passphrases of up to 2048 characters */ FILE * childin; if (pipe(outpipe)) Modified: geanypg/src/verify_aux.c 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -48,7 +48,7 @@ static void geanypg_get_keys_with_fp(encrypt_data * ed, char * buffer) sprintf(buffer, "%s <%s>", name, email); else { - char tmp[62]; + char tmp[62] = {0}; strncpy(tmp, buffer, 41); sprintf(buffer, "%s %s", _("a key with fingerprint"), tmp); } @@ -107,11 +107,11 @@ static char * geanypg_result(gpgme_signature_t sig) "other flags:%s%s\n" "notations .: %s\n"); char * buffer; - char summary[128]; + char summary[128] = {0}; const char * pubkey = gpgme_pubkey_algo_name(sig->pubkey_algo); const char * hash = gpgme_hash_algo_name(sig->hash_algo); - char created[64]; - char expires[64]; + char created[64] = {0}; + char expires[64] = {0}; size_t buffer_size; if (sig->timestamp) strncpy(created, ctime((time_t*)&sig->timestamp), 64); @@ -161,7 +161,7 @@ void geanypg_check_sig(encrypt_data * ed, gpgme_signature_t sig) { GtkWidget * dialog; gpgme_sigsum_t summary; - char buffer[512]; + char buffer[512] = {0}; char * result; strncpy(buffer, sig->fpr, 40); buffer[40] = 0; @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 195f5a: GeanyPG: Initialize local arrays for better safety
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/1.22_release Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:22:41 Commit: 195f5a30ad5a3796cc4a820605712750bf807fd6
https://github.com/geany/geany-plugins/commit/195f5a30ad5a3796cc4a820605712…
Log Message: ----------- GeanyPG: Initialize local arrays for better safety Modified Paths: -------------- geanypg/src/pinentry.c geanypg/src/verify_aux.c Modified: geanypg/src/pinentry.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -73,7 +73,7 @@ gpgme_error_t geanypg_passphrase_cb(void * hook, int inpipe[2]; int childpid; int status; - char readbuffer[2080]; /* pinentry should at least support passphrases of up to 2048 characters */ + char readbuffer[2080] = {0}; /* pinentry should at least support passphrases of up to 2048 characters */ FILE * childin; if (pipe(outpipe)) Modified: geanypg/src/verify_aux.c 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -48,7 +48,7 @@ static void geanypg_get_keys_with_fp(encrypt_data * ed, char * buffer) sprintf(buffer, "%s <%s>", name, email); else { - char tmp[62]; + char tmp[62] = {0}; strncpy(tmp, buffer, 41); sprintf(buffer, "%s %s", _("a key with fingerprint"), tmp); } @@ -107,11 +107,11 @@ static char * geanypg_result(gpgme_signature_t sig) "other flags:%s%s\n" "notations .: %s\n"); char * buffer; - char summary[128]; + char summary[128] = {0}; const char * pubkey = gpgme_pubkey_algo_name(sig->pubkey_algo); const char * hash = gpgme_hash_algo_name(sig->hash_algo); - char created[64]; - char expires[64]; + char created[64] = {0}; + char expires[64] = {0}; size_t buffer_size; if (sig->timestamp) strncpy(created, ctime((time_t*)&sig->timestamp), 64); @@ -161,7 +161,7 @@ void geanypg_check_sig(encrypt_data * ed, gpgme_signature_t sig) { GtkWidget * dialog; gpgme_sigsum_t summary; - char buffer[512]; + char buffer[512] = {0}; char * result; strncpy(buffer, sig->fpr, 40); buffer[40] = 0; @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 29e7c7: GeanyPG: Don't use C99 variable length arrays
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:21:55 Commit: 29e7c7efae104586ecccb9b228e99506f2acd7b6
https://github.com/geany/geany-plugins/commit/29e7c7efae104586ecccb9b228e99…
Log Message: ----------- GeanyPG: Don't use C99 variable length arrays Modified Paths: -------------- geanypg/src/helper_functions.c geanypg/src/key_selection_dialog.c Modified: geanypg/src/helper_functions.c 11 files changed, 7 insertions(+), 4 deletions(-) =================================================================== @@ -159,22 +159,25 @@ void geanypg_load_buffer(gpgme_data_t * buffer) void geanypg_write_file(FILE * file) { - unsigned bufsize = 2048; +#define BUFSIZE 2048 + unsigned long size; - char buffer[bufsize]; + char buffer[BUFSIZE] = {0}; GeanyDocument * doc = document_get_current(); if (abs(sci_get_selection_start(doc->editor->sci) - sci_get_selection_end(doc->editor->sci))) { /* replace selected text * clear selection, cursor should be at the end or beginneng of the selection */ scintilla_send_message(doc->editor->sci, SCI_REPLACESEL, 0, (sptr_t)""); - while ((size = fread(buffer, 1, bufsize, file))) + while ((size = fread(buffer, 1, BUFSIZE, file))) /* add at the cursor */ scintilla_send_message(doc->editor->sci, SCI_ADDTEXT, (uptr_t) size, (sptr_t) buffer); } else { /* replace complete document */ scintilla_send_message(doc->editor->sci, SCI_CLEARALL, 0, 0); - while ((size = fread(buffer, 1, bufsize, file))) + while ((size = fread(buffer, 1, BUFSIZE, file))) scintilla_send_message(doc->editor->sci, SCI_APPENDTEXT, (uptr_t) size, (sptr_t) buffer); } + +#undef BUFSIZE } Modified: geanypg/src/key_selection_dialog.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -70,14 +70,14 @@ static GtkListStore * geanypg_makelist(gpgme_key_t * key_array, unsigned long nk { char * name = (key_array[idx]->uids && key_array[idx]->uids->name) ? key_array[idx]->uids->name : &empty_string; char * email = (key_array[idx]->uids && key_array[idx]->uids->email) ? key_array[idx]->uids->email : &empty_string; - char buffer[strlen(name) + strlen(email) + 7]; - sprintf(buffer, "%s <%s>", name, email); + gchar * buffer = g_strdup_printf("%s <%s>", name, email); gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, TOGGLE_COLUMN, FALSE, RECIPIENT_COLUMN, buffer, KEYID_COLUMN, key_array[idx]->subkeys->keyid, -1); + g_free(buffer); } return list; } @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 29e7c7: GeanyPG: Don't use C99 variable length arrays
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/1.22_release Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:21:55 Commit: 29e7c7efae104586ecccb9b228e99506f2acd7b6
https://github.com/geany/geany-plugins/commit/29e7c7efae104586ecccb9b228e99…
Log Message: ----------- GeanyPG: Don't use C99 variable length arrays Modified Paths: -------------- geanypg/src/helper_functions.c geanypg/src/key_selection_dialog.c Modified: geanypg/src/helper_functions.c 11 files changed, 7 insertions(+), 4 deletions(-) =================================================================== @@ -159,22 +159,25 @@ void geanypg_load_buffer(gpgme_data_t * buffer) void geanypg_write_file(FILE * file) { - unsigned bufsize = 2048; +#define BUFSIZE 2048 + unsigned long size; - char buffer[bufsize]; + char buffer[BUFSIZE] = {0}; GeanyDocument * doc = document_get_current(); if (abs(sci_get_selection_start(doc->editor->sci) - sci_get_selection_end(doc->editor->sci))) { /* replace selected text * clear selection, cursor should be at the end or beginneng of the selection */ scintilla_send_message(doc->editor->sci, SCI_REPLACESEL, 0, (sptr_t)""); - while ((size = fread(buffer, 1, bufsize, file))) + while ((size = fread(buffer, 1, BUFSIZE, file))) /* add at the cursor */ scintilla_send_message(doc->editor->sci, SCI_ADDTEXT, (uptr_t) size, (sptr_t) buffer); } else { /* replace complete document */ scintilla_send_message(doc->editor->sci, SCI_CLEARALL, 0, 0); - while ((size = fread(buffer, 1, bufsize, file))) + while ((size = fread(buffer, 1, BUFSIZE, file))) scintilla_send_message(doc->editor->sci, SCI_APPENDTEXT, (uptr_t) size, (sptr_t) buffer); } + +#undef BUFSIZE } Modified: geanypg/src/key_selection_dialog.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -70,14 +70,14 @@ static GtkListStore * geanypg_makelist(gpgme_key_t * key_array, unsigned long nk { char * name = (key_array[idx]->uids && key_array[idx]->uids->name) ? key_array[idx]->uids->name : &empty_string; char * email = (key_array[idx]->uids && key_array[idx]->uids->email) ? key_array[idx]->uids->email : &empty_string; - char buffer[strlen(name) + strlen(email) + 7]; - sprintf(buffer, "%s <%s>", name, email); + gchar * buffer = g_strdup_printf("%s <%s>", name, email); gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, TOGGLE_COLUMN, FALSE, RECIPIENT_COLUMN, buffer, KEYID_COLUMN, key_array[idx]->subkeys->keyid, -1); + g_free(buffer); } return list; } @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 7dde89: GeanyPG: Don't mix declarations and code
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:19:47 Commit: 7dde896b0f8fde07c2ecaf73473b468f246f37e4
https://github.com/geany/geany-plugins/commit/7dde896b0f8fde07c2ecaf73473b4…
Log Message: ----------- GeanyPG: Don't mix declarations and code Modified Paths: -------------- geanypg/src/decrypt_cb.c geanypg/src/encrypt_cb.c geanypg/src/geanypg.c geanypg/src/key_selection_dialog.c geanypg/src/sign_cb.c geanypg/src/verify_aux.c geanypg/src/verify_cb.c Modified: geanypg/src/decrypt_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -64,8 +64,9 @@ static void geanypg_decrypt_verify(encrypt_data * ed) void geanypg_decrypt_cb(GtkMenuItem * menuitem, gpointer user_data) { encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_protocol(ed.ctx, GPGME_PROTOCOL_OpenPGP); Modified: geanypg/src/encrypt_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -60,8 +60,9 @@ void geanypg_encrypt_cb(GtkMenuItem * menuitem, gpointer user_data) { int sign; encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_armor(ed.ctx, 1); Modified: geanypg/src/geanypg.c 16 files changed, 11 insertions(+), 5 deletions(-) =================================================================== @@ -64,6 +64,12 @@ gpgme_error_t geanypg_show_err_msg(gpgme_error_t err) void plugin_init(GeanyData *data) { + GtkWidget * submenu; + GtkWidget * encrypt; + GtkWidget * sign; + GtkWidget * decrypt; + GtkWidget * verify; + gpgme_error_t err = geanypg_init_gpgme(); if (err) { @@ -74,12 +80,12 @@ void plugin_init(GeanyData *data) main_menu_item = gtk_menu_item_new_with_mnemonic("GeanyPG"); gtk_widget_show(main_menu_item); - GtkWidget * submenu = gtk_menu_new(); + submenu = gtk_menu_new(); gtk_widget_show(submenu); - GtkWidget * encrypt = gtk_menu_item_new_with_mnemonic(_("Encrypt")); - GtkWidget * sign = gtk_menu_item_new_with_mnemonic(_("Sign")); - GtkWidget * decrypt = gtk_menu_item_new_with_mnemonic(_("Decrypt / Verify")); - GtkWidget * verify = gtk_menu_item_new_with_mnemonic(_("Verify detached signature")); + encrypt = gtk_menu_item_new_with_mnemonic(_("Encrypt")); + sign = gtk_menu_item_new_with_mnemonic(_("Sign")); + decrypt = gtk_menu_item_new_with_mnemonic(_("Decrypt / Verify")); + verify = gtk_menu_item_new_with_mnemonic(_("Verify detached signature")); gtk_widget_show(encrypt); gtk_widget_show(sign); Modified: geanypg/src/key_selection_dialog.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -135,10 +135,11 @@ int geanypg_encrypt_selection_dialog(encrypt_data * ed, gpgme_key_t ** selected, GtkTreeIter iter; listdata data; gboolean active; + GtkListStore * list; *sign = 0; - GtkListStore * list = geanypg_makelist(ed->key_array, ed->nkeys, 0); + list = geanypg_makelist(ed->key_array, ed->nkeys, 0); listview = geanypg_listview(list, &data); scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin), Modified: geanypg/src/sign_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -56,8 +56,9 @@ static void geanypg_sign(encrypt_data * ed) void geanypg_sign_cb(GtkMenuItem * menuitem, gpointer user_data) { encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; ed.key_array = NULL; Modified: geanypg/src/verify_aux.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -162,11 +162,12 @@ void geanypg_check_sig(encrypt_data * ed, gpgme_signature_t sig) GtkWidget * dialog; gpgme_sigsum_t summary; char buffer[512]; + char * result; strncpy(buffer, sig->fpr, 40); buffer[40] = 0; geanypg_get_keys_with_fp(ed, buffer); summary = sig->summary; - char * result = geanypg_result(sig); + result = geanypg_result(sig); dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, Modified: geanypg/src/verify_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -62,8 +62,9 @@ void geanypg_verify_cb(GtkMenuItem * menuitem, gpointer user_data) { char * sigfile = NULL; encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_protocol(ed.ctx, GPGME_PROTOCOL_OpenPGP); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] 7dde89: GeanyPG: Don't mix declarations and code
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/1.22_release Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:19:47 Commit: 7dde896b0f8fde07c2ecaf73473b468f246f37e4
https://github.com/geany/geany-plugins/commit/7dde896b0f8fde07c2ecaf73473b4…
Log Message: ----------- GeanyPG: Don't mix declarations and code Modified Paths: -------------- geanypg/src/decrypt_cb.c geanypg/src/encrypt_cb.c geanypg/src/geanypg.c geanypg/src/key_selection_dialog.c geanypg/src/sign_cb.c geanypg/src/verify_aux.c geanypg/src/verify_cb.c Modified: geanypg/src/decrypt_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -64,8 +64,9 @@ static void geanypg_decrypt_verify(encrypt_data * ed) void geanypg_decrypt_cb(GtkMenuItem * menuitem, gpointer user_data) { encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_protocol(ed.ctx, GPGME_PROTOCOL_OpenPGP); Modified: geanypg/src/encrypt_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -60,8 +60,9 @@ void geanypg_encrypt_cb(GtkMenuItem * menuitem, gpointer user_data) { int sign; encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_armor(ed.ctx, 1); Modified: geanypg/src/geanypg.c 16 files changed, 11 insertions(+), 5 deletions(-) =================================================================== @@ -64,6 +64,12 @@ gpgme_error_t geanypg_show_err_msg(gpgme_error_t err) void plugin_init(GeanyData *data) { + GtkWidget * submenu; + GtkWidget * encrypt; + GtkWidget * sign; + GtkWidget * decrypt; + GtkWidget * verify; + gpgme_error_t err = geanypg_init_gpgme(); if (err) { @@ -74,12 +80,12 @@ void plugin_init(GeanyData *data) main_menu_item = gtk_menu_item_new_with_mnemonic("GeanyPG"); gtk_widget_show(main_menu_item); - GtkWidget * submenu = gtk_menu_new(); + submenu = gtk_menu_new(); gtk_widget_show(submenu); - GtkWidget * encrypt = gtk_menu_item_new_with_mnemonic(_("Encrypt")); - GtkWidget * sign = gtk_menu_item_new_with_mnemonic(_("Sign")); - GtkWidget * decrypt = gtk_menu_item_new_with_mnemonic(_("Decrypt / Verify")); - GtkWidget * verify = gtk_menu_item_new_with_mnemonic(_("Verify detached signature")); + encrypt = gtk_menu_item_new_with_mnemonic(_("Encrypt")); + sign = gtk_menu_item_new_with_mnemonic(_("Sign")); + decrypt = gtk_menu_item_new_with_mnemonic(_("Decrypt / Verify")); + verify = gtk_menu_item_new_with_mnemonic(_("Verify detached signature")); gtk_widget_show(encrypt); gtk_widget_show(sign); Modified: geanypg/src/key_selection_dialog.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -135,10 +135,11 @@ int geanypg_encrypt_selection_dialog(encrypt_data * ed, gpgme_key_t ** selected, GtkTreeIter iter; listdata data; gboolean active; + GtkListStore * list; *sign = 0; - GtkListStore * list = geanypg_makelist(ed->key_array, ed->nkeys, 0); + list = geanypg_makelist(ed->key_array, ed->nkeys, 0); listview = geanypg_listview(list, &data); scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollwin), Modified: geanypg/src/sign_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -56,8 +56,9 @@ static void geanypg_sign(encrypt_data * ed) void geanypg_sign_cb(GtkMenuItem * menuitem, gpointer user_data) { encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; ed.key_array = NULL; Modified: geanypg/src/verify_aux.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -162,11 +162,12 @@ void geanypg_check_sig(encrypt_data * ed, gpgme_signature_t sig) GtkWidget * dialog; gpgme_sigsum_t summary; char buffer[512]; + char * result; strncpy(buffer, sig->fpr, 40); buffer[40] = 0; geanypg_get_keys_with_fp(ed, buffer); summary = sig->summary; - char * result = geanypg_result(sig); + result = geanypg_result(sig); dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, Modified: geanypg/src/verify_cb.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -62,8 +62,9 @@ void geanypg_verify_cb(GtkMenuItem * menuitem, gpointer user_data) { char * sigfile = NULL; encrypt_data ed; + gpgme_error_t err; geanypg_init_ed(&ed); - gpgme_error_t err = gpgme_new(&ed.ctx); + err = gpgme_new(&ed.ctx); if (err && geanypg_show_err_msg(err)) return; gpgme_set_protocol(ed.ctx, GPGME_PROTOCOL_OpenPGP); @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
[geany/geany-plugins] f3300d: GeanyPG: Mark local functions as static
by Colomban Wendling
08 Jul '12
08 Jul '12
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 08 Jul 2012 11:17:22 Commit: f3300dd7dc3f0950f0d42bb2683dee27db110e41
https://github.com/geany/geany-plugins/commit/f3300dd7dc3f0950f0d42bb2683de…
Log Message: ----------- GeanyPG: Mark local functions as static Modified Paths: -------------- geanypg/src/decrypt_cb.c geanypg/src/encrypt_cb.c geanypg/src/sign_cb.c geanypg/src/verify_aux.c geanypg/src/verify_cb.c Modified: geanypg/src/decrypt_cb.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -21,7 +21,7 @@ #include "geanypg.h" -void geanypg_decrypt_verify(encrypt_data * ed) +static void geanypg_decrypt_verify(encrypt_data * ed) { gpgme_data_t plain, cipher; gpgme_error_t err; Modified: geanypg/src/encrypt_cb.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -21,7 +21,7 @@ #include "geanypg.h" -void geanypg_encrypt(encrypt_data * ed, gpgme_key_t * recp, int sign, int flags) +static void geanypg_encrypt(encrypt_data * ed, gpgme_key_t * recp, int sign, int flags) { /* FACTORIZE */ gpgme_data_t plain, cipher; gpgme_error_t err; Modified: geanypg/src/sign_cb.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -21,7 +21,7 @@ #include "geanypg.h" -void geanypg_sign(encrypt_data * ed) +static void geanypg_sign(encrypt_data * ed) { gpgme_data_t plain, cipher; gpgme_error_t err; Modified: geanypg/src/verify_aux.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -22,7 +22,7 @@ #include "geanypg.h" -void geanypg_get_keys_with_fp(encrypt_data * ed, char * buffer) +static void geanypg_get_keys_with_fp(encrypt_data * ed, char * buffer) { unsigned long idx, found = 0; char empty_string = '\0'; Modified: geanypg/src/verify_cb.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -20,7 +20,7 @@ #include "geanypg.h" -char * geanypg_choose_sig(void) +static char * geanypg_choose_sig(void) { int response; char * file = NULL; @@ -38,7 +38,7 @@ char * geanypg_choose_sig(void) return file; } -void geanypg_verify(encrypt_data * ed, char * signame) +static void geanypg_verify(encrypt_data * ed, char * signame) { gpgme_data_t sig, text; gpgme_error_t err; @@ Diff output truncated at 100000 characters. @@ -------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
22
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Results per page:
10
25
50
100
200