Commit graph

39 commits

Author SHA1 Message Date
Romain Tartière
69bf99b33d Run make style to indent macros 2017-06-29 12:25:53 +02:00
Romain Tartière
94bf7059b4 Remove copyright comments.
The COPYRIGHT file is already here and is more complete, while the VCS
hold accurate information about contributors and conibution date.
2017-06-29 09:29:15 +02:00
Romain Tartière
73dc0529fa Run make style to fix style 2017-06-27 13:58:31 +02:00
Stefan Walkner
565ee18b8e Fix build with CMake
- Fix library finding ('nfc' instead of 'libnfc');
- Generate config.h from template on non-win32 platforms;
- While here, include protection for config.h in several files.
2017-04-24 09:35:08 +02:00
Romain Tartière
1ce3db3ca6 Improve naming consistency.
Ensure all MIFARE related names and structures start with "mifare_" or
"MIFARE_".
2015-05-12 13:52:18 +02:00
Romain Tartière
faac4ae5d8 Fix white spaces inconsistencies. 2015-05-12 13:19:00 +02:00
Romain Tartière
07695f4c18 Remove subversion artifacts.
We do not have $Id$ to expand anymore.
2015-05-12 12:22:39 +02:00
Romain Tartière
42b21ff42f Rename MifareTag to FreefareTag.
Because we are libfreefare and not libmifare, the generic tag type
should not be so specific.
2015-05-11 18:55:20 +02:00
Dominik Heidler
cc36619f13 mifare-classic-format option: read keys from dump 2013-05-03 09:58:22 +02:00
Philippe Teuwen
061b41ed2d Align with libnfc API change: test nfc_init() result 2013-03-30 18:07:34 +01:00
Romuald Conty
3dd6edcb3a updates library examples to use libnfc 1.7.0 API 2012-12-23 21:30:10 +00:00
Ludovic Rousseau
4a8dc7a4c6 Fix compiler warning
mifare-classic-format.c:62: warning: no previous prototype for ‘display_progress’
2012-05-18 16:21:26 +00:00
Ludovic Rousseau
1a9fcabf89 Declare internal function usage() as static 2012-05-18 16:18:45 +00:00
Philippe Teuwen
acf5180177 add non-default key option to mifare-desfire-* examples 2012-03-14 23:05:10 +00:00
Audrey Diacre
4f0227ddcb update to use libnfc's trunk 2012-01-25 09:58:16 +00:00
Romain Tartiere
21008cda5d Make these functions accept no argument (instead of any). 2012-01-15 11:09:25 +00:00
Romain Tartiere
7b9242e935 Reindent (2/2).
Align cases with switch statements.
Ça y est!  Le code est beau!
2010-09-03 18:04:12 +00:00
Romain Tartiere
af061a3c1a Reindent (1/2).
After trying to tweak gindent so that it does not mess-up my ASCII art, give
and read the help of Vim to setup 'cinoptions' according to my needs
(cino=t0(0).  This changeset reindent some bits that where not indented as they
should.  A future commit will reindent the switch/case according to my (bad)
taste now that I have setup cindent correctly on my system (cino=t0(0:0).
2010-09-03 18:01:02 +00:00
Romuald Conty
bb840dccaf minor cosmetic enhancements. 2010-09-03 12:51:45 +00:00
Romain Tartiere
5779d6f945 Merge the freefare-desfire branch into trunk. 2010-07-26 21:48:18 +00:00
Romuald Conty
4230d2b378 Add missing config.h include in mifare-classic-format example. Fix Issue 34. 2010-07-07 07:25:16 +00:00
Romain Tartiere
9e5820b89e Allow mifare-classic-format to be run non-interactively. 2010-07-03 09:14:32 +00:00
Romain Tartiere
6cbb9f4f9d Add a fast-format feature in the mifare-classic-format utility to only erase MAD. 2010-07-03 09:09:26 +00:00
Romain Tartiere
163df002f2 Rename MifareSectorNumber to MifareClassicSectorNumber. 2010-07-03 06:31:28 +00:00
Romain Tartiere
163ce56cc0 Refactoring Blocks vs. Sectors.
- mifare_classic_format_sector() now wants a sector instead of a block (the name was really disturbing);
  - New public API functions for Block <=> Sector conversions.
2010-07-01 23:19:45 +00:00
Romain Tartiere
4a1415ed01 s/blocks/sectors/ 2010-07-01 13:25:14 +00:00
Romuald Conty
0296e52d29 minor enhancement in mifare-classic-format progress display with 4k. 2010-06-29 08:26:50 +00:00
Romuald Conty
d76ee4c2bd enhance progress display with MIFARE Classic 1K. 2010-06-28 13:23:49 +00:00
Romain Tartiere
5027d69b7e Silent down gcc44 -Wextra warnings. 2010-06-26 13:48:25 +00:00
Romain Tartiere
4ae3bf555d Display format operation progress. 2010-06-26 11:57:25 +00:00
Romain Tartiere
73c50a544a Remove deprecated API mifare_ultralight_get_uid(), mifare_classic_get_uid(). 2010-03-30 16:24:37 +00:00
Romain Tartiere
0d4744001a Add support for friendly tag names. 2010-03-01 14:04:47 +00:00
Romain Tartiere
5f7f8ffe2a Add support for MIFARE Classic 4K.
- New mifare_classic_first_sector_block(), mifare_classic_last_sector_block() functions to ease detection of sectors boundaries;
  - New unit tests for mifare_classic_first_sector_block() and mifare_classic_last_sector_block();
  - Start to update the API for consistently using blocks and not mixing blocks and sectors with mifare_classic_*() functions;
  - Update the mifare-classic-format(1) example to handle MIFARE Classic 1k and 4k.

Many thanks to Johann Dantant from SpringCard for giving me MIFARE Classic 4k cards.
2010-02-23 02:12:18 +00:00
Romain Tartiere
74bc239a71 Abstract tag manipulation functions.
- Factorize Mifare*Tag as MifareTag;
  - Factorize mifare_*_get_tags() / mifare_*_free_tags() as freefare_get_tags() and freefare_free_tags();
  - Add a new freefare_get_tag_type() function to get a tag type;
  - Update regression test suite;
  - Update example.

While this is a major change that basically change all the API, programs using libfreefare should be easily modified by replacing any Mifare*Tag variable by a generic MifareTag one, adding a few lines of code to check the target's type using freefare_get_tag_type(), and changing any call to mifare_*_get_tags() / mifare_*_free_tags() by the generic freefare_get_tags() and freefare_free_tags() functions.
2010-02-19 14:50:18 +00:00
Romain Tartiere
d76da4697b Update files headers and Ids. 2010-02-19 10:43:06 +00:00
Romain Tartiere
10b8b92eb9 Fix a brunch of warnings. 2010-01-22 16:06:26 +00:00
Romain Tartiere
935ab47c54 Update the mifare-classic-format example. 2010-01-10 14:24:26 +00:00
Romain Tartiere
2b76328c78 Unbreak example and add autotool stuff to help building. 2010-01-08 13:40:39 +00:00
Romuald Conty
76a8c8e8b1 add an example draft mifare-classic-format, a tool which can be usefull to debug :) 2010-01-06 23:44:17 +00:00