home *** CD-ROM | disk | FTP | other *** search
- *** pgp.c.orig Sat Jul 3 01:22:36 1993
- --- pgp.c Sat Aug 28 23:58:46 1993
- ***************
- *** 852,854 ****
- if (!conventional_flag)
- ! {
- if (!filter_mode && !quietmode)
- --- 852,854 ----
- if (!conventional_flag)
- ! { int plus = 0;
- if (!filter_mode && !quietmode)
- ***************
- *** 855,862 ****
- fprintf(pgpout, PSTR("\n\nRecipients' public key(s) will be used to encrypt. "));
- ! if (recipient == NULL || *recipient == NULL || **recipient == '\0')
- ! { /* no recipient specified on command line */
- fprintf(pgpout, PSTR("\nA user ID is required to select the recipient's public key. "));
- ! fprintf(pgpout, PSTR("\nEnter the recipient's user ID: "));
- getstring( mcguffin, 255, TRUE ); /* echo keyboard */
- ! if ((mcguffins = (char **) malloc (2 * sizeof(char *))) == NULL) {
- fprintf(stderr, PSTR("\n\007Out of memory.\n"));
- --- 855,869 ----
- fprintf(pgpout, PSTR("\n\nRecipients' public key(s) will be used to encrypt. "));
- ! /* find the last recipient - is it '+'? */
- ! if (recipient != NULL && *recipient != NULL) {
- ! char **index = recipient;
- ! for( ; *index != NULL; *index++) {
- ! if (**index=='+' && *(index+1)==NULL) plus++;
- ! }
- ! }
- ! if (recipient == NULL || *recipient == NULL || **recipient == '\0' || plus)
- ! { /* no recipient specified on command line or '+' is the last id */
- fprintf(pgpout, PSTR("\nA user ID is required to select the recipient's public key. "));
- ! fprintf(pgpout, PSTR("\nEnter the recipient's user ID(s): "));
- getstring( mcguffin, 255, TRUE ); /* echo keyboard */
- ! if ((mcguffins = (char **) malloc (100 * sizeof(char *))) == NULL) {
- fprintf(stderr, PSTR("\n\007Out of memory.\n"));
- ***************
- *** 864,867 ****
- }
- ! mcguffins[0] = mcguffin;
- ! mcguffins[1] = "";
- }
- --- 871,891 ----
- }
- ! { int i = 0; char *index = mcguffin;
- ! if (plus) {
- ! for ( ; recipient[i][0]!='+'; i++) {
- ! mcguffins[i] = recipient[i];
- ! }
- ! }
- ! for ( ; *index!='\0'; i++) {
- ! while ( *index==' ' || *index=='\t') index++;
- ! if (*index == '\"') {
- ! mcguffins[i] = ++index;
- ! while (*index!='\"' && *index!='\0') index++;
- ! } else {
- ! mcguffins[i] = index;
- ! while ( *index!=' ' && *index!='\t' && *index!='\0') index++;
- ! }
- ! if (*index=='\0') break;
- ! *index++ = '\0';
- ! }
- ! }
- }
-