Deleted Added
full compact
msgs.c (8874) msgs.c (12390)
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

--- 70 unchanged lines hidden (view full) ---

79#include <signal.h>
80#include <stdio.h>
81#include <stdlib.h>
82#include <string.h>
83#include <time.h>
84#include <unistd.h>
85#include "pathnames.h"
86
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

--- 70 unchanged lines hidden (view full) ---

79#include <signal.h>
80#include <stdio.h>
81#include <stdlib.h>
82#include <string.h>
83#include <time.h>
84#include <unistd.h>
85#include "pathnames.h"
86
87#define CMODE 0666 /* bounds file creation mode */
87#define CMODE 0644 /* bounds file creation mode */
88#define NO 0
89#define YES 1
90#define SUPERUSER 0 /* superuser uid */
91#define DAEMON 1 /* daemon uid */
92#define NLINES 24 /* default number of lines/crt screen */
93#define NDAYS 21 /* default keep time for messages */
94#define DAYS *24*60*60 /* seconds/day */
95#define MSGSRC ".msgsrc" /* user's rc file */

--- 229 unchanged lines hidden (view full) ---

325
326 nextmsg = lastmsg + 1;
327 sprintf(fname, "%s/%d", _PATH_MSGS, nextmsg);
328 newmsg = fopen(fname, "w");
329 if (newmsg == NULL) {
330 perror(fname);
331 exit(errno);
332 }
88#define NO 0
89#define YES 1
90#define SUPERUSER 0 /* superuser uid */
91#define DAEMON 1 /* daemon uid */
92#define NLINES 24 /* default number of lines/crt screen */
93#define NDAYS 21 /* default keep time for messages */
94#define DAYS *24*60*60 /* seconds/day */
95#define MSGSRC ".msgsrc" /* user's rc file */

--- 229 unchanged lines hidden (view full) ---

325
326 nextmsg = lastmsg + 1;
327 sprintf(fname, "%s/%d", _PATH_MSGS, nextmsg);
328 newmsg = fopen(fname, "w");
329 if (newmsg == NULL) {
330 perror(fname);
331 exit(errno);
332 }
333 chmod(fname, 0644);
333 chmod(fname, CMODE);
334
335 fprintf(bounds, "%d %d\n", firstmsg, nextmsg);
336 fclose(bounds);
337
338 sending = YES;
339 if (ruptible)
340 signal(SIGINT, onintr);
341

--- 521 unchanged lines hidden ---
334
335 fprintf(bounds, "%d %d\n", firstmsg, nextmsg);
336 fclose(bounds);
337
338 sending = YES;
339 if (ruptible)
340 signal(SIGINT, onintr);
341

--- 521 unchanged lines hidden ---