Diff for /freem/src/init.c between versions 1.10 and 1.11

version 1.10, 2025/04/10 01:24:38 version 1.11, 2025/04/13 04:22:43
Line 24 Line 24
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.   *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *   *
  *   $Log$   *   $Log$
    *   Revision 1.11  2025/04/13 04:22:43  snw
    *   Fix snprintf calls
    *
  *   Revision 1.10  2025/04/10 01:24:38  snw   *   Revision 1.10  2025/04/10 01:24:38  snw
  *   Remove C++ style comments   *   Remove C++ style comments
  *   *
Line 244  void init_process (void) Line 247  void init_process (void)
 {  {
     pid = getpid ();            /* get $J = process ID */      pid = getpid ();            /* get $J = process ID */
     umask (0);              /* protection bits mask to full rights */      umask (0);              /* protection bits mask to full rights */
     snprintf (fp_conversion, 9, "%%.%df\201", DBL_DIG);      snprintf (fp_conversion, sizeof (fp_conversion) - 1, "%%.%df\201", DBL_DIG);
   
     if (fp_mode) {      if (fp_mode) {
         zprecise = DBL_DIG;          zprecise = DBL_DIG;
Line 453  void init_readline (void) Line 456  void init_readline (void)
     pw_buf = (char *) calloc (strlen(pw->pw_dir) + 1, sizeof(char));      pw_buf = (char *) calloc (strlen(pw->pw_dir) + 1, sizeof(char));
     strcpy (pw_buf, pw->pw_dir);      strcpy (pw_buf, pw->pw_dir);
   
     snprintf (history_file, 256, "%s/.freem_history", pw_buf);      snprintf (history_file, sizeof (history_file) - 1, "%s/.freem_history", pw_buf);
   
     free (pw_buf);      free (pw_buf);
   
Line 661  void cleanup (void) Line 664  void cleanup (void)
     int ch;      int ch;
   
     /* remove this job's entry from ^$JOB SSVN */      /* remove this job's entry from ^$JOB SSVN */
     snprintf (k_buf, 255, "^$JOB\202%d\201", pid);      snprintf (k_buf, sizeof (k_buf) - 1, "^$JOB\202%d\201", pid);
     symtab_shm (kill_sym, k_buf, " \201");      symtab_shm (kill_sym, k_buf, " \201");
           
     reset_terminal ();      reset_terminal ();

Removed from v.1.10  
changed lines
  Added in v.1.11


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>