OpenBSD CVS

CVS log for src/usr.bin/mg/dir.c


[BACK] Up to [local] / src / usr.bin / mg

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:11 2023 UTC (14 months, 1 week ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.32: +1 -4 lines
Diff to previous 1.32 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jan 28 06:18:41 2022 UTC (2 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

When it's the possessive of 'it', it's spelled "its", without the
apostrophe.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 30 07:05:22 2017 UTC (6 years, 11 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.29: +6 -6 lines
Diff to previous 1.29 (colored)

fix -Wshadow warnings.
Found by bcallah, thanks!

Revision 1.29 / (download) - annotate - [select for diffs], Mon Sep 12 18:32:54 2016 UTC (7 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.28: +10 -8 lines
Diff to previous 1.28 (colored)

If we can't get the CWD, use relative paths.  Fixes editing files
in a directory without read permission.  OK lum@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Mar 19 21:22:15 2015 UTC (9 years, 2 months ago) by bcallah
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.27: +6 -1 lines
Diff to previous 1.27 (colored)

Clean up the includes in mg.
This does the following:
Moves all POSIX headers from sysdef.h into the individual .c files so that
each file now only includes what it needs. All headers are properly sorted.
Moves the remainder of sysdef.h to other files (mostly def.h) and deletes
sysdef.h now that it's no longer contains anything.
Tweak a comment that references sysdef.h so that it no longer does that.
ok florian@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Apr 3 20:17:12 2014 UTC (10 years, 1 month ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.26: +15 -7 lines
Diff to previous 1.26 (colored)

When finding a file in a non-existant directory:

C-x C-f ~/no/dir/here/fn

offer to make the directory by pressing 'y', instead of suggesting the
make-directory command. ok jasper@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Mar 31 18:00:58 2014 UTC (10 years, 1 month ago) by lum
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

Allow more than one level of directories to be create via
make-directory again. ok florian@ jasper@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Mar 20 07:47:29 2014 UTC (10 years, 2 months ago) by lum
Branch: MAIN
Changes since 1.24: +6 -3 lines
Diff to previous 1.24 (colored)

Add some missing dobeeps.
ok florian@

Revision 1.24 / (download) - annotate - [select for diffs], Mon Oct 21 19:04:56 2013 UTC (10 years, 6 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.23: +5 -2 lines
Diff to previous 1.23 (colored)

unbreak make-directory by stripping trailing '/'
OK jasper@

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 30 04:17:25 2013 UTC (10 years, 11 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.22: +8 -1 lines
Diff to previous 1.22 (colored)

Reuse the makedir() function in dir.c for dired's
dired-create-directory command.
ok jasper@

Revision 1.22 / (download) - annotate - [select for diffs], Sat May 18 11:23:29 2013 UTC (11 years ago) by lum
Branch: MAIN
Changes since 1.21: +7 -9 lines
Diff to previous 1.21 (colored)

Use adjustname() for path. ok jasper@

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 17 04:59:29 2013 UTC (11 years ago) by lum
Branch: MAIN
Changes since 1.20: +6 -2 lines
Diff to previous 1.20 (colored)

If directory exists when trying to create a new one, warn user.

ok jasper@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Nov 27 19:46:46 2012 UTC (11 years, 5 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.19: +75 -1 lines
Diff to previous 1.19 (colored)

- add 'make-directory' (not bound to any shortcut).

feedback from florian@ lum@
ok florian@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 13 20:07:40 2008 UTC (15 years, 11 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

One more "//" instead of "/" case. Hidden in a getcwd.
Noted, ok otto@

Revision 1.18 / (download) - annotate - [select for diffs], Mon May 28 17:52:17 2007 UTC (16 years, 11 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.17: +9 -7 lines
Diff to previous 1.17 (colored)

Add a global-wd-mode command, which toggles between the current
behavior (every buffer maintains its own cwd) and the old behavior of
one global working directory. This makes it slightly easier to hack
on things like kernel code, where compilation, etc, are initiated from
a different directory than you are working in.
While here, fix setting/handling of global wd.

Revision 1.17 / (download) - annotate - [select for diffs], Tue May 2 17:10:25 2006 UTC (18 years ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.16: +20 -11 lines
Diff to previous 1.16 (colored)

Make buffers store their own working directory. This makes things like
grep, compile, lint work as expected (act on current buffer's cwd).
Display this path when opening or replacing a file, rather than
relying on the user to guess, or remember.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Dec 20 05:04:28 2005 UTC (18 years, 5 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Do some delinting of strl-type functions. Also, remove a superfluous
word in the undo-list.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Nov 20 18:47:11 2005 UTC (18 years, 6 months ago) by kjell
Branch: MAIN
Changes since 1.14: +1 -3 lines
Diff to previous 1.14 (colored)

#ifdef NO_DIR can go too. From Han Boetes.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Aug 9 00:53:48 2005 UTC (18 years, 9 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.13: +6 -4 lines
Diff to previous 1.13 (colored)

Clean up eread handling in mg. (basically, fallout from the 'enter often
means abort' behaviour added during the hackathon). Eliminates
redundant ereply function, fixes miscellaneous cores when aborting,
and move a number of assumed pathnames into the prompt text, since
they are used there anyway. All changes consistent with emacs behavior

ok beck@ many, many moons ago.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 14 18:14:40 2005 UTC (18 years, 11 months ago) by kjell
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

Add explicit public domain notices to all public domain files.
ok millert@, deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Sun Apr 3 02:09:28 2005 UTC (19 years, 1 month ago) by db
Branch: MAIN
Changes since 1.11: +7 -8 lines
Diff to previous 1.11 (colored)

This is a no binary change which does:

- spelling, punctuation fixes
- variable declaration lineup
- use parentheses for return and sizeof
- K&R function declarations -> ANSI
- other minor code beautification

ok henning@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jul 22 01:25:24 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.10: +4 -5 lines
Diff to previous 1.10 (colored)

stage 1 of the infinite minibuffer work - add support for on the fly
buffer reallocation in veread().  This commit only changes the API.
All the buffers have exactly the same bounds as before for now.

tested by a couple of my very helpful testers!

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 5 22:02:18 2004 UTC (20 years, 2 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.9: +6 -3 lines
Diff to previous 1.9 (colored)

don't panic if we can't getcwd() initially, just chdir("/")

spotted by and ok henning

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 1 14:33:44 2002 UTC (21 years, 10 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

KNF + ansi; from zyrnix (only the easy part of his diffs)

Revision 1.8 / (download) - annotate - [select for diffs], Mon Mar 11 13:02:56 2002 UTC (22 years, 2 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.7: +4 -6 lines
Diff to previous 1.7 (colored)

  * Move to ANSI function definitions.
  * Add a whole lot of consts where I thought it made sense

   no ok, but no objections either...

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 13 03:03:49 2002 UTC (22 years, 3 months ago) by vincent
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

 * Replace unsafe strcpy and strcat calls to safe strlcpy and strlcat.
 * Be a little bit more verbose about some errors
 * Fix some memory leaks in fileio.c

ok deraadt@, art@

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 24 03:05:21 2001 UTC (23 years ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.5: +6 -6 lines
Diff to previous 1.5 (colored)

spaces

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 23 22:20:35 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

remove VOID. We're way beyond the point where this could build with an
ancient compiler.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 29 01:58:06 2001 UTC (23 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.3: +2 -0 lines
Diff to previous 1.3 (colored)

$OpenBSD$

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 13 06:12:14 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.2: +17 -11 lines
Diff to previous 1.2 (colored)

The start of KNF + -Wall.  The code has been run through indent but
needs hand fixup.  I stopped at keymap.c...

Revision 1.2 / (download) - annotate - [select for diffs], Sat Feb 26 22:53:16 2000 UTC (24 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.1: +2 -5 lines
Diff to previous 1.1 (colored)

change WINDOW -> MGWIN to avoid curses type conflict
convert to terminfo in tty*.c
add support for some keypad function keys (arrows, pgup, pgdown)

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 25 19:08:46 2000 UTC (24 years, 2 months ago) by deraadt
Branch: MAIN

initial import of mg2a

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.