summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-20 13:03:51 +0000
committerDavid S. Miller <davem@davemloft.net>2010-04-20 16:37:13 -0700
commitaa395145165cb06a0d0885221bbe0ce4a564391d (patch)
tree118b0403621f10db8dc3dbf12079f9af5b19e05d /net/sunrpc/svcsock.c
parentab9304717f7624c41927f442e6b6d418b2d8b3e4 (-rw-r--r--runtime/doc/eval.txt60
-rw-r--r--Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index a29f259204e6..ce0d5b35c2ac 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -419,8 +419,8 @@ static void svc_udp_data_ready(struct sock *sk, int count)
set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
svc_xprt_enqueue(&svsk->sk_xprt);
}
- if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible(sk->sk_sleep);
+ if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk)))
+ wake_up_interruptible(sk_sleep(sk));
}
/*
@@ -436,10 +436,10 @@ static void svc_write_space(struct sock *sk)
svc_xprt_enqueue(&svsk->sk_xprt);
}
- if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) {
+ if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk))) {
dprintk("RPC svc_write_space: someone sleeping on %p\n",
svsk);
- wake_up_interruptible(sk->sk_sleep);
+ wake_up_interruptible(sk_sleep(sk));
}
}
@@ -757,8 +757,8 @@ static void svc_tcp_listen_data_ready(struct sock *sk, int count_unused)
printk("svc: socket %p: no user data\n", sk);
}
- if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible_all(sk->sk_sleep);
+ if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk)))
+ wake_up_interruptible_all(sk_sleep(sk));
}
/*
@@ -777,8 +777,8 @@ static void svc_tcp_state_change(struct sock *sk)
set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags);
svc_xprt_enqueue(&svsk->sk_xprt);
}
- if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible_all(sk->sk_sleep);
+ if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk)))
+ wake_up_interruptible_all(sk_sleep(sk));
}
static void svc_tcp_data_ready(struct sock *sk, int count)
@@ -791,8 +791,8 @@ static void svc_tcp_data_ready(struct sock *sk, int count)
set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
svc_xprt_enqueue(&svsk->sk_xprt);
}
- if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible(sk->sk_sleep);
+ if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk)))
+ wake_up_interruptible(sk_sleep(sk));
}
/*
@@ -1494,8 +1494,8 @@ static void svc_sock_detach(struct svc_xprt *xprt)
sk->sk_data_ready = svsk->sk_odata;
sk->sk_write_space = svsk->sk_owspace;
- if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible(sk->sk_sleep);
+ if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk)))
+ wake_up_interruptible(sk_sleep(sk));
}
/*
ns.vim
79
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h16
17 files changed, 272 insertions, 32 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 816aeca143..4ab8bbd1ee 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1745,6 +1745,14 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
was used the value is 1, otherwise it is 0. Note that this
can only be used in autocommands. For user commands |<bang>|
can be used.
+ *v:collate* *collate-variable*
+v:collate The current locale setting for collation order of the runtime
+ environment. This allows Vim scripts to be aware of the
+ current locale encoding. Technical: it's the value of
+ LC_COLLATE. When not using a locale the value is "C".
+ This variable can not be set directly, use the |:language|
+ command.
+ See |multi-lang|.
*v:completed_item* *completed_item-variable*
v:completed_item
@@ -2683,8 +2691,10 @@ pyxeval({expr}) any evaluate |python_x| expression
rand([{expr}]) Number get pseudo-random number
range({expr} [, {max} [, {stride}]])
List items from {expr} to {max}
-readdir({dir} [, {expr}]) List file names in {dir} selected by {expr}
-readdirex({dir} [, {expr}]) List file info in {dir} selected by {expr}
+readdir({dir} [, {expr} [, {dict}]])
+ List file names in {dir} selected by {expr}
+readdirex({dir} [, {expr} [, {dict}]])
+ List file info in {dir} selected by {expr}
readfile({fname} [, {type} [, {max}]])
List get list of lines from file {fname}
reduce({object}, {func} [, {initial}])
@@ -7904,11 +7914,12 @@ rand([{expr}]) *rand()* *random*
:echo rand(seed)
:echo rand(seed) % 16 " random number 0 - 15
<
-readdir({directory} [, {expr}]) *readdir()*
+readdir({directory} [, {expr} [, {dict}]]) *readdir()*
Return a list with file and directory names in {directory}.
You can also use |glob()| if you don't need to do complicated
things, such as limiting the number of matches.
- The list will be sorted (case sensitive).
+ The list will be sorted (case sensitive), see the {dict}
+ argument below for changing the sort order.
When {expr} is omitted all entries are included.
When {expr} is given, it is evaluated to check what to do:
@@ -7926,18 +7937,38 @@ readdir({directory} [, {expr}]) *readdir()*
< To skip hidden and backup files: >
readdir(dirname, {n -> n !~ '^\.\|\~$'})
+< The optional {dict} argument allows for further custom
+ values. Currently this is used to specify if and how sorting
+ should be performed. The dict can have the following members:
+
+ sort How to sort the result returned from the system.
+ Valid values are:
+ "none" do not sort (fastest method)
+ "case" sort case sensitive (byte value of
+ each character, technically, using
+ strcmp()) (default)
+ "icase" sort case insensitive (technically
+ using strcasecmp())
+ "collate" sort using the collation order
+ of the "POSIX" or "C" |locale|
+ (technically using strcoll())
+ Other values are silently ignored.
+
+ For example, to get a list of all files in the current
+ directory without sorting the individual entries: >
+ readdir('.', '1', #{sort: 'none'})
< If you want to get a directory tree: >
- function! s:tree(dir)
- return {a:dir : map(readdir(a:dir),
+ function! s:tree(dir)
+ return {a:dir : map(readdir(a:dir),
\ {_, x -> isdirectory(x) ?
- \ {x : s:tree(a:dir . '/' . x)} : x})}
- endfunction
- echo s:tree(".")
+ \ {x : s:tree(a:dir . '/' . x)} : x})}
+ endfunction
+ echo s:tree(".")
<
Can also be used as a |method|: >
GetDirName()->readdir()
<
-readdirex({directory} [, {expr}]) *readdirex()*
+readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
Extended version of |readdir()|.
Return a list of Dictionaries with file and directory
information in {directory}.
@@ -7946,7 +7977,9 @@ readdirex({directory} [, {expr}]) *readdirex()*
This is much faster than calling |readdir()| then calling
|getfperm()|, |getfsize()|, |getftime()| and |getftype()| for
each file and directory especially on MS-Windows.
- The list will be sorted by name (case sensitive).
+ The list will by default be sorted by name (case sensitive),
+ the sorting can be changed by using the optional {dict}
+ argument, see |readdir()|.
The Dictionary for file and directory information has the
following items:
@@ -7987,6 +8020,11 @@ readdirex({directory} [, {expr}]) *readdirex()*
For example, to get a list of files ending in ".txt": >
readdirex(dirname, {e -> e.name =~ '.txt$'})
<
+ For example, to get a list of all files in the current
+ directory without sorting the individual entries: >
+ readdirex(dirname, '1', #{sort: 'none'})
+
+<
Can also be used as a |method|: >
GetDirName()->readdirex()
<
diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt
index 629907c162..b453a39e31 100644
--- a/runtime/doc/mlang.txt
+++ b/runtime/doc/mlang.txt
@@ -37,6 +37,7 @@ use of "-" and "_".
:lan[guage] mes[sages]
:lan[guage] cty[pe]
:lan[guage] tim[e]
+:lan[guage] col[late]
Print the current language (aka locale).
With the "messages" argument the language used for
messages is printed. Technical: LC_MESSAGES.
@@ -44,15 +45,19 @@ use of "-" and "_".
character encoding is printed. Technical: LC_CTYPE.
With the "time" argument the language used for
strftime() is printed. Technical: LC_TIME.
+ With the "collate" argument the language used for
+ collation order is printed. Technical: LC_COLLATE.
Without argument all parts of the locale are printed
(this is system dependent).
The current language can also be obtained with the
- |v:lang|, |v:ctype| and |v:lc_time| variables.
+ |v:lang|, |v:ctype|, |v:collate| and |v:lc_time|
+ variables.
:lan[guage] {name}
:lan[guage] mes[sages] {name}
:lan[guage] cty[pe] {name}
:lan[guage] tim[e] {name}
+:lan[guage] col[late] {name}
Set the current language (aka locale) to {name}.
The locale {name} must be a valid locale on your
system. Some systems accept aliases like "en" or
@@ -72,7 +77,10 @@ use of "-" and "_".
With the "time" argument the language used for time
and date messages is set. This affects strftime().
This sets $LC_TIME.
- Without an argument both are set, and additionally
+ With the "collate" argument the language used for the
+ collation order is set. This affects sorting of
+ characters. This sets $LC_COLLATE.
+ Without an argument all are set, and additionally
$LANG is set.
When compiled with the |+float| feature the LC_NUMERIC
value will always be set to "C", so that floating
diff --git a/src/auto/configure b/src/auto/configure
index 4c3ff325d0..f642a0b5f9 100755
--- a/src/auto/configure
+++ b/src/auto/configure