home *** CD-ROM | disk | FTP | other *** search
- Johnny Five #26 @15301
- Fri Jul 07 13:30:35 1995
- ╒NI Header (c)══════════════════════════════════════════════════════════════╕
- │ N O V A I N D U S T R I E S B B S 9 0 4 - 2 6 0 - 2 3 9 4 │
- ╞═══════════════════════════════════════════════════════════════════════════╡
- │ Mod Name : NI-017.424 Author: Johnny Five 1 @1 ExcelNet │
- │ 1 @9403 CCNet │
- │ Difficulty: Can you say "Block Copy"? 1 @205 SteelNet │
- │ 1 @9411 TFAlink │
- │ Version : 4.24 Date: 07-07-95 and many others │
- │ │
- │ Files Affected: READMAIL.C │
- │ │
- │ Description: DREAM49A.MOD updated for 4.24 requires NICommon │
- │ better void readmail │
- ╘═══════════════════════════════════════════════════════════════════════════╛
-
-
-
-
- = Already there
- + add
- - Remove
- * change
-
-
- Step 1: B(ack).U(p).Y(our).S(ource).
-
- Step 2: Add these 2 #defines to the top of the file.
-
- #define BOX DGRAY // Color of the box
- #define TIMESTRING DYELLOW // Color of bottom time string
-
-
- Step 3: Add these defines right before void readmail(void)
-
- #define MAILNUMCOLOR DYELLOW // Color if the mail number indicator
- #define FROMCOLOR LCYAN // Color of the 'from' field
- #define MAILTITLECOLOR DCYAN // Color of the mail title
- #define MAIL_WHO_FIELD_LEN2 63 // DO NOT change!
-
-
- Step 4: In void readmail(void), add the following line..
-
- = int i,i1,i2,f,mw,mfl,curmail,done,abort=0,next,okmail,tp,nn;
- = unsigned short xx;
- = char s[201],s1[205],s2[81],*b,*ss1;
- + char st1[81], st2[81], st3[81], st4[81], st5[40]; // For dream49
- = mailrec m, m1;
-
-
- Step 5: Open up READMAIL.C and replace everything from
-
- pl(get_string(703));
- nl();
-
- ..... to .....
-
- helpl=10;
- pl(get_string(705));
-
- with this chunk...
-
- pl(get_string(703));
- nl();
- if (okansi()) {
- sprintf(st1,"%s", charstr(31,'─'));
- sprintf(st2,"%s", charstr(41,'─'));
- sprintf(st3,"%s", charstr(24,'─'));
- } else {
- sprintf(st1,"%s", charstr(31,'-'));
- sprintf(st2,"%s", charstr(41,'-'));
- sprintf(st3,"%s", charstr(24,'-'));
- }
- dream_header("R e a d M a i l","",1);
- if (okansi())
- npr("%s╔───╦%s╦%s╗\r\n", BOX, st1, st2);
- else
- npr("+---+%s+%s+\r\n", st1, st2);
- ansic(0);
- for (i=0; ((i<mw) && (!abort)); i++) {
- if (!read_same_email(mloc, mw, i, &m, 0))
- continue;
- tp=80;
- if (m.status & status_source_verified)
- tp -= 2;
- if (m.status & status_new_net) {
- tp -= 1;
- if (strlen(m.title)<=tp) {
- nn=(unsigned char) m.title[tp+1];
- } else
- nn=0;
- } else
- nn=0;
- if (okansi())
- sprintf(s,"%s│%s%3d%s│%s ", BOX, MAILNUMCOLOR, i+1, BOX, FROMCOLOR);
- else
- sprintf(s,"|%3d| ", i+1);
- if ((m.anony & anony_sender) && ((ss.ability & ability_read_email_anony)=
- =0)) {
- strcat(s,get_string(482));
- } else {
- if (m.fromsys==0) {
- if (m.fromuser==65535) {
- if (nn!=255)
- strcat(s,net_networks[nn].name);
- } else {
- read_user(m.fromuser,&u);
- strcat(s,nam(&u,m.fromuser));
- }
- } else {
- set_net_num(nn);
- csne=next_system(m.fromsys);
- if (csne)
- ss1=csne->name;
- else
- ss1=get_string(622);
- if (nn==255) {
- sprintf(s1,"%s #%u @%u",get_string(704), m.fromuser,m.fromsys);
- } else {
- if (net_num_max>1)
- sprintf(s1,"%s #%u @%u (%s)",
- net_networks[nn].name,m.fromuser,m.fromsys,ss1);
- else
- sprintf(s1,"%s %u @%u (%s)",get_string(658), m.fromuser,m.fromsys,ss1);
- }
- strcat(s,s1);
- }
- }
- if (thisuser.screenchars >= 80) {
- if (okansi()) {
- if (strlen(stripcolors(s))>MAIL_WHO_FIELD_LEN2)
- while (strlen(stripcolors(s))>MAIL_WHO_FIELD_LEN2)
- s[strlen(s)-1]=0;
- } else {
- if (strlen(stripcolors(s))>MAIL_WHO_FIELD_LEN)
- while (strlen(stripcolors(s))>MAIL_WHO_FIELD_LEN)
- s[strlen(s)-1]=0;
- }
- if (okansi())
- strcat(s,charstr((MAIL_WHO_FIELD_LEN2+1)-strlen(stripcolors(s)),' '));
- else
- strcat(s,charstr((MAIL_WHO_FIELD_LEN+1)-strlen(stripcolors(s)),' '));
- if (okansi()) {
- sprintf(st4,"%s│%s", BOX, MAILTITLECOLOR);
- strcat(s,st4);
- } else
- strcat(s,"|");
- strcat(s," ");
- strncpy(st5,stripcolors(m.title),39);
- st5[39]='\0';
- strcat(s,st5);
- }
- if (okansi())
- npr("%-120s%s│\r\n", s, BOX);
- else
- npr("%-78s|\r\n", s);
- }
- if (okansi())
- npr("%s╚───╩%s╩%s%s■ %s%s %s■%s──╝\r\n",
- BOX, st1, st3, DCYAN, TIMESTRING, drmtimes(), DCYAN, BOX);
- else
- npr("+---+%s+%so %s o--+\r\n", st1, st3, drmtimes());
- ansic(0);
- nl();
- helpl=10;
- pl(get_string(705));
-
-
- Save READMAIL.C and recompile.
-
-
-
- Email me with problems, suggestions, etc...
-
- Enjoy!
-