Changeset 39861 in project


Ignore:
Timestamp:
04/06/21 00:55:39 (2 weeks ago)
Author:
Kon Lovett
Message:

fix make-version args, use correct record tag, add record print example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/semantic-version/trunk/README.svnwiki

    r39858 r39861  
    3535=== make-version
    3636
    37 <procedure>(make-version VER CNT ELM [CHR]) --> version</procedure>
     37<procedure>(make-version CNT ELM [CHR]) --> semantic-version</procedure>
    3838
    3939Returns new version with CNT elements, ELM, and punctuation CHR.
    4040
    41 ; VER : {{version}} ; version to extend.
    4241; CNT : {{integer}} ; element count.
    4342; ELM : {{(or number string symbol)}} ; version element.
     
    4645=== version
    4746
    48 <procedure>(version ELM...) --> version</procedure>
     47<procedure>(version ELM...) --> semantic-version</procedure>
    4948
    5049Returns a new version with the specified elements, ELM..., and the default
     
    5453
    5554'''Note''' that the {{symbol}} printname is used internally.
    56 Returns whether trailing 0's are ignored during comparision.
    5755
    5856=== check-version
    5957=== error-version
    6058
    61 <procedure>(check-version LOC OBJ [NAM]) -> version</procedure>
     59<procedure>(check-version LOC OBJ [NAM]) -> semantic-version</procedure>
    6260<procedure>(error-version LOC OBJ [NAM])</procedure>
    6361
     
    6664=== version-copy
    6765
    68 <procedure>(version-copy VER) --> version</procedure>
     66<procedure>(version-copy VER) --> semantic-version</procedure>
    6967
    7068Return a copy of the version, sharing only atoms.
    7169
    72 ; VER : {{version}} ; version to copy.
     70; VER : {{semantic-version}} ; version to copy.
    7371
    7472=== version?
     
    8482Return the number of elements in the version.
    8583
    86 ; VER : {{version}} ; version to query.
     84; VER : {{semantic-version}} ; version to query.
    8785
    8886=== version-elements
     
    9290Returns list of version elements.
    9391
    94 ; VER : {{version}} ; version to query.
     92; VER : {{semantic-version}} ; version to query.
    9593
    9694=== version-separators
     
    10098Returns list of separator characters (punctuation).
    10199
    102 ; VER : {{version}} ; version to query.
     100; VER : {{semantic-version}} ; version to query.
    103101
    104102=== version->list
     
    109107characeters.
    110108
    111 ; VER : {{version}} ; version to list.
     109; VER : {{semantic-version}} ; version to list.
    112110
    113111=== list->version
    114112
    115 <procedure>(list->version LIS) --> version</procedure>
     113<procedure>(list->version LIS) --> semantic-version</procedure>
    116114
    117115Returns a version from an "exploded" form, see {{version->list}}.
     
    128126always takes precedence. Thus {{"1.a.2" < "a.1.2"}}.
    129127
    130 ; VER1 : {{version}} ; version 1 to compare.
    131 ; VER2 : {{version}} ; version 2 to compare.
     128; VER1 : {{semantic-version}} ; version 1 to compare.
     129; VER2 : {{semantic-version}} ; version 2 to compare.
    132130; TAIL-ZERO? : {{boolean}} ; ignore trailing 0's?
    133131
     
    152150<procedure>(version-hash VER [BND RND]) --> integer</procedure>
    153151
    154 A SRFI 69 compliant hash function for the {{version}} type.
    155 
    156 ; VER : {{version}} ; version to hash.
     152A SRFI 69 compliant hash function for the {{semantic-version}} type.
     153
     154; VER : {{semantic-version}} ; version to hash.
    157155; BND : {{integer}} ; bounds (limit), see SRFI 69.
    158156; RND : {{integer}} ; randomization (salt), see SRFI 69.
     
    162160<procedure>(version-comparator) --> comparator</procedure>
    163161
    164 Returns a SRFI 128 {{comparator}} for the {{version}} type.
     162Returns a SRFI 128 {{comparator}} for the {{semantic-version}} type.
    165163
    166164; {{comparator-hash-function}} : {{version-hash}}
     
    171169=== string->version
    172170
    173 <procedure>(string->version STR) --> version</procedure>
     171<procedure>(string->version STR) --> semantic-version</procedure>
    174172
    175173Return the parsed form of the STR. The source separator (punctuation) is
     
    184182Return the string form of the VER.
    185183
    186 ; VER : {{version}} ; version to convert.
     184; VER : {{semantic-version}} ; version to convert.
    187185
    188186=== version-depth+!
    189187
    190 <procedure>(version-depth+! VER CNT ELM [CHR]) -> version</procedure>
     188<procedure>(version-depth+! VER CNT ELM [CHR]) -> semantic-version</procedure>
    191189
    192190Returns VER with more "depth", as ELM, interspersed with CHR.
    193191
    194 ; VER : {{version}} ; version to extend.
     192; VER : {{semantic-version}} ; version to extend.
    195193; CNT : {{integer}} ; element count.
    196194; ELM : {{(or number string symbol)}} ; version element.
     
    199197=== version-depth-!
    200198
    201 <procedure>(version-depth-! VER CNT) -> version</procedure>
     199<procedure>(version-depth-! VER CNT) -> semantic-version</procedure>
    202200
    203201Returns VER with less "depth", as CNT elements are dropped, along with the
    204202corresponding punctuation.
    205203
    206 ; VER : {{version}} ; version to extend.
     204; VER : {{semantic-version}} ; version to extend.
    207205; CNT : {{integer}} ; element count.
    208206
    209207=== version-depth+
    210208
    211 <procedure>(version-depth+ VER CNT ELM [CHR]) --> version</procedure>
     209<procedure>(version-depth+ VER CNT ELM [CHR]) --> semantic-version</procedure>
    212210
    213211Returns a copy of VER with more "depth", as ELM, interspersed with CHR.
    214212
    215 ; VER : {{version}} ; version to extend.
     213; VER : {{semantic-version}} ; version to extend.
    216214; CNT : {{integer}} ; element count.
    217215; ELM : {{(or number string symbol)}} ; version element.
     
    220218=== version-depth-
    221219
    222 <procedure>(version-depth- VER CNT) --> version</procedure>
     220<procedure>(version-depth- VER CNT) --> semantic-version</procedure>
    223221
    224222Returns a copy of VER with less "depth", as CNT elements are dropped, along
    225223with the corresponding punctuation.
    226224
    227 ; VER : {{version}} ; version to extend.
     225; VER : {{semantic-version}} ; version to extend.
    228226; CNT : {{integer}} ; element count.
    229227
    230228=== version-extend!
    231229
    232 <procedure>(version-extend! VER COMP...) -> version</procedure>
     230<procedure>(version-extend! VER COMP...) -> semantic-version</procedure>
    233231
    234232Returns VER with added "depth", in the form of a new "tail", in "exploded"
    235233form.
    236234
    237 ; VER : {{version}} ; version to extend.
     235; VER : {{semantic-version}} ; version to extend.
    238236; COMP : {{(list-of (or number string symbol char))}} ; version components.
    239237
    240238=== version-extend
    241239
    242 <procedure>(version-extend VER COMP...) --> version</procedure>
     240<procedure>(version-extend VER COMP...) --> semantic-version</procedure>
    243241
    244242Returns copy of VER with added "depth", in the form of a new "tail", in
    245243"exploded" form.
    246244
    247 ; VER : {{version}} ; version to extend.
     245; VER : {{semantic-version}} ; version to extend.
    248246; COMP : {{(list-of (or number string symbol char))}} ; version components.
    249247
    250248=== version-inc!
    251249
    252 <procedure>(version-inc! VER [IDX AMT]) -> version</procedure>
     250<procedure>(version-inc! VER [IDX AMT]) -> semantic-version</procedure>
    253251
    254252Return VER with IDX element incremented by AMT.
    255253
    256 ; VER : {{version}} ; version to adjust.
     254; VER : {{semantic-version}} ; version to adjust.
    257255; IDX : {{integer}} ; which element to adjust.
    258256; AMT : {{number}} ; amount to adjust.
     
    262260=== version-dec!
    263261
    264 <procedure>(version-dec! VER [IDX AMT]) -> version</procedure>
     262<procedure>(version-dec! VER [IDX AMT]) -> semantic-version</procedure>
    265263
    266264Return VER with IDX element decremented by AMT.
    267265
    268 ; VER : {{version}} ; version to adjust.
     266; VER : {{semantic-version}} ; version to adjust.
    269267; IDX : {{integer}} ; which element to adjust.
    270268; AMT : {{number}} ; amount to adjust.
     
    274272=== version-inc
    275273
    276 <procedure>(version-inc VER [IDX AMT]) --> version</procedure>
     274<procedure>(version-inc VER [IDX AMT]) --> semantic-version</procedure>
    277275
    278276Return copy of VER with IDX element incremented by AMT.
    279277
    280 ; VER : {{version}} ; version to adjust.
     278; VER : {{semantic-version}} ; version to adjust.
    281279; IDX : {{integer}} ; which element to adjust.
    282280; AMT : {{number}} ; amount to adjust.
     
    286284=== version-dec
    287285
    288 <procedure>(version-dec VER [IDX AMT]) --> version</procedure>
     286<procedure>(version-dec VER [IDX AMT]) --> semantic-version</procedure>
    289287
    290288Return copy of VER with IDX element decremented by AMT.
    291289
    292 ; VER : {{version}} ; version to adjust.
     290; VER : {{semantic-version}} ; version to adjust.
    293291; IDX : {{integer}} ; which element to adjust.
    294292; AMT : {{number}} ; amount to adjust.
     
    302300        (srfi 1)
    303301        semantic-version)
     302
     303(version 'a 1)
     304;=> #<version "a.1">
    304305
    305306(define (egg-repo-versions repo egg)
     
    345346== Version history
    346347
    347 ; 0.0.2 : Use record, {{make-version}} & {{version}} follow convention, rename accessors.
     348; 0.0.2 : Use record, {{make-version}} & {{semantic-version}} follow convention, rename accessors.
    348349; 0.0.1 : Release.
    349350
Note: See TracChangeset for help on using the changeset viewer.