Skip to content

Commit

Permalink
sys: fix typos in the documentation [@pcl, Peter Lane]
Browse files Browse the repository at this point in the history
  • Loading branch information
briansfrank committed Feb 10, 2024
1 parent a65524d commit bec5b42
Show file tree
Hide file tree
Showing 40 changed files with 234 additions and 214 deletions.
22 changes: 11 additions & 11 deletions src/sys/fan/Buf.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
** OutStream, then call `Buf.flip` to prepare the buffer to be used for reading.
**
** Memory bufs may be made immutable by calling `Obj.toImmutable`. When a
** a buf is made immutable, the original buffer's data is cleared (to avoid
** buf is made immutable, the original buffer's data is cleared (to avoid
** copying the backing array). All write operations on an immutable buf will
** raise a 'ReadonlyErr'. Reads may be performed by acquiring an InStream via
** the `in` method. However, reads operations which require a mutable Buf
** pos will raise ReadonlyErr too including methods such as `seek` or `read`.
** the `in` method. However, read operations which require a mutable Buf
** pos will raise ReadonlyErr too, including methods such as `seek` or `read`.
** Use `dup` to copy an immutable buf back into a mutable buf.
**
class Buf
Expand Down Expand Up @@ -111,7 +111,7 @@ class Buf

**
** Return the current position for the next read or write. The
** position is always between 0 and `size`. If pos is less then
** position is always between 0 and `size`. If pos is less than
** size then future writes will rewrite the existing bytes without
** growing size. Change the position with `seek`.
**
Expand Down Expand Up @@ -144,7 +144,7 @@ class Buf
**
** Get the byte at the specified absolute index. A negative index
** may be used to access from the end of the buffer. For example
** get(-1) is translated into get(size()-1). This method accesses
** get(-1) is translated into get(size-1). This method accesses
** the buffer absolutely independent of current position. The get
** method is accessed via the [] shortcut operator. Throw IndexErr
** if index out of range.
Expand Down Expand Up @@ -180,7 +180,7 @@ class Buf
//////////////////////////////////////////////////////////////////////////

**
** Set is used to overwrite the byte at the specified the index. A
** Set is used to overwrite the byte at the specified index. A
** negative index may be used to access an index from the end of the
** buffer. The set method is accessed via the []= shortcut operator.
** Return this. Throw IndexErr if index is out of range.
Expand Down Expand Up @@ -591,12 +591,12 @@ class Buf
static Buf fromBase64(Str s)

**
** Apply the specified message digest algorthm to this buffer's
** Apply the specified message digest algorithm to this buffer's
** contents from 0 to size and return the resulting hash. Digests
** are secure one-way hash functions which input an arbitrary sized
** buffer and return a fixed sized buffer. Common algorithms include:
** "MD5", "SHA-1", and "SHA-256"; the full list supported is platform
** dependent. On the Java VM, the algorithm maps to those avaialble
** dependent. On the Java VM, the algorithm maps to those available
** via the 'java.security.MessageDigest' API. Throw ArgErr if the
** algorithm is not available. This method is unsupported for mmap
** buffers.
Expand All @@ -608,14 +608,14 @@ class Buf
Buf toDigest(Str algorithm)

**
** Compute a cycle reduancy check code using this buffer's contents
** Compute a cycle redundancy check code using this buffer's contents
** from 0 to size. The supported algorithm names:
** - "CRC-16": also known as CRC-16-ANSI, CRC-16-IBM; used by
** USB, ANSI X3.28, and Modbus
** - "CRC-32": used by Ethernet, MPEG-2, PKZIP, Gzip, PNG
** - "CRC-32-Adler": used by Zlib
**
** Raise ArgErr is algorithm is not available. This method is
** Raise ArgErr if algorithm is not available. This method is
** only supported for memory based buffers.
**
Int crc(Str algorithm)
Expand Down Expand Up @@ -643,7 +643,7 @@ class Buf
Buf hmac(Str algorithm, Buf key)

**
** Generate a password based cryptographic key. Supported algoriths:
** Generate a password based cryptographic key. Supported algorithms:
** - "PBKDF2WithHmacSHA1"
** - "PBKDF2WithHmacSHA256"
**
Expand Down
4 changes: 2 additions & 2 deletions src/sys/fan/CancelledErr.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

**
** CancelledErr indicates that an operation was cancelled
** before it complete normally.
** before it completed normally.
**
const class CancelledErr : Err
{
Expand All @@ -18,4 +18,4 @@ const class CancelledErr : Err
**
new make(Str msg := "", Err? cause := null)

}
}
8 changes: 4 additions & 4 deletions src/sys/fan/Charset.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ const final class Charset
//////////////////////////////////////////////////////////////////////////

**
** An charset for "UTF-8" format (Eight-bit UCS Transformation Format).
** A charset for "UTF-8" format (Eight-bit UCS Transformation Format).
**
static Charset utf8()

**
** An charset for "UTF-16BE" format (Sixteen-bit UCS Transformation
** A charset for "UTF-16BE" format (Sixteen-bit UCS Transformation
** Format, big-endian byte order).
**
static Charset utf16BE()

**
** An charset for "UTF-16LE" format (Sixteen-bit UCS Transformation
** A charset for "UTF-16LE" format (Sixteen-bit UCS Transformation
** Format, little-endian byte order).
**
static Charset utf16LE()
Expand Down Expand Up @@ -81,4 +81,4 @@ const final class Charset
**
override Str toStr()

}
}
12 changes: 6 additions & 6 deletions src/sys/fan/Date.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const final class Date
** - month: Month enumeration
** - day: 1-31
**
** Throw ArgErr is any of the parameters are out of range.
** Throw ArgErr if any of the parameters are out of range.
**
static new make(Int year, Month month, Int day)

Expand All @@ -65,7 +65,7 @@ const final class Date
//////////////////////////////////////////////////////////////////////////

**
** Two dates are equal if have the same year, month, and day.
** Two dates are equal if they have the same year, month, and day.
**
override Bool equals(Obj? that)

Expand Down Expand Up @@ -187,7 +187,7 @@ const final class Date

**
** Add the specified number of days to this date to get a date in
** the future. Throw ArgErr if 'days' parameter it not a whole number
** the future. Throw ArgErr if 'days' parameter is not a whole number
** of days (must be evenly divisible by 24hr).
**
** Example:
Expand All @@ -197,7 +197,7 @@ const final class Date

**
** Subtract the specified number of days to this date to get a date in
** the past. Throw ArgErr if 'days' parameter it not a whole number
** the past. Throw ArgErr if 'days' parameter is not a whole number
** of days (must be evenly divisible by 24hr).
**
** Example:
Expand Down Expand Up @@ -255,7 +255,7 @@ const final class Date
DateTime toDateTime(Time t, TimeZone tz := TimeZone.cur)

**
** Return a DateTime for the beginning of the this day at midnight.
** Return a DateTime for the beginning of this day at midnight.
**
DateTime midnight(TimeZone tz := TimeZone.cur)

Expand All @@ -264,4 +264,4 @@ const final class Date
**
Str toCode()

}
}
18 changes: 9 additions & 9 deletions src/sys/fan/DateTime.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const final class DateTime
** the lifetime of this VM. Since most platforms don't actually support
** nanosecond resolution, the unused nanoseconds are used as a counter
** to ensure uniqueness. However, bursts of calls may result in a
** drift from the actual system time. For example if the platform's
** drift from the actual system time. For example, if the platform's
** clock supports millisecond resolution, then calling this method
** more than one million time within a millisecond will introduce
** more than one million times within a millisecond will introduce
** a millisecond drift (1,000,000ns in a ms).
**
static Int nowUnique()
Expand All @@ -80,7 +80,7 @@ const final class DateTime
** - ns: 0-999_999_999
** - tz: time zone used to map date/time to ns ticks
**
** Throw ArgErr is any of the parameters are out of range.
** Throw ArgErr if any of the parameters are out of range.
**
static new make(Int year, Month month, Int day, Int hour, Int min, Int sec := 0, Int ns := 0, TimeZone tz := TimeZone.cur)

Expand Down Expand Up @@ -112,7 +112,7 @@ const final class DateTime
//////////////////////////////////////////////////////////////////////////

**
** Two times are equal if have identical nanosecond ticks.
** Two times are equal if they have identical nanosecond ticks.
**
override Bool equals(Obj? that)

Expand All @@ -133,7 +133,7 @@ const final class DateTime
** See `toLocale` for the pattern legend. The base of the
** string encoding conforms to ISO 8601 and XML Schema
** Part 2. The Fantom format also appends the timezone name to
** avoid the ambiguities associated with interpretting the time
** avoid the ambiguities associated with interpreting the time
** zone offset. Also see `toIso` and `toHttpStr`.
**
** Examples:
Expand Down Expand Up @@ -239,7 +239,7 @@ const final class DateTime
** Return the number of hours for this date and this timezone.
** Days which transition to DST will be 23 hours and days which
** transition back to standard time will be 25 hours. Note there
** one timezone "Lord_Howe" which has a 30min offset which is
** is one timezone "Lord_Howe" which has a 30min offset which is
** not handled by this method (WTF).
**
Int hoursInDay()
Expand Down Expand Up @@ -291,7 +291,7 @@ const final class DateTime
** 'xyz' Literal characters
** '' Single quote literal
**
** A symbol immediately preceding a "F" pattern with a no
** A symbol immediately preceding a "F" pattern with no
** fraction to print is skipped.
**
** Examples:
Expand Down Expand Up @@ -448,7 +448,7 @@ const final class DateTime
** YYYY-MM-DD'T'hh:mm:ss[.FFFFFFFFF]+HH:MM
** YYYY-MM-DD'T'hh:mm:ss[.FFFFFFFFF]-HH:MM
**
** If a timezone offset is specified, then one the predefined "Etc/GMT+x"
** If a timezone offset is specified, then one of the predefined "Etc/GMT+x"
** timezones are used for the result:
** DateTime("2009-01-15T12:00:00Z") => 2009-01-15T12:00:00Z UTC
** DateTime("2009-01-15T12:00:00-05:00") => 2009-01-15T12:00:00-05:00 GMT+5
Expand Down Expand Up @@ -498,4 +498,4 @@ const final class DateTime
Str toCode()


}
}
6 changes: 3 additions & 3 deletions src/sys/fan/Depend.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
** within "1.2". Likewise "foo 1.2.64" will match all patch numbers
** within the "1.2.64" build. The "+" plus sign is used to specify a
** given version and anything greater. The "-" dash is used to
** specify an inclusive range. When using a range, then end version
** specify an inclusive range. When using a range, the end version
** is matched using the same rules as a simple version - for example
** "4", "4.2", and "4.0.99" are all matches for "foo 1.2-4". You may
** specify a list of potential constraints separated by commas - a match
Expand All @@ -51,7 +51,7 @@ final const class Depend
//////////////////////////////////////////////////////////////////////////

**
** Parse the string according into a dependency. See class
** Parse the string accordingly into a dependency. See class
** header for specification of the format. If invalid format
** and checked is false return null, otherwise throw ParseErr.
**
Expand Down Expand Up @@ -146,4 +146,4 @@ final const class Depend
Bool match(Version version)


}
}
7 changes: 4 additions & 3 deletions src/sys/fan/Duration.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ const final class Duration
Duration max(Duration that)

**
** Clamp this duration between the min and max. If its less than min then
** return min, if its greater than max return max, otherwise return this
** Clamp this duration between the min and max. If it's less than min then
** return min, if it's greater than max return max, otherwise return this
** duration itself.
**
Duration clamp(Duration min, Duration max)
Expand Down Expand Up @@ -207,6 +207,7 @@ const final class Duration
**
** Get this duration in minutes. Any fractional
** minutes are truncated with a loss of precision.
**
Int toMin()

**
Expand Down Expand Up @@ -265,4 +266,4 @@ const final class Duration
**
static Duration fromIso(Str s, Bool checked := true)

}
}
8 changes: 4 additions & 4 deletions src/sys/fan/Env.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ abstract const class Env
//////////////////////////////////////////////////////////////////////////

**
** Path used by `findFile` is this is a `util::PathEnv`.
** Path used by `findFile` if this is a `util::PathEnv`.
**
virtual File[] path()

Expand Down Expand Up @@ -235,7 +235,7 @@ abstract const class Env

**
** Resolve the pod file for the given pod name. If the
** name cannot be resovled to a pod, return null. The
** name cannot be resolved to a pod, return null. The
** default implementation routes to `findFile` to look
** in "lib/fan" directory.
**
Expand Down Expand Up @@ -319,7 +319,7 @@ abstract const class Env
** The uri must be relative. Note that props such as locale files
** can be bundled into a pod for deployment and searched by adding
** an indexed prop with the key "sys.envProps" and the pod name as
** the value. This feature is not support "config.props".
** the value. This feature does not support "config.props".
**
** The files are parsed using `InStream.readProps` and merged according
** to their priority order. If the file is defined as a resource in
Expand All @@ -328,7 +328,7 @@ abstract const class Env
** overwrites any key-value pairs defined at a lower priority.
**
** The map is cached so that subsequent calls for the same path
** doesn't require accessing the file system again. The 'maxAge'
** don't require accessing the file system again. The 'maxAge'
** parameter specifies the tolerance accepted before a cache
** refresh is performed to check if any of the files have been
** modified.
Expand Down
4 changes: 2 additions & 2 deletions src/sys/fan/Facet.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//

**
** Facet is a mixin includes into every facet type.
** Facet is a mixin included into every facet type.
**
** See `docLang::Facets` for details.
**
const mixin Facet
{
}
}
8 changes: 4 additions & 4 deletions src/sys/fan/Facets.fan
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ facet class Serializable
const Bool simple := false

**
** Collections are serializabled with a collection of child objects
** Collections are serialized with a collection of child objects
** using the following rules where 'Item' is the item type:
** - Provide an 'add(Item)' method to add child items during 'readObj'
** - Provide an 'each(|Item| f)' method to iterate children item
** - Provide an 'each(|Item| f)' method to iterate child items
** during 'writeObj'
**
const Bool collection := false
Expand All @@ -47,7 +47,7 @@ facet class Serializable
**************************************************************************

**
** Transient annotates fields which should not be serialized. It used inside
** Transient annotates fields which should not be serialized. It is used inside
** a `Serializable` type. See the [Serialization Doc]`docLang::Serialization`
** for details.
**
Expand Down Expand Up @@ -94,7 +94,7 @@ facet class Deprecated
**************************************************************************

**
** Used on methods to indicate method may be used an operator.
** Used on methods to indicate method may be used as an operator.
** The operator symbol is determined by the method name:
**
** prefix symbol degree
Expand Down
Loading

0 comments on commit bec5b42

Please sign in to comment.