🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Ray Moody Sat, 05 Aug 1989 19:29
Arrg! Bug in my bugfix!
#437
Author: Ray Moody
Date: Sat, 05 Aug 1989 19:29
34 lines
1558 bytes
    There was a bug in my bugfix for polite_directory_format.  I was
trying to fix it so that /a/raymond would not appear as ~mond if my
home directory was /a/ray.  In reality, I broke it so that it would
never use a ~.  Here is a correct (i hope) patch.

    Sorry about this.  I guess I will go spend my 10 minutes in the
agonizer booth now.

								Ray
-------------------------------------------------------------------------------
RCS file: RCS/builtins.c,v
retrieving revision 1.2.1.1
diff -c -r1.2.1.1 builtins.c
*** /tmp/,RCSt1011325	Sat Aug  5 14:28:00 1989
--- builtins.c	Fri Aug  4 21:42:24 1989
***************
*** 2680,2686
    char *home = get_string_value ("HOME");
    int l = home ? strlen (home) : 0;
  
!   if (l && strncmp (home, name, l) == 0) {
      strcpy (tdir + 1, name + l);
      tdir[0] = '~';
      return (tdir);

--- 2680,2686 -----
    char *home = get_string_value ("HOME");
    int l = home ? strlen (home) : 0;
  
!   if (l > 1 && strncmp (home, name, l) == 0 && (name[l] == '/' || name[l] == '\0')) {
      strcpy (tdir + 1, name + l);
      tdir[0] = '~';
      return (tdir);
Arrg! Bug in my bugfix!
#438
Author: Brian Fox
Date: Sat, 05 Aug 1989 20:59
9 lines
677 bytes
   Date: Sat, 5 Aug 89 14:29:13 EST
   From: ray@maxwell.physics.purdue.edu (Ray Moody)

       There was a bug in my bugfix for polite_directory_format.  I was

Yeah, I noticed that.

Brian
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads