summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-09 22:37:52 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-09 22:37:52 +0000
commit1056d988442648527a45366c9d16523cdc521031 (patch)
treeafd2b3182b3c81edf3f95a34c10b3a3ea2e5c833 /src
parent4ea8fe1d0600a7020c9f3a652f1d429a96965311 (diff)
updated for version 7.0219v7.0219
Diffstat (limited to 'src')
-rw-r--r--src/ascii.h16
-rw-r--r--src/eval.c7
-rw-r--r--src/ex_cmds2.c30
-rw-r--r--src/main.c3
-rw-r--r--src/memline.c2
-rw-r--r--src/misc1.c6
-rw-r--r--src/proto/ex_cmds2.pro1
7 files changed, 40 insertions, 25 deletions
diff --git a/src/ascii.h b/src/ascii.h
index 4ab3518c4b..b920d41afd 100644
--- a/src/ascii.h
+++ b/src/ascii.h
@@ -177,23 +177,17 @@ extern char MetaCharTable[];
* Character that separates dir names in a path.
* For MS-DOS, WIN32 and OS/2 we use a backslash. A slash mostly works
* fine, but there are places where it doesn't (e.g. in a command name).
- * For Macintosh we use a colon.
* For Acorn we use a dot.
*/
#ifdef BACKSLASH_IN_FILENAME
# define PATHSEP psepc
# define PATHSEPSTR pseps
#else
-# ifdef COLON_AS_PATHSEP
-# define PATHSEP ':'
-# define PATHSEPSTR ":"
+# ifdef RISCOS
+# define PATHSEP '.'
+# define PATHSEPSTR "."
# else
-# ifdef RISCOS
-# define PATHSEP '.'
-# define PATHSEPSTR "."
-# else
-# define PATHSEP '/'
-# define PATHSEPSTR "/"
-# endif
+# define PATHSEP '/'
+# define PATHSEPSTR "/"
# endif
#endif
diff --git a/src/eval.c b/src/eval.c
index e5131f32cc..423129b248 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -19326,8 +19326,7 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
profile_end(&fp->uf_tm_start);
profile_sub_wait(&wait_start, &fp->uf_tm_start);
profile_add(&fp->uf_tm_total, &fp->uf_tm_start);
- profile_add(&fp->uf_tm_self, &fp->uf_tm_start);
- profile_sub(&fp->uf_tm_self, &fp->uf_tm_children);
+ profile_self(&fp->uf_tm_self, &fp->uf_tm_start, &fp->uf_tm_children);
if (fc.caller != NULL && &fc.caller->func->uf_profiling)
{
profile_add(&fc.caller->func->uf_tm_children, &fp->uf_tm_start);
@@ -19714,9 +19713,9 @@ func_line_end(cookie)
++fp->uf_tml_count[fp->uf_tml_idx];
profile_end(&fp->uf_tml_start);
profile_sub_wait(&fp->uf_tml_wait, &fp->uf_tml_start);
- profile_add(&fp->uf_tml_self[fp->uf_tml_idx], &fp->uf_tml_start);
profile_add(&fp->uf_tml_total[fp->uf_tml_idx], &fp->uf_tml_start);
- profile_sub(&fp->uf_tml_self[fp->uf_tml_idx], &fp->uf_tml_children);
+ profile_self(&fp->uf_tml_self[fp->uf_tml_idx], &fp->uf_tml_start,
+ &fp->uf_tml_children);
}
fp->uf_tml_idx = -1;
}
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 00dcea9ebf..ad49d45340 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -911,6 +911,28 @@ profile_add(tm, tm2)
}
/*
+ * Add the "self" time from the total time and the children's time.
+ */
+ void
+profile_self(self, total, children)
+ proftime_T *self, *total, *children;
+{
+ /* Check that the result won't be negative. Can happen with recursive
+ * calls. */
+#ifdef WIN3264
+ if (total->QuadPart <= children->QuadPart)
+ return;
+#else
+ if (total->tv_sec < children->tv_sec
+ || (total->tv_sec == children->tv_sec
+ && total->tv_usec <= children->tv_usec))
+ return;
+#endif
+ profile_add(self, total);
+ profile_sub(self, children);
+}
+
+/*
* Get the current waittime.
*/
void
@@ -3000,8 +3022,8 @@ do_source(fname, check_other, is_vimrc)
profile_end(&si->sn_pr_start);
profile_sub_wait(&wait_start, &si->sn_pr_start);
profile_add(&si->sn_pr_total, &si->sn_pr_start);
- profile_add(&si->sn_pr_self, &si->sn_pr_start);
- profile_sub(&si->sn_pr_self, &si->sn_pr_children);
+ profile_self(&si->sn_pr_self, &si->sn_pr_start,
+ &si->sn_pr_children);
}
}
#endif
@@ -3505,9 +3527,9 @@ script_line_end()
++pp->snp_count;
profile_end(&si->sn_prl_start);
profile_sub_wait(&si->sn_prl_wait, &si->sn_prl_start);
- profile_add(&pp->sn_prl_self, &si->sn_prl_start);
profile_add(&pp->sn_prl_total, &si->sn_prl_start);
- profile_sub(&pp->sn_prl_self, &si->sn_prl_children);
+ profile_self(&pp->sn_prl_self, &si->sn_prl_start,
+ &si->sn_prl_children);
}
si->sn_prl_idx = -1;
}
diff --git a/src/main.c b/src/main.c
index 60aebf9ff8..37d2e94379 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2589,6 +2589,9 @@ source_startup_scripts(parmp)
#ifdef SYS_VIMRC_FILE
(void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, FALSE);
#endif
+#ifdef MACOS_X
+ (void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, FALSE);
+#endif
/*
* Try to read initialization commands from the following places:
diff --git a/src/memline.c b/src/memline.c
index b876261b0d..876704a8ab 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2647,7 +2647,7 @@ ml_append_int(buf, lnum, line, len, newfile, mark)
/*
* Replace line lnum, with buffering, in current buffer.
*
- * If copy is TRUE, make a copy of the line, otherwise the line has been
+ * If "copy" is TRUE, make a copy of the line, otherwise the line has been
* copied to allocated memory already.
*
* Check: The caller of this function should probably also call
diff --git a/src/misc1.c b/src/misc1.c
index 83995356f3..60b87ca45e 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -4430,12 +4430,8 @@ vim_ispathsep(c)
/* server"user passwd"::device:[full.path.name]fname.extension;version" */
return (c == ':' || c == '[' || c == ']' || c == '/'
|| c == '<' || c == '>' || c == '"' );
-# else
-# ifdef COLON_AS_PATHSEP
- return (c == ':');
-# else /* Amiga */
+# else /* Amiga */
return (c == ':' || c == '/');
-# endif
# endif /* VMS */
# endif
# endif
diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro
index cc56643846..336e01e758 100644
--- a/src/proto/ex_cmds2.pro
+++ b/src/proto/ex_cmds2.pro
@@ -15,6 +15,7 @@ void profile_start __ARGS((proftime_T *tm));
void profile_end __ARGS((proftime_T *tm));
void profile_sub __ARGS((proftime_T *tm, proftime_T *tm2));
void profile_add __ARGS((proftime_T *tm, proftime_T *tm2));
+void profile_self __ARGS((proftime_T *self, proftime_T *total, proftime_T *children));
void profile_get_wait __ARGS((proftime_T *tm));
void profile_sub_wait __ARGS((proftime_T *tm, proftime_T *tma));
int profile_equal __ARGS((proftime_T *tm1, proftime_T *tm2));