Removed commented-out code
authorKrista Grothoff <krista@pep-project.org>
Mon, 22 Aug 2016 18:46:49 +0200
changeset 10544c8038969d3c
parent 1053 c6d08675e300
child 1055 9d0b3d675963
Removed commented-out code
src/pgp_netpgp.c
     1.1 --- a/src/pgp_netpgp.c	Mon Aug 22 18:43:31 2016 +0200
     1.2 +++ b/src/pgp_netpgp.c	Mon Aug 22 18:46:49 2016 +0200
     1.3 @@ -1674,72 +1674,6 @@
     1.4  }
     1.5  
     1.6  
     1.7 -// Presumption, if this contains an email address at all, is that the last
     1.8 -// '@' is the email address's at.
     1.9 -// 
    1.10 -// Our best guess is that this is structured as "REALNAME <blah@blah.blah>"
    1.11 -//
    1.12 -// static void parse_netpgp_uid_str(char* src, char** name, char** email) {
    1.13 -//     *name = NULL;
    1.14 -//     *email = NULL;
    1.15 -//         
    1.16 -//     if (!src)
    1.17 -//         return;
    1.18 -//  
    1.19 -//     size_t source_len = strlen(src);
    1.20 -//     char* last_char = src + source_len;
    1.21 -//     
    1.22 -//     char* at = NULL;
    1.23 -// 
    1.24 -//     char* begin = src;
    1.25 -//     char* end = last_char; // one past the end;
    1.26 -//     size_t copy_len = 0;
    1.27 -//     
    1.28 -//     // Primitive email extraction
    1.29 -//     at = strrchr(src,'@');
    1.30 -//     
    1.31 -//     char* name_str = NULL;
    1.32 -//     char* email_str = NULL;
    1.33 -//     
    1.34 -//     if (at) {
    1.35 -//         // Go back until we hit a space, a '<', or the start of the string
    1.36 -//         for (begin = at; begin >= src && *begin != ' ' && *begin != '<'; begin--) {
    1.37 -//             continue;
    1.38 -//         }
    1.39 -//         if (begin != at)
    1.40 -//             begin++; // Ugly
    1.41 -//         else {
    1.42 -//             for (end = at; end < last_char && *end != ' ' && *end != '>'; end++) {
    1.43 -//                 continue;
    1.44 -//             }
    1.45 -//             // Points one char past.
    1.46 -//         }
    1.47 -//         if (begin < at && end > at) {
    1.48 -//             // yay, it's an email address!
    1.49 -//             copy_len = end - begin - 1;
    1.50 -//             email_str = (char*)malloc(sizeof(char) * (copy_len + 1));
    1.51 -//             strncpy(email_str, begin, copy_len);
    1.52 -//             email_str[copy_len] = '\0';
    1.53 -//             begin--; // put the beginning back where it was.
    1.54 -//             end = (*begin == '<' ? begin : begin + 1); // if this precedes src, it is checked below
    1.55 -//             begin = src;
    1.56 -//         }
    1.57 -//         else {
    1.58 -//             // bail
    1.59 -//             begin = src;
    1.60 -//             end = last_char;
    1.61 -//         }
    1.62 -//     }
    1.63 -//     if (begin < end) {
    1.64 -//         copy_len = end - begin;
    1.65 -//         name_str = (char*)malloc(sizeof(char) * (copy_len + 1));
    1.66 -//         strncpy(name_str, begin, copy_len);
    1.67 -//         name_str[copy_len] = '\0';
    1.68 -//     }
    1.69 -//     *email = email_str;
    1.70 -//     *name = name_str;
    1.71 -// }
    1.72 -
    1.73  PEP_STATUS pgp_list_keyinfo(
    1.74          PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list)
    1.75  {