This is monitor.m in view mode; [Download] [Up]
/* * Implement the "suggestion" box, to catch user's comments, * and also a simple tracking mechanism, to send a blip of * mail from the first-time user. This is akin to releasing * helium balloons with postcards that say "If you find me, * send this card back to . . ." -- it should be interesting * to the community to track the free flow of software on * the ethernet. * * If you have any concerns about this, please check with me. * * Michael Hawley * mike@media-lab.mit.edu */ #define _NAME "StereoScope" static char *stripnl(char *s){ char *p; for (p=s;*p;p++) if (*p == '\n' || *p == '\r') *p = '\0'; return s; } char * execstr(s) char *s; { FILE *f = popen(s,"r"); char *p = s; *s = '\0'; if (f){ while (fgets(p,256,f)) stripnl(p), p += strlen(p); pclose(f); } return s; } - suggestion:sender { char subj[256], w[256] = "whoami"; char body[4096]="\ John:\n\n\ A handy bit of software! I use it ALL the time.\n\ Now, I know I should be sending you a T shirt, a card, \n\ maybe a tax deductible surprise to assist in feeding your\n\ hungry family, but all I have are these scrimpy electronic\n\ comments:\n\n\ <insert accolades & suggestions here>\n\n\ parsimoniously,\n\ "; #define fcall(a) [s performRemoteMethod:a] #define call(a,b) [s performRemoteMethod:a with:b length:strlen(b)+1] id s = [NXApp appSpeaker]; NXPortFromName("Mail", NULL); // make sure app is launched [s setSendPort:NXPortFromName("MailSendDemo", NULL)]; sprintf(subj,"Comments and suggestions for ``%s'' ",_NAME); strcat(subj,[version stringValue]); strcat(body,execstr(w)); strcat(body,"\n"); call("setTo:","woo@ornl.gov"); call("setSubject:",subj); call("setBody:",body); return self; } /* monitor("StereoScope-1.0-newuser"); */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.