From a853ee40c6475801ca03c17a11632d48a4992de7 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 10 Feb 2010 10:10:17 +0000 Subject: OTP-8422 Removed bogus "\011" character sequence in documentation. --- erts/doc/src/alt_dist.xml | 22 +++---- erts/doc/src/crash_dump.xml | 8 +-- erts/doc/src/driver.xml | 142 +++++++++++++++++++++--------------------- erts/doc/src/driver_entry.xml | 8 +-- erts/doc/src/erlang.xml | 24 +++---- erts/doc/src/erlsrv.xml | 22 +++---- erts/doc/src/escript.xml | 20 +++--- erts/doc/src/match_spec.xml | 40 ++++++------ erts/doc/src/notes.xml | 20 +++--- erts/doc/src/tty.xml | 8 +-- erts/doc/src/zlib.xml | 24 +++---- 11 files changed, 168 insertions(+), 170 deletions(-) (limited to 'erts/doc/src') diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index 9a68b3cf40..a929aec97f 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -4,7 +4,7 @@
- 20002009 + 20002010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + How to implement an alternative carrier for the Erlang distribution @@ -939,7 +939,7 @@ connection that is not functioning. 'R': Get creation number of listen socket, which is used to dig out the number stored in the lock file to differentiate - between invocations of Erlang nodes with the same name.\011 + between invocations of Erlang nodes with the same name.

The control interface gets a buffer to return its value in, but is free to allocate it's own buffer is the provided one is @@ -949,11 +949,11 @@ ( 2) char* buf, int count, char** res, int res_size) ( 3) { ( 4) /* Local macro to ensure large enough buffer. */ -( 5) #define ENSURE(N) \\ -( 6) do { \\ -( 7) if (res_size < N) { \\ -( 8) *res = ALLOC(N); \\ -( 9) } \\ +( 5) #define ENSURE(N) \ +( 6) do { \ +( 7) if (res_size < N) { \ +( 8) *res = ALLOC(N); \ +( 9) } \ (10) } while(0) (11) UdsData *ud = (UdsData *) handle; @@ -1075,7 +1075,7 @@ Eshell V5.0 (abort with ^G) (bing@hador)2>

...

-$ erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \\ 
+$ erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \ 
       -no_epmd -sname bong
 Erlang (BEAM) emulator version 5.0 
  
@@ -1084,7 +1084,7 @@ Eshell V5.0  (abort with ^G)
     

One can utilize the ERL_FLAGS environment variable to store the complicated parameters in:

-$ ERL_FLAGS=-pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin \\ 
+$ ERL_FLAGS=-pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin \ 
       -proto_dist uds -no_epmd
 $ export ERL_FLAGS
 $ erl -sname bang
diff --git a/erts/doc/src/crash_dump.xml b/erts/doc/src/crash_dump.xml
index 5182929358..b3c4671c3d 100644
--- a/erts/doc/src/crash_dump.xml
+++ b/erts/doc/src/crash_dump.xml
@@ -4,7 +4,7 @@
 
   
- 19992009 + 19992010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + How to interpret the Erlang crash dumps @@ -96,7 +96,7 @@ allocators see erts_alloc(3). "<A>: Cannot reallocate <N> - bytes of memory\011(of type "<T>")." - Same as + bytes of memory (of type "<T>")." - Same as above with the exception that memory was being reallocated instead of being allocated when the system ran out of memory. "Unexpected op code N" - Error in compiled diff --git a/erts/doc/src/driver.xml b/erts/doc/src/driver.xml index c396ee0b90..12c79aee90 100644 --- a/erts/doc/src/driver.xml +++ b/erts/doc/src/driver.xml @@ -4,7 +4,7 @@
- 20012009 + 20012010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + How to implement a driver @@ -510,11 +510,11 @@ static int do_select(const char* s, our_data_t* data) PGconn* conn = data->conn; /* if there's an error return it now */ if (PQsendQuery(conn, s) == 0) { -\011ei_x_buff x; -\011ei_x_new_with_version(&x); -\011encode_error(&x, conn); -\011driver_output(data->port, x.buff, x.index); -\011ei_x_free(&x); + ei_x_buff x; + ei_x_new_with_version(&x); + encode_error(&x, conn); + driver_output(data->port, x.buff, x.index); + ei_x_free(&x); } /* else wait for ready_output to get results */ return 0; @@ -532,31 +532,31 @@ static void ready_io(ErlDrvData drv_data, ErlDrvEvent event) ei_x_buff x; ei_x_new_with_version(&x); if (data->connecting) { -\011ConnStatusType status; -\011PQconnectPoll(conn); -\011status = PQstatus(conn); -\011if (status == CONNECTION_OK) -\011 encode_ok(&x); -\011else if (status == CONNECTION_BAD) -\011 encode_error(&x, conn); + ConnStatusType status; + PQconnectPoll(conn); + status = PQstatus(conn); + if (status == CONNECTION_OK) + encode_ok(&x); + else if (status == CONNECTION_BAD) + encode_error(&x, conn); } else { -\011PQconsumeInput(conn); -\011if (PQisBusy(conn)) -\011 return; -\011res = PQgetResult(conn); -\011encode_result(&x, res, conn); -\011PQclear(res); -\011for (;;) { -\011 res = PQgetResult(conn); -\011 if (res == NULL) -\011\011break; -\011 PQclear(res); -\011} + PQconsumeInput(conn); + if (PQisBusy(conn)) + return; + res = PQgetResult(conn); + encode_result(&x, res, conn); + PQclear(res); + for (;;) { + res = PQgetResult(conn); + if (res == NULL) + break; + PQclear(res); + } } if (x.index > 1) { -\011driver_output(data->port, x.buff, x.index); -\011if (data->connecting) -\011 driver_select(data->port, (ErlDrvEvent)data->socket, DO_WRITE, 0); + driver_output(data->port, x.buff, x.index); + if (data->connecting) + driver_select(data->port, (ErlDrvEvent)data->socket, DO_WRITE, 0); } ei_x_free(&x); } @@ -592,17 +592,17 @@ static void ready_io(ErlDrvData drv_data, ErlDrvEvent event) connect(ConnectStr) -> case erl_ddll:load_driver(".", "pg_async") of -\011ok -> ok; -\011{error, already_loaded} -> ok; -\011_ -> exit({error, could_not_load_driver}) + ok -> ok; + {error, already_loaded} -> ok; + _ -> exit({error, could_not_load_driver}) end, Port = open_port({spawn, ?MODULE}, [binary]), port_control(Port, ?DRV_CONNECT, ConnectStr), case return_port_data(Port) of -\011ok -> -\011 {ok, Port}; -\011Error -> -\011 Error + ok -> + {ok, Port}; + Error -> + Error end. disconnect(Port) -> @@ -617,8 +617,8 @@ select(Port, Query) -> return_port_data(Port) -> receive -\011{Port, {data, Data}} -> -\011 binary_to_term(Data) + {Port, {data, Data}} -> + binary_to_term(Data) end. ]]>

The Erlang code is slightly different, this is because we @@ -662,22 +662,22 @@ return_port_data(Port) -> call-back .

The function allocates the work-area of the @@ -699,7 +699,7 @@ struct our_async_data { }; our_async_data::our_async_data(ErlDrvPort p, int command, -\011\011\011 const char* buf, int len) + const char* buf, int len) : prev(command == 2), data((int*)buf, (int*)buf + len / sizeof(int)) { @@ -722,9 +722,9 @@ static void do_perm(void* async_data) { our_async_data* d = reinterpret_cast(async_data); if (d->prev) -\011prev_permutation(d->data.begin(), d->data.end()); + prev_permutation(d->data.begin(), d->data.end()); else -\011next_permutation(d->data.begin(), d->data.end()); + next_permutation(d->data.begin(), d->data.end()); } ]]>

In the function, the output is sent back to the @@ -742,9 +742,9 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData async_data) int n = d->data.size(), result_n = n*2 + 3; ErlDrvTermData* result = new ErlDrvTermData[result_n], * rp = result; for (vector::iterator i = d->data.begin(); -\011 i != d->data.end(); ++i) { -\011*rp++ = ERL_DRV_INT; -\011*rp++ = *i; + i != d->data.end(); ++i) { + *rp++ = ERL_DRV_INT; + *rp++ = *i; } *rp++ = ERL_DRV_NIL; *rp++ = ERL_DRV_LIST; @@ -767,16 +767,16 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData async_data) load() -> case whereis(next_perm) of -\011undefined -> -\011 case erl_ddll:load_driver(".", "next_perm") of -\011\011ok -> ok; -\011\011{error, already_loaded} -> ok; -\011\011E -> exit(E) -\011 end, -\011 Port = open_port({spawn, "next_perm"}, []), -\011 register(next_perm, Port); -\011_ -> -\011 ok + undefined -> + case erl_ddll:load_driver(".", "next_perm") of + ok -> ok; + {error, already_loaded} -> ok; + E -> exit(E) + end, + Port = open_port({spawn, "next_perm"}, []), + register(next_perm, Port); + _ -> + ok end. list_to_integer_binaries(L) -> @@ -793,8 +793,8 @@ next_perm(L, Nxt) -> B = list_to_integer_binaries(L), port_control(next_perm, Nxt, B), receive -\011Result -> -\011 Result + Result -> + Result end. all_perm(L) -> diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index 6b7d2acf24..e71b48bd92 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -4,7 +4,7 @@

- 20012009 + 20012010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + driver_entry @@ -188,7 +188,7 @@ typedef struct erl_drv_entry {

This is called when the port is closed, with port_close/1 or Port ! {self(), close}. Note that terminating the port owner process also closes the - p\011 port.

+ port.

void (*output)(ErlDrvData drv_data, char *buf, int len) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 207aabca35..8e2c02e0ce 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -774,10 +774,10 @@ false
erlang:demonitor(MonitorRef), receive -\011{_, MonitorRef, _, _, _} -> -\011 true + {_, MonitorRef, _, _, _} -> + true after 0 -> -\011 true + true end info @@ -2325,13 +2325,13 @@ os_prompt%
other. Values beginning with an uppercase letter is not part of the result.

-\011total = processes + system -\011processes = processes_used + ProcessesNotUsed -\011system = atom + binary + code + ets + OtherSystem -\011atom = atom_used + AtomNotUsed + total = processes + system + processes = processes_used + ProcessesNotUsed + system = atom + binary + code + ets + OtherSystem + atom = atom_used + AtomNotUsed -\011RealTotal = processes + RealSystem -\011RealSystem = system + MissedSystem + RealTotal = processes + RealSystem + RealSystem = system + MissedSystem

More tuples in the returned list may be added in the future.

The total value is supposed to be the total amount @@ -6965,10 +6965,10 @@ true unlink(Id), receive -\011{'EXIT', Id, _} -> -\011 true + {'EXIT', Id, _} -> + true after 0 -> -\011 true + true end

Prior to OTP release R11B (erts version 5.5) unlink/1 diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv.xml index 93db56fc7c..0dfad2a112 100644 --- a/erts/doc/src/erlsrv.xml +++ b/erts/doc/src/erlsrv.xml @@ -4,7 +4,7 @@

- 19982009 + 19982010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + erlsrv @@ -251,7 +251,7 @@ necessarily the same as the interactive users. The service runs as the local administrator. All arguments should be given together in one string, use double quotes (") to give an - argument string containing spaces and use quoted quotes (\\") + argument string containing spaces and use quoted quotes (\") to give an quote within the argument string if necessary. -i[nternalservicename] [<internal name>] @@ -356,7 +356,7 @@ The environment of an Erlang machine started */ BOOL WINAPI service_aware_handler(DWORD ctrl){ if(ctrl == CTRL_LOGOFF_EVENT) -\011return TRUE; + return TRUE; return FALSE; } @@ -368,10 +368,10 @@ void initialize_handler(void){ */ if(GetEnvironmentVariable("ERLSRV_SERVICE_NAME",buffer, (DWORD) 2)){ -\011/* -\011** Actually set the control handler -\011*/ -\011SetConsoleCtrlHandler(&service_aware_handler, TRUE); + /* + ** Actually set the control handler + */ + SetConsoleCtrlHandler(&service_aware_handler, TRUE); } } ]]> @@ -388,8 +388,8 @@ void initialize_handler(void){ the runtime system should not need to overwrite existing (and probably used) executables.

To easily manipulate the Erlang services, put - the \\erts-\\bin]]> directory in - the path instead of \\bin]]>. The erlsrv program + the \erts-\bin]]> directory in + the path instead of \bin]]>. The erlsrv program can be found from inside Erlang by using the Erlang function.

For release handling to work, use as the Erlang diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 8df179b3e2..a89449df23 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -4,7 +4,7 @@

- 20072009 + 20072010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + escript @@ -50,20 +50,18 @@ $ cat factorial %%! -smp enable -sname factorial -mnesia debug verbose main([String]) -> try -\011N = list_to_integer(String), -\011F = fac(N), -\011io:format("factorial ~w = ~w\ -", [N,F]) + N = list_to_integer(String), + F = fac(N), + io:format("factorial ~w = ~w\n", [N,F]) catch -\011_:_ -> -\011 usage() + _:_ -> + usage() end; main(_) -> usage(). usage() -> - io:format("usage: factorial integer\ -"), + io:format("usage: factorial integer\n"), halt(1). fac(0) -> 1; diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 26480473d2..b9f955e4db 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -4,7 +4,7 @@
- 19992009 + 19992010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + Match specifications in Erlang @@ -360,52 +360,52 @@

- Expression\011\011 - Variable bindings\011\011 - Result\011 + Expression + Variable bindings + Result - {{'$1','$2'}}\011\011 + {{'$1','$2'}} '$1' = a, '$2' = b {a,b} - {const, {'$1', '$2'}}\011 + {const, {'$1', '$2'}} doesn't matter {'$1', '$2'} - a\011\011\011 - doesn't matter\011\011\011 + a + doesn't matter a - '$1'\011\011\011 - '$1' = []\011\011\011 + '$1' + '$1' = [] [] - ['$1']\011\011\011 - '$1' = []\011\011\011 + ['$1'] + '$1' = [] [[]] - [{{a}}]\011\011\011 + [{{a}}] doesn't matter [{a}] - 42\011\011\011 + 42 doesn't matter 42 - "hello"\011\011\011 + "hello" doesn't matter "hello" - $1\011\011\011 + $1 doesn't matter 49 (the ASCII value for the character '1') @@ -507,8 +507,8 @@ a list which in turn begins with the second argument times two (i. e. [{[4,x],y},2] or [{[8], y, z},4])

Match three arguments. When all three are equal and are numbers, append the process dump to the trace message, else diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5fe414841e..70f2d95103 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -4371,16 +4371,16 @@ following code might hang:

ok -\011 %% We were previously guaranteed to get a down message -\011 %% (since we exited the process ourself), so we could -\011 %% in this case leave out: -\011 %% after 0 -> ok -\011 end, + receive + {'DOWN', Mon , process, Pid, _} -> ok + %% We were previously guaranteed to get a down message + %% (since we exited the process ourself), so we could + %% in this case leave out: + %% after 0 -> ok + end, ]]>

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-5772

@@ -5342,7 +5342,7 @@

If Erlang/OTP was installed in a short directory name, - such as , the emulator would not + such as , the emulator would not start.

Own Id: OTP-5254

diff --git a/erts/doc/src/tty.xml b/erts/doc/src/tty.xml index 23694e5965..7d662a2849 100644 --- a/erts/doc/src/tty.xml +++ b/erts/doc/src/tty.xml @@ -4,7 +4,7 @@
- 19962009 + 19962010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + tty - A command line interface @@ -47,7 +47,7 @@
Normal Mode

In normal mode keystrokes from the user are collected and interpreted by . Most of the emacs line editing commands are supported. The following is a complete list of the supported line editing commands.

-

Note:\011The notation means pressing the control key and the letter simultaneously. means pressing the key followed by the letter . +

Note: The notation means pressing the control key and the letter simultaneously. means pressing the key followed by the letter .

diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 9f39ac657a..b1e768bce9 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -4,7 +4,7 @@
- 20052009 + 20052010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + zlib @@ -372,11 +372,11 @@ list_to_binary([B1,B2])
 unpack(Z, Compressed, Dict) ->
      case catch zlib:inflate(Z, Compressed) of
-\011  {'EXIT',{{need_dictionary,DictID},_}} ->
-  \011         zlib:inflateSetDictionary(Z, Dict),
-\011         Uncompressed = zlib:inflate(Z, []);
-\011  Uncompressed ->
-\011         Uncompressed
+          {'EXIT',{{need_dictionary,DictID},_}} ->
+                   zlib:inflateSetDictionary(Z, Dict),
+                 Uncompressed = zlib:inflate(Z, []);
+          Uncompressed ->
+                 Uncompressed
      end.
@@ -466,8 +466,8 @@ unpack(Z, Compressed, Dict) -> the required initial value for the crc.

 Crc = lists:foldl(fun(Bin,Crc0) ->  
-\011              zlib:crc32(Z, Crc0, Bin),
-\011          end, zlib:crc32(Z,<< >>), Bins)
+ zlib:crc32(Z, Crc0, Bin), + end, zlib:crc32(Z,<< >>), Bins) @@ -517,8 +517,8 @@ Crc = lists:foldl(fun(Bin,Crc0) -> the required initial value for the checksum.

 Crc = lists:foldl(fun(Bin,Crc0) ->  
-\011              zlib:adler32(Z, Crc0, Bin),
-\011          end, zlib:adler32(Z,<< >>), Bins)
+ zlib:adler32(Z, Crc0, Bin), + end, zlib:adler32(Z,<< >>), Bins)
-- cgit v1.2.3