Lines Matching +defs:s +defs:db

83 static DBM	*db;
179 case 's': /* sender: use this instead of getfrom() */
192 usrerr("Unknown flag -%s", p);
217 /* find user's home directory */
224 usrerr("user %s look up failed, name services outage ?",
230 (void) snprintf(buf, sizeof (buf), "%s%s%s", homedir,
232 if (!(db = dbm_open(buf, O_RDWR, 0))) {
233 usrerr("%s: %s\n", buf, strerror(errno));
268 printf("Sending %s to %s\n", buf, from);
298 (void) printf("%-53.40*s: %s", (int)key_size, key_ptr,
324 for (key = dbm_firstkey(db); key.dptr != NULL; key = dbm_nextkey(db)) {
325 content = dbm_fetch(db, key);
364 dbm_close(db);
401 usrerr("Funny From line '%s'", line);
415 printf("start='%s'\n", start);
432 printf("place='%s'\n", *shortp);
548 printf("Subject=%s\n", Subject);
596 (void) printf("%s does not exist, filter ok.\n",
624 (void) printf("filter match on %s\n",
644 (void) printf("filter match on %s\n",
681 data = dbm_fetch(db, key);
689 printf("User %s already knows\n", user);
718 dbm_store(db, key, data, DBM_REPLACE);
795 fprintf(fpipe, "To: %s\n", user);
812 usrerr("can't open temp file %s", tmpf_name);
817 usrerr("can't open temp file %s", tmpf_name);
822 * Check for a line with no ':' character. If it's just \n,
824 * it starts with white-space, then it's a continuation header.
825 * Otherwise, it's the start of the body, which means the
861 * If we have and it's us-ascii, 8-bit chars in the message file will
870 printf("Charset is %s\n", Charset);
871 fprintf(fpipe, "Content-Type: text/plain; charset=%s\n", Charset);
879 usrerr("can't open temp file %s", tmpf_name);
901 * caller's home directory.
910 DBM *db;
919 (void) snprintf(buf, sizeof (buf), "%s%s%s", homedir,
922 if (!(db = dbm_open(buf, O_WRONLY|O_CREAT|O_TRUNC, 0644))) {
923 usrerr("%s: %s\n", buf, strerror(errno));
926 dbm_close(db);
959 * s -- the string to copy.
969 newstr(s)
970 char *s;
973 size_t s_sz = strlen(s);
981 (void) strlcpy(p, s, s_sz + 1);
1060 printf("You have a message file in %s.\n", file);
1063 "/usr/bin/more %s", file);
1070 " in %s first.\n", file);
1073 usrerr("Cannot open %s", file);
1090 (void) snprintf(cmd, sizeof (cmd), "%s %s", editor,
1092 printf("Please use your editor (%s)"
1105 printf(" %s", line);
1128 fprintf(f, "\\%s, \"|/usr/bin/vacation %s\"\n", myname, myname);
1151 printf("%s? ", prompt);