From 9dbdee0cff04a514e8ef32ddfe3e1fc31f22bc82 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 7 Oct 2017 23:13:32 +0530 Subject: Prepare for release v1.7 --- .travis.yml | 2 +- CHANGELOG | 9 +++++++++ README.md | 64 +++++++++++++++++++++++++++++------------------------------ bcal.1 | 2 +- src/bcal.c | 66 ++++++++++++++++++++++++++++++------------------------------- 5 files changed, 76 insertions(+), 67 deletions(-) diff --git a/.travis.yml b/.travis.yml index c98cf38..52523e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ script: before_deploy: - sudo apt-get update -qy - sudo apt-get install -qy python3 python3-pip - - python3 -m pip install packagecore + - sudo python3 -m pip install packagecore - packagecore -o dist/ "${TRAVIS_TAG#v}" deploy: diff --git a/CHANGELOG b/CHANGELOG index 902827e..2484633 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,12 @@ +bcal 1.7 +2016-10-10 + +What's in? +- PackageCore integration +- Automated testing in Travis CI + +------------------------------------------------------------------------------- + bcal 1.6 2017-06-30 diff --git a/README.md b/README.md index d728389..d585a3c 100644 --- a/README.md +++ b/README.md @@ -88,44 +88,44 @@ To uninstall, run: ``` usage: bcal [-c N] [-f FORMAT] [-s bytes] [-d] [-h] - [expression] [N unit] + [expression] [N unit] Perform storage conversions and calculations. positional arguments: - expression evaluate storage arithmetic expression - +, -, *, / with decimal inputs supported - unit can be multiplied or divided by +ve integers - units can be added or subtracted from each other - Examples: - bcal "(5kb+2mb)/3" - bcal "5 tb / 12" - bcal "2.5mb*3" - N [unit] capacity in B/KiB/MiB/GiB/TiB/kB/MB/GB/TB - see https://wiki.ubuntu.com/UnitsPolicy - default unit is B (byte), case is ignored - N can be decimal or '0x' prefixed hex value + expression evaluate storage arithmetic expression + +, -, *, / with decimal inputs supported + unit can be multiplied or divided by +ve integers + units can be added or subtracted from each other + Examples: + bcal "(5kb+2mb)/3" + bcal "5 tb / 12" + bcal "2.5mb*3" + N [unit] capacity in B/KiB/MiB/GiB/TiB/kB/MB/GB/TB + see https://wiki.ubuntu.com/UnitsPolicy + default unit is B (byte), case is ignored + N can be decimal or '0x' prefixed hex value optional arguments: - -c N show +ve integer N in binary, decimal and hex - -f FORMAT convert CHS to LBA or LBA to CHS - formats are hyphen-separated - LBA format: - starts with 'l': - lLBA-MAX_HEAD-MAX_SECTOR - CHS format: - starts with 'c': - cC-H-S-MAX_HEAD-MAX_SECTOR - omitted values are considered 0 - FORMAT 'c-50--0x12-' denotes: - C = 0, H = 50, S = 0, MH = 0x12, MS = 0 - FORMAT 'l50-0x12' denotes: - LBA = 50, MH = 0x12, MS = 0 - default MAX_HEAD: 16, default MAX_SECTOR: 63 - -s bytes sector size [default 512] - -m show minimal output (e.g. decimal bytes) - -d enable debug information and logs - -h show this help and exit + -c N show +ve integer N in binary, decimal and hex + -f FORMAT convert CHS to LBA or LBA to CHS + formats are hyphen-separated + LBA format: + starts with 'l': + lLBA-MAX_HEAD-MAX_SECTOR + CHS format: + starts with 'c': + cC-H-S-MAX_HEAD-MAX_SECTOR + omitted values are considered 0 + FORMAT 'c-50--0x12-' denotes: + C = 0, H = 50, S = 0, MH = 0x12, MS = 0 + FORMAT 'l50-0x12' denotes: + LBA = 50, MH = 0x12, MS = 0 + default MAX_HEAD: 16, default MAX_SECTOR: 63 + -s bytes sector size [default 512] + -m show minimal output (e.g. decimal bytes) + -d enable debug information and logs + -h show this help and exit ``` #### Operational notes diff --git a/bcal.1 b/bcal.1 index b5f8fb1..924239a 100644 --- a/bcal.1 +++ b/bcal.1 @@ -1,4 +1,4 @@ -.TH "BCAL" "1" "Jun 2017" "Version 1.6" "User Commands" +.TH "BCAL" "1" "10 Oct 2017" "Version 1.7" "User Commands" .SH NAME bcal \- Perform storage conversions and calculations. .SH SYNOPSIS diff --git a/src/bcal.c b/src/bcal.c index 6cf282c..a122d82 100644 --- a/src/bcal.c +++ b/src/bcal.c @@ -55,7 +55,7 @@ typedef struct { ulong s; } t_chs; -static char *VERSION = "1.6"; +static char *VERSION = "1.7"; static char *units[] = {"b", "kib", "mib", "gib", "tib", "kb", "mb", "gb", "tb"}; static char uint_buf[UINT_BUF_LEN]; @@ -769,41 +769,41 @@ static bool lba2chs(char *lba, t_chs *p_chs) static void usage(void) { printf("usage: bcal [-c N] [-f FORMAT] [-s bytes] [-d] [-h]\n\ - [expression] [N unit] \n\n\ + [expression] [N unit] \n\n\ Perform storage conversions and calculations.\n\n\ positional arguments:\n\ - expression evaluate storage arithmetic expression\n\ - +, -, *, / with decimal inputs supported\n\ - unit can be multiplied or divided by +ve integers\n\ - units can be added or subtracted from each other\n\ - Examples:\n\ - bcal \"(5kb+2mb)/3\"\n\ - bcal \"5 tb / 12\"\n\ - bcal \"2.5mb*3\"\n\ - N [unit] capacity in B/KiB/MiB/GiB/TiB/kB/MB/GB/TB\n\ - see https://wiki.ubuntu.com/UnitsPolicy\n\ - default unit is B (byte), case is ignored\n\ - N can be decimal or '0x' prefixed hex value\n\n\ + expression evaluate storage arithmetic expression\n\ + +, -, *, / with decimal inputs supported\n\ + unit can be multiplied or divided by +ve integers\n\ + units can be added or subtracted from each other\n\ + Examples:\n\ + bcal \"(5kb+2mb)/3\"\n\ + bcal \"5 tb / 12\"\n\ + bcal \"2.5mb*3\"\n\ + N [unit] capacity in B/KiB/MiB/GiB/TiB/kB/MB/GB/TB\n\ + see https://wiki.ubuntu.com/UnitsPolicy\n\ + default unit is B (byte), case is ignored\n\ + N can be decimal or '0x' prefixed hex value\n\n\ optional arguments:\n\ - -c N show +ve integer N in binary, decimal and hex\n\ - -f FORMAT convert CHS to LBA or LBA to CHS\n\ - formats are hyphen-separated\n\ - LBA format:\n\ - starts with 'l':\n\ - lLBA-MAX_HEAD-MAX_SECTOR\n\ - CHS format:\n\ - starts with 'c':\n\ - cC-H-S-MAX_HEAD-MAX_SECTOR\n\ - omitted values are considered 0\n\ - FORMAT 'c-50--0x12-' denotes:\n\ - C = 0, H = 50, S = 0, MH = 0x12, MS = 0\n\ - FORMAT 'l50-0x12' denotes:\n\ - LBA = 50, MH = 0x12, MS = 0\n\ - default MAX_HEAD: 16, default MAX_SECTOR: 63\n\ - -s bytes sector size [default 512]\n\ - -m show minimal output (e.g. decimal bytes)\n\ - -d enable debug information and logs\n\ - -h show this help and exit\n\n\ + -c N show +ve integer N in binary, decimal and hex\n\ + -f FORMAT convert CHS to LBA or LBA to CHS\n\ + formats are hyphen-separated\n\ + LBA format:\n\ + starts with 'l':\n\ + lLBA-MAX_HEAD-MAX_SECTOR\n\ + CHS format:\n\ + starts with 'c':\n\ + cC-H-S-MAX_HEAD-MAX_SECTOR\n\ + omitted values are considered 0\n\ + FORMAT 'c-50--0x12-' denotes:\n\ + C = 0, H = 50, S = 0, MH = 0x12, MS = 0\n\ + FORMAT 'l50-0x12' denotes:\n\ + LBA = 50, MH = 0x12, MS = 0\n\ + default MAX_HEAD: 16, default MAX_SECTOR: 63\n\ + -s bytes sector size [default 512]\n\ + -m show minimal output (e.g. decimal bytes)\n\ + -d enable debug information and logs\n\ + -h show this help and exit\n\n\ Version %s\n\ Copyright © 2016-2017 Arun Prakash Jana \n\ License: GPLv3\n\ -- cgit v1.2.3