summaryrefslogtreecommitdiffstats
path: root/Doc/libgdbm.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/libgdbm.tex')
-rw-r--r--Doc/libgdbm.tex93
1 files changed, 0 insertions, 93 deletions
diff --git a/Doc/libgdbm.tex b/Doc/libgdbm.tex
deleted file mode 100644
index 8f2d7d1..0000000
--- a/Doc/libgdbm.tex
+++ /dev/null
@@ -1,93 +0,0 @@
-\section{Built-in Module \module{gdbm}}
-\label{module-gdbm}
-\bimodindex{gdbm}
-
-% Note that if this section appears on the same page as the first
-% paragraph of the dbm module section, makeindex will produce the
-% warning:
-%
-% ## Warning (input = lib.idx, line = 1184; output = lib.ind, line = 852):
-% -- Conflicting entries: multiple encaps for the same page under same key.
-%
-% This is because the \bimodindex{gdbm} and \refbimodindex{gdbm}
-% entries in the .idx file are slightly different (the \bimodindex{}
-% version includes "|textbf" at the end to make the defining occurance
-% bold). There doesn't appear to be anything that can be done about
-% this; it's just a little annoying. The warning can be ignored, but
-% the index produced uses the non-bold version.
-
-This module is quite similar to the \code{dbm} module, but uses \code{gdbm}
-instead to provide some additional functionality. Please note that
-the file formats created by \code{gdbm} and \code{dbm} are incompatible.
-\refbimodindex{dbm}
-
-The \code{gdbm} module provides an interface to the GNU DBM
-library. \code{gdbm} objects behave like mappings
-(dictionaries), except that keys and values are always strings.
-Printing a \code{gdbm} object doesn't print the keys and values, and the
-\code{items()} and \code{values()} methods are not supported.
-
-The module defines the following constant and functions:
-
-\begin{excdesc}{error}
-Raised on \code{gdbm}-specific errors, such as I/O errors. \code{KeyError} is
-raised for general mapping errors like specifying an incorrect key.
-\end{excdesc}
-
-\begin{funcdesc}{open}{filename, \optional{flag, \optional{mode}}}
-Open a \code{gdbm} database and return a \code{gdbm} object. The
-\var{filename} argument is the name of the database file.
-
-The optional \var{flag} argument can be
-\code{'r'} (to open an existing database for reading only --- default),
-\code{'w'} (to open an existing database for reading and writing),
-\code{'c'} (which creates the database if it doesn't exist), or
-\code{'n'} (which always creates a new empty database).
-
-Appending \code{f} to the flag opens the database in fast mode;
-altered data will not automatically be written to the disk after every
-change. This results in faster writes to the database, but may result
-in an inconsistent database if the program crashes while the database
-is still open. Use the \code{sync()} method to force any unwritten
-data to be written to the disk.
-
-The optional \var{mode} argument is the \UNIX{} mode of the file, used
-only when the database has to be created. It defaults to octal
-\code{0666}.
-\end{funcdesc}
-
-In addition to the dictionary-like methods, \code{gdbm} objects have the
-following methods:
-
-\begin{funcdesc}{firstkey}{}
-It's possible to loop over every key in the database using this method
-and the \code{nextkey()} method. The traversal is ordered by \code{gdbm}'s
-internal hash values, and won't be sorted by the key values. This
-method returns the starting key.
-\end{funcdesc}
-
-\begin{funcdesc}{nextkey}{key}
-Returns the key that follows \var{key} in the traversal. The
-following code prints every key in the database \code{db}, without having to
-create a list in memory that contains them all:
-\begin{verbatim}
-k=db.firstkey()
-while k!=None:
- print k
- k=db.nextkey(k)
-\end{verbatim}
-\end{funcdesc}
-
-\begin{funcdesc}{reorganize}{}
-If you have carried out a lot of deletions and would like to shrink
-the space used by the \code{gdbm} file, this routine will reorganize the
-database. \code{gdbm} will not shorten the length of a database file except
-by using this reorganization; otherwise, deleted file space will be
-kept and reused as new (key,value) pairs are added.
-\end{funcdesc}
-
-\begin{funcdesc}{sync}{}
-When the database has been opened in fast mode, this method forces any
-unwritten data to be written to the disk.
-\end{funcdesc}
-
4e0'>bug_c7d0bc9a549714e0 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/doc/ToUpper.3
blob: 587e76ba6aa9068908cf37c77e7292f090c16002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
'\"
'\" Copyright (c) 1997 by Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
.TH Tcl_UtfToUpper 3 "8.1" Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
Tcl_UniCharToUpper, Tcl_UniCharToLower, Tcl_UniCharToTitle, Tcl_UtfToUpper, Tcl_UtfToLower, Tcl_UtfToTitle \- routines for manipulating the case of Unicode characters and UTF-8 strings
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
Tcl_UniChar
\fBTcl_UniCharToUpper\fR(\fIch\fR)
.sp
Tcl_UniChar
\fBTcl_UniCharToLower\fR(\fIch\fR)
.sp
Tcl_UniChar
\fBTcl_UniCharToTitle\fR(\fIch\fR)
.sp
int
\fBTcl_UtfToUpper\fR(\fIstr\fR)
.sp
int
\fBTcl_UtfToLower\fR(\fIstr\fR)
.sp
int
\fBTcl_UtfToTitle\fR(\fIstr\fR)
.SH ARGUMENTS
.AS char *str in/out
.AP int ch in
The Tcl_UniChar to be converted.
.AP char *str in/out
Pointer to UTF-8 string to be converted in place.
.BE

.SH DESCRIPTION
.PP
The first three routines convert the case of individual Unicode characters:
.PP
If \fIch\fR represents a lower-case character,
\fBTcl_UniCharToUpper\fR returns the corresponding upper-case
character.  If no upper-case character is defined, it returns the
character unchanged.
.PP
If \fIch\fR represents an upper-case character,
\fBTcl_UniCharToLower\fR returns the corresponding lower-case
character.  If no lower-case character is defined, it returns the
character unchanged.
.PP
If \fIch\fR represents a lower-case character,
\fBTcl_UniCharToTitle\fR returns the corresponding title-case
character.  If no title-case character is defined, it returns the
corresponding upper-case character.  If no upper-case character is
defined, it returns the character unchanged.  Title-case is defined
for a small number of characters that have a different appearance when
they are at the beginning of a capitalized word.
.PP
The next three routines convert the case of UTF-8 strings in place in
memory:
.PP
\fBTcl_UtfToUpper\fR changes every UTF-8 character in \fIstr\fR to
upper-case.  Because changing the case of a character may change its
size, the byte offset of each character in the resulting string may
differ from its original location.  \fBTcl_UtfToUpper\fR writes a null
byte at the end of the converted string.  \fBTcl_UtfToUpper\fR returns
the new length of the string in bytes.  This new length is guaranteed
to be no longer than the original string length.
.PP
\fBTcl_UtfToLower\fR is the same as \fBTcl_UtfToUpper\fR except it
turns each character in the string into its lower-case equivalent.
.PP
\fBTcl_UtfToTitle\fR is the same as \fBTcl_UtfToUpper\fR except it
turns the first character in the string into its title-case equivalent
and all following characters into their lower-case equivalents.

.SH BUGS
.PP
At this time, the case conversions are only defined for the ISO8859-1
characters.  Unicode characters above 0x00ff are not modified by these
routines.

.SH KEYWORDS
utf, unicode, toupper, tolower, totitle, case