cmd3.c (1591) | cmd3.c (29574) |
---|---|
1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 279 unchanged lines hidden (view full) --- 288{ 289 register struct message *mp; 290 register int *ip, mesg; 291 292 if (edit) { 293 printf("Cannot \"preserve\" in edit mode\n"); 294 return(1); 295 } | 1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 279 unchanged lines hidden (view full) --- 288{ 289 register struct message *mp; 290 register int *ip, mesg; 291 292 if (edit) { 293 printf("Cannot \"preserve\" in edit mode\n"); 294 return(1); 295 } |
296 for (ip = msgvec; *ip != NULL; ip++) { | 296 for (ip = msgvec; *ip != 0; ip++) { |
297 mesg = *ip; 298 mp = &message[mesg-1]; 299 mp->m_flag |= MPRESERVE; 300 mp->m_flag &= ~MBOX; 301 dot = mp; 302 } 303 return(0); 304} 305 306/* 307 * Mark all given messages as unread. 308 */ 309int 310unread(msgvec) 311 int msgvec[]; 312{ 313 register int *ip; 314 | 297 mesg = *ip; 298 mp = &message[mesg-1]; 299 mp->m_flag |= MPRESERVE; 300 mp->m_flag &= ~MBOX; 301 dot = mp; 302 } 303 return(0); 304} 305 306/* 307 * Mark all given messages as unread. 308 */ 309int 310unread(msgvec) 311 int msgvec[]; 312{ 313 register int *ip; 314 |
315 for (ip = msgvec; *ip != NULL; ip++) { | 315 for (ip = msgvec; *ip != 0; ip++) { |
316 dot = &message[*ip-1]; 317 dot->m_flag &= ~(MREAD|MTOUCH); 318 dot->m_flag |= MSTATUS; 319 } 320 return(0); 321} 322 323/* 324 * Print the size of each message. 325 */ 326int 327messize(msgvec) 328 int *msgvec; 329{ 330 register struct message *mp; 331 register int *ip, mesg; 332 | 316 dot = &message[*ip-1]; 317 dot->m_flag &= ~(MREAD|MTOUCH); 318 dot->m_flag |= MSTATUS; 319 } 320 return(0); 321} 322 323/* 324 * Print the size of each message. 325 */ 326int 327messize(msgvec) 328 int *msgvec; 329{ 330 register struct message *mp; 331 register int *ip, mesg; 332 |
333 for (ip = msgvec; *ip != NULL; ip++) { | 333 for (ip = msgvec; *ip != 0; ip++) { |
334 mesg = *ip; 335 mp = &message[mesg-1]; 336 printf("%d: %d/%ld\n", mesg, mp->m_lines, mp->m_size); 337 } 338 return(0); 339} 340 341/* --- 389 unchanged lines hidden --- | 334 mesg = *ip; 335 mp = &message[mesg-1]; 336 printf("%d: %d/%ld\n", mesg, mp->m_lines, mp->m_size); 337 } 338 return(0); 339} 340 341/* --- 389 unchanged lines hidden --- |