Commit graph

957 commits

Author SHA1 Message Date
Alex Lian
8b8b8d49a7 Windows packaging improvement
- Stepped away from NSIS, to just be a plain zip file
- Fixed a bug (though when trying NSIS) of dealing with slashes in windows paths
- Had package add .lib file instead of .dll.a file, since lib files tend to be more useful for Windows developers
2013-04-03 01:06:03 -04:00
Ludovic Rousseau
a8f91c05d2 Fix autoreconf warning
libnfc/buses/Makefile.am:16: warning: EXTRA_DIST multiply defined in
condition TRUE ...
libnfc/buses/Makefile.am:9: ... 'EXTRA_DIST' previously defined here
2013-04-01 18:26:23 +02:00
Philippe Teuwen
0625544cc3 Merge branch 'pn532_spi'
* pn532_spi:
  SPI: remove dead code
  SPI: add 1ms sleep in wakeup()
  SPI: update NEWS & Changelog
  Add connstring example for SPI on RPi
  Add PN532 SPI driver to CMake
  spi: fix doc typos
  spi: remove spi_posix.c, exotic platform implementations will have to be done in their respective contrib subdir
  Only include SPI related files when (at least) one SPI driver is enabled
  pn532_spi: missing malloc() checks, spi_close(), nfc_device_close() on some error handling branches
  pn532_spi: fix missing free(ndd.port)
  pn532_spi: fix double free() of spi port info
  Add pn532_spi author to AUTHORS
  Unify copyright notices
  pn532_spi: use new connstring_decode()
  Fix cppcheck warning "Non reentrant function 'readdir' called"
  Fix cppcheck warning "scanf without field width limits can crash with huge input data"
  Fix cppcheck warning "Obsolete function 'usleep' called"
  spi driver: remove compilation warnings
  make style
  Adding a SPI driver for pn532
2013-04-01 13:24:28 +02:00
Philippe Teuwen
0b1bf105be Revert 1c67c3f92a
Fixes issue 244
errorlibnfc.driver.acr122_usbToo small reply
2013-03-30 17:51:06 +01:00
Philippe Teuwen
1b45bd4ee1 SPI: remove dead code 2013-03-28 00:20:03 +01:00
Philippe Teuwen
f9bd5d79d2 SPI: add 1ms sleep in wakeup()
Without this delay I had troubles with a Raspberry-Pi:
With debug enabled I could go as high as 7.8MHz but without debug I had to go lower than 500kHz otherwise I got following error:
  errorlibnfc.driver.pn532_spiUnable to wait for SPI data. (RX)
  pn53x_check_communication: Timeout
It could work occassionally faster but very unreliable.
So the delay introduced by printf() was enough to "fix" the problem, therefore this little extra sleep() in wakeup().
2013-03-28 00:19:29 +01:00
Philippe Teuwen
7c2f8b4cb0 Add PN532 SPI driver to CMake 2013-03-27 23:25:43 +01:00
Philippe Teuwen
dcc527df7b Merge branch 'master' into pn532_spi
* master:
  CMake: enable same set of default drivers as for autotools
  pn532_uart: Unify copyright notices & update authors lists (somehow this file was forgotten)
2013-03-27 23:13:19 +01:00
Philippe Teuwen
7df8fdd0f6 spi: fix doc typos 2013-03-27 22:58:59 +01:00
Philippe Teuwen
12b756e97a spi: remove spi_posix.c, exotic platform implementations will have to be done in their respective contrib subdir 2013-03-27 17:40:22 +01:00
Philippe Teuwen
fc420d58af Only include SPI related files when (at least) one SPI driver is enabled 2013-03-27 16:58:01 +01:00
Philippe Teuwen
1ab282d43c pn532_spi: missing malloc() checks, spi_close(), nfc_device_close() on some error handling branches 2013-03-27 16:27:25 +01:00
Philippe Teuwen
f1a9a8ee38 pn532_uart: Unify copyright notices & update authors lists (somehow this file was forgotten) 2013-03-27 16:12:18 +01:00
Philippe Teuwen
794fcdc1ad pn532_spi: fix missing free(ndd.port) 2013-03-27 12:06:37 +01:00
Philippe Teuwen
87a3dd7067 pn532_spi: fix double free() of spi port info 2013-03-27 12:06:33 +01:00
Philippe Teuwen
1417bdc164 Merge branch 'master' into pn532_spi
* master: (28 commits)
  Update Changelog
  Add missing windows files in archive
  Move log implementation for Windows in dedicated directory
  Move UART implementation for Windows in dedicated directory
  CMake: only compile usbbus.c when (at least) one USB driver is enabled
  CMake: only include UART related files when (at least) one UART driver is enabled
  Only include UART related files when (at least) one UART driver is enabled
  Fix environment vars usage when compiling with CMake
  Remove unsed code section in log.c (was commented)
  pn53x_current_target_new() now returns null ptr upon malloc() error
  fix missing tests on malloc() return
  pn53x_data_new() now returns null ptr upon malloc() error
  uart drivers: missing pn53x_data_free() on some error handling branches
  uart drivers: missing nfc_device_free() on some error handling branches
  uart drivers: missing uart_close() on some error handling branches
  uart drivers: fix missing free(ndd.port)
  config parser: missing fclose()
  UART drivers: fix double free() of serial port info
  Fix cmake build failure under linux
  quick_start_example1.c: avoid using warnx() to remove err.h dependency
  ...

Conflicts:
	libnfc/buses/Makefile.am
2013-03-27 11:44:29 +01:00
Romuald Conty
2be00e7615 Move log implementation for Windows in dedicated directory 2013-03-18 23:53:01 +01:00
Romuald Conty
cb3452db7b Move UART implementation for Windows in dedicated directory 2013-03-18 23:46:14 +01:00
Romuald Conty
a422ae2211 CMake: only compile usbbus.c when (at least) one USB driver is enabled 2013-03-18 23:32:07 +01:00
Romuald Conty
b6b356b948 CMake: only include UART related files when (at least) one UART driver is enabled 2013-03-18 23:27:23 +01:00
Romuald Conty
699e9123ea Only include UART related files when (at least) one UART driver is enabled 2013-03-18 23:07:19 +01:00
Romuald Conty
e898e5f73b Remove unsed code section in log.c (was commented) 2013-03-18 15:25:07 +01:00
Philippe Teuwen
890f028b0c pn53x_current_target_new() now returns null ptr upon malloc() error 2013-03-18 01:00:41 +01:00
Philippe Teuwen
69c435f348 fix missing tests on malloc() return 2013-03-18 00:46:31 +01:00
Philippe Teuwen
06d5b54308 pn53x_data_new() now returns null ptr upon malloc() error 2013-03-18 00:21:08 +01:00
Philippe Teuwen
af57df532b uart drivers: missing pn53x_data_free() on some error handling branches 2013-03-18 00:21:03 +01:00
Philippe Teuwen
5f70bdc699 uart drivers: missing nfc_device_free() on some error handling branches 2013-03-17 23:52:54 +01:00
Philippe Teuwen
2e801a62d5 uart drivers: missing uart_close() on some error handling branches 2013-03-17 23:52:43 +01:00
Philippe Teuwen
c1372a009f uart drivers: fix missing free(ndd.port) 2013-03-17 22:54:15 +01:00
Philippe Teuwen
77838b894c config parser: missing fclose() 2013-03-17 22:19:49 +01:00
Philippe Teuwen
ca7477e935 UART drivers: fix double free() of serial port info
Fixes issue 242
2013-03-16 12:25:28 +01:00
Julien Schueller
8485996f13 Fix cmake build failure under linux
The LIBUSB_FOUND variable was used before the libusb detection was performed.
Fixes issue 240.
2013-03-12 20:54:50 +01:00
Philippe Teuwen
baa0f9ae36 Unify copyright notices 2013-03-10 16:18:22 +01:00
Philippe Teuwen
d683a98065 Merge branch 'master' into pn532_spi
* master:
  Unify copyright notices & update authors lists
  Update ChangeLog
2013-03-10 16:17:59 +01:00
Philippe Teuwen
bf164220ee Unify copyright notices & update authors lists 2013-03-10 16:15:23 +01:00
Philippe Teuwen
ec99e9033a pn532_spi: use new connstring_decode()
Fix cppcheck warning "Non reentrant function 'strtok' called"
2013-03-10 00:29:01 +01:00
Philippe Teuwen
759cd106e5 Merge branch 'master' into pn532_spi
* master:
  New connstring_decode() fix cppcheck warning "Non reentrant function 'strtok' called"
  Update Changelog
  Update NEWS & Changelog
  Forgot to commit new log internal header file
  Remove log-printf from CMakefile
  Add log_internal.h to Makefile
  Creating log_internal.h for log_*put_internal() prototypes
  log_win32: declare log_output_debug() static
  Merge log-printf.c into log.c, inline with prototypes in log.h & platform files log_*.c
2013-03-10 00:22:27 +01:00
Philippe Teuwen
cc03f84636 New connstring_decode() fix cppcheck warning "Non reentrant function 'strtok' called" 2013-03-10 00:20:52 +01:00
Philippe Teuwen
38966cb2fb Forgot to commit new log internal header file 2013-03-09 10:56:51 +01:00
Philippe Teuwen
ad8b338a7b Remove log-printf from CMakefile 2013-03-09 10:41:25 +01:00
Philippe Teuwen
a9e3365d98 Add log_internal.h to Makefile 2013-03-09 10:41:07 +01:00
Philippe Teuwen
6a110b3849 Creating log_internal.h for log_*put_internal() prototypes
Fixed warning "no previous prototype for function" in log_posix.c
2013-03-09 01:00:21 +01:00
Philippe Teuwen
7e26aa368d log_win32: declare log_output_debug() static 2013-03-09 00:47:21 +01:00
Philippe Teuwen
f19d233fad Merge log-printf.c into log.c, inline with prototypes in log.h & platform files log_*.c 2013-03-09 00:46:45 +01:00
Philippe Teuwen
262555d568 Fix cppcheck warning "Non reentrant function 'readdir' called" 2013-03-08 23:50:03 +01:00
Philippe Teuwen
8e2effdc53 Fix cppcheck warning "scanf without field width limits can crash with huge input data" 2013-03-08 23:43:41 +01:00
Philippe Teuwen
ff11c8ac87 Fix cppcheck warning "Obsolete function 'usleep' called" 2013-03-08 23:30:21 +01:00
Philippe Teuwen
05b9cde966 Merge branch 'master' into pn532_spi
* master: (43 commits)
  Windows: workaround as libusb is not automatically detected by CMake
  Add usbbus to Makefile.am EXTRA_DIST
  make style
  Add log_posix to Makefile.am
  Split logging internals so that platforms may choose additional or alternate spew mechanisms
  More explicitely ignoring return value as suggested by Ludovic
  Windows: Clean up all compiler warnings and link warnings
  API change
  make style
  pn53x-sam: fix print_nfc_target
  Convert by value passing of nfc_target to pointer for str_nfc_target and nfc_initiator_target_is_present
  Windows: Fix bug when compiling without libusb: skip usbbus.c
  Windows: Fix compilation due to new usbbus file
  Fix bug when compiling without libusb: skip usbbus.c
  Fix scan-build warning: cast increases required alignment from 1 to 4
  Fix cppcheck warning "Obsolete function 'usleep' called"
  Avoid warning about ignoring return value of 'read'
  Fix cppcheck warning "Non reentrant function 'readdir' called"
  conf.h: make it more standard
  uart_posix.c: remove redundant include
  ...
2013-03-08 23:00:44 +01:00
Philippe Teuwen
5704b668b7 Add usbbus to Makefile.am EXTRA_DIST 2013-03-08 00:35:36 +01:00
Philippe Teuwen
fef6517e27 make style 2013-03-08 00:35:04 +01:00
Philippe Teuwen
37cf7554d9 Add log_posix to Makefile.am 2013-03-08 00:34:14 +01:00
Alex Lian
b3c6ea86ad Split logging internals so that platforms may choose additional or alternate spew mechanisms
In the case of windows, allow for the OutputDebugString call in addition to logging to stderr.
Useful for the dll scenario and debugging in Visual Studio.
2013-03-07 10:36:33 +01:00
Philippe Teuwen
563054d2a2 More explicitely ignoring return value as suggested by Ludovic 2013-03-07 10:34:17 +01:00
Alex Lian
7b917f9a8b Windows: Clean up all compiler warnings and link warnings
- Fixed the suppression of the auto-fixup for linking against MS built libs
- Fixed all the formatting warnings by shifting to inttypes.h specifiers
- shifted to %lu for DWORD printf
2013-03-07 09:37:36 +01:00
Alex Lian
c72846e3c6 Convert by value passing of nfc_target to pointer for str_nfc_target and nfc_initiator_target_is_present
This becomes more consistent with all other pass by pointer of most structures.
Additionally, this should lessen stack memory usage, as building strings with str_nfc_target would push the target (283 bytes) plus then a copy of the info objects (up to 275) onto the stack as it dives into the sprintf functions.

Lastly, this makes my attempt at a .NET wrapper easier, as I can make passing by pointer work, but passing by value seems to bomb on the interop right now.
2013-03-07 09:16:33 +01:00
Philippe Teuwen
a262be5633 Windows: Fix bug when compiling without libusb: skip usbbus.c 2013-03-07 08:09:32 +01:00
Alex Lian
f8d8052866 Windows: Fix compilation due to new usbbus file 2013-03-07 08:05:31 +01:00
Philippe Teuwen
008158090c Fix bug when compiling without libusb: skip usbbus.c 2013-03-07 00:43:35 +01:00
Philippe Teuwen
1c67c3f92a Fix scan-build warning: cast increases required alignment from 1 to 4
acr122_usb.c:562:20: warning: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
  uint32_t *pu32 = (uint32_t *)u8;
                   ^~~~~~~~~~~~~~
2013-03-06 23:22:02 +01:00
Philippe Teuwen
fdd5bd3523 Avoid warning about ignoring return value of 'read' 2013-03-06 21:13:39 +01:00
Philippe Teuwen
7fb538737d Fix cppcheck warning "Non reentrant function 'readdir' called"
For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'.
2013-03-06 20:59:41 +01:00
Philippe Teuwen
90622f52b7 conf.h: make it more standard 2013-03-06 19:36:32 +01:00
Philippe Teuwen
b81519c6a9 uart_posix.c: remove redundant include 2013-03-06 19:34:57 +01:00
Philippe Teuwen
a0b859b2a1 Fix cppcheck warning "Non reentrant function 'readdir' called"
For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'.
2013-03-06 15:20:15 +01:00
Philippe Teuwen
4dafd70b64 Fix cppcheck warning "Statements following return will never be executed" 2013-03-06 12:42:39 +01:00
Philippe Teuwen
1d5f9956fb Fix cppcheck warning "buffer may not be null-terminated after call to strncpy()" 2013-03-06 12:38:59 +01:00
Philippe Teuwen
a3facbdc7d sprint_nfc_target() => snprint_nfc_target()
And all sub-functions in target_subr.c
2013-03-06 12:17:33 +01:00
Philippe Teuwen
658ec4585a Fix cppcheck warning "scanf without field width limits can crash with huge input data" 2013-03-06 11:42:35 +01:00
Philippe Teuwen
f0d5896140 Fix cppcheck style: "The scope of the variable can be reduced" 2013-03-06 11:02:47 +01:00
Philippe Teuwen
0aa1ff309e Fix cppcheck warning "Variable is assigned a value that is never used" 2013-03-06 10:56:12 +01:00
Philippe Teuwen
c37d1742c3 Fix cppcheck style: scope of variable can be reduced
Fix the following cppcheck warnings:
[libnfc/chips/pn53x.c:617]: (style) The scope of the variable 'res' can be reduced
2013-03-06 00:54:49 +01:00
Philippe Teuwen
d577fda412 Fix cppcheck warning "scanf without field width limits can crash with huge input data"
Fix following warnings:
[examples/pn53x-tamashell.c:162]: (warning) scanf without field width limits can crash with huge input data
[libnfc/drivers/acr122_pcsc.c:261]: (warning) scanf without field width limits can crash with huge input data
[libnfc/drivers/acr122s.c:441]: (warning) scanf without field width limits can crash with huge input data
[libnfc/drivers/arygon.c:210]: (warning) scanf without field width limits can crash with huge input data
[libnfc/drivers/arygon.c:522]: (warning) scanf without field width limits can crash with huge input data
[libnfc/drivers/pn532_uart.c:187]: (warning) scanf without field width limits can crash with huge input data
[utils/nfc-relay-picc.c:176]: (warning) scanf without field width limits can crash with huge input data
2013-03-06 00:52:08 +01:00
Philippe Teuwen
4769392157 Fix cppcheck style: scope of variable can be reduced
Fix the following cppcheck warnings:
[libnfc/drivers/pn532_uart.c:492]: (style) The scope of the variable 'res' can be reduced
[libnfc/chips/pn53x.c:320]: (style) The scope of the variable 'res' can be reduced
[libnfc/chips/pn53x.c:616]: (style) The scope of the variable 'res' can be reduced
[libnfc/nfc.c:356]: (style) The scope of the variable '_device_found' can be reduced
[utils/nfc-mfclassic.c:178]: (style) The scope of the variable 'key_index' can be reduced
2013-03-06 00:35:36 +01:00
Philippe Teuwen
03bc30f116 Fix "Possible null pointer dereference" error 2013-03-05 23:56:38 +01:00
Philippe Teuwen
73b5c9d0af nfc_init() return rather than exit on malloc error, examples fixed accordingly 2013-03-05 22:24:59 +01:00
Philippe Teuwen
ae6062e5ba nfc_context_new(): replace err() by return, problem still in nfc_init()!!
Not a good idea to call exit() from a library...
Problem is now moved to
void nfc_init() calling exit()
This requires a change in API to return error rather than exiting...
2013-03-05 20:03:19 +01:00
Philippe Teuwen
09ef2e3927 nfc_device_new(): replace err() by return
Not a good idea to call exit() from a library...
2013-03-05 19:58:32 +01:00
Philippe Teuwen
b0f216b3b2 spi driver: remove compilation warnings
spi_posix.c:141:1: warning: no previous prototype for 'bit_reversal' [-Wmissing-prototypes]
=> set bit_reversal() static

pn532_spi.c:258:48: warning: unused parameter 'timeout' [-Wunused-parameter]
=> remove timeout in pn532_spi_read_spi_status() params
2013-03-03 16:24:10 +01:00
Philippe Teuwen
cd98a4ac87 make style 2013-03-03 16:14:58 +01:00
Philippe Teuwen
2ac7963076 Merge branch 'master' into pn532_spi 2013-03-03 16:10:11 +01:00
Philippe Teuwen
b68a37b835 Replace usb_set_debug() in utils by new group in LIBNFC_LOG_LEVEL
To use it: (NFC_LOG_PRIORITY_DEBUG * 2 ^ NFC_LOG_GROUP_LIBUSB)
LIBUSB_LOG_LEVEL=12288
2013-03-02 23:43:37 +01:00
Philippe Teuwen
2334adc8bd Fix compilation warnings: values never read
Fixes:
pn53x.c:523:11: warning: Value stored to 'pbtRawData' is never read
          pbtRawData += szRawData - 8;
          ^             ~~~~~~~~~~~~~
pn53x.c:544:7: warning: Value stored to 'pbtRawData' is never read
      pbtRawData += 2;
      ^             ~
pn53x.c:532:7: warning: Value stored to 'pbtRawData' is never read
      pbtRawData += 8;
      ^             ~
pn53x.c:3085:3: warning: Value stored to 'buflen' is never read
  buflen -= res;
  ^         ~~~
pn53x.c:3080:3: warning: Value stored to 'buf' is never read
  buf += res;
  ^      ~~~
target-subr.c:466:7: warning: Value stored to 'dst' is never read
      dst += sprintf(dst, "* Unknown card, sorry\n");
      ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target-subr.c:480:3: warning: Value stored to 'dst' is never read
  dst += sprint_hex(dst, nfi.abtSysCode, 2);
  ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target-subr.c:490:3: warning: Value stored to 'dst' is never read
  dst += sprint_hex(dst, nji.btId, 4);
  ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target-subr.c:546:7: warning: Value stored to 'dst' is never read
      dst += sprintf(dst, "\n");
      ^      ~~~~~~~~~~~~~~~~~~
target-subr.c:571:5: warning: Value stored to 'dst' is never read
    dst += sprint_hex(dst, nii.abtAtr, nii.szAtrLen);
    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target-subr.c:580:3: warning: Value stored to 'dst' is never read
  dst += sprint_hex(dst, nsi.abtUID, 8);
  ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target-subr.c:593:3: warning: Value stored to 'dst' is never read
  dst += sprintf(dst, "           Fab Code: %02X\n", nci.btFabCode);
  ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target-subr.c:608:5: warning: Value stored to 'dst' is never read
    dst += sprint_hex(dst, ndi.abtGB, ndi.szGB);
    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2013-03-02 19:39:20 +01:00
Philippe Teuwen
70b0dffca7 acr122_usb: fix compiler warnings & check return value
acr122_usb.c:570:3: warning: Null pointer passed as an argument to a 'nonnull' parameter
  memcpy(DRIVER_DATA(pnd)->apdu_frame.apdu_payload, data, data_len);
  ^                                                 ~~~~
acr122_usb.c:738:3: warning: Value stored to 'offset' is never read
  offset += len;
  ^         ~~~
acr122_usb.c:753:3: warning: Value stored to 'res' is never read
  res = acr122_usb_bulk_write(DRIVER_DATA(pnd), (unsigned char *) & (DRIVER_DATA(pnd)->tama_frame), res, 1000);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2013-03-02 19:25:36 +01:00
Philippe Teuwen
f07d784b8b make style 2013-03-02 13:17:57 +01:00
Ludovic Rousseau
999631588d closedir() only if opendir() succeeds
Fix compiler warning:
conf.c:186:3: warning: Null pointer passed as an argument to a 'nonnull' parameter
  closedir(d);
  ^        ~
2013-03-02 13:11:30 +01:00
Ludovic Rousseau
aee56b9255 Initialize variables
Fix compiler warnings and potential bug

pn53x.c:1526:19: warning: The right operand of '<' is a garbage value
    for (i = 0; i < sz; i++) {
                  ^ ~~
pn53x.c:1621:19: warning: The right operand of '<' is a garbage value
    for (i = 0; i < sz; i++) {
                  ^ ~~
2013-03-02 13:09:23 +01:00
Philippe Teuwen
ae571941c5 usbbus: make usb_initialized static 2013-03-02 12:43:15 +01:00
Philippe Teuwen
1f0b0e5b81 Fix zealous double free 2013-03-02 12:26:24 +01:00
Ludovic Rousseau
e7290de83b Fix compiler warning
nfc.c:121: warning: function declaration isn't a prototype
nfc.c: In function 'nfc_drivers_init':
nfc.c:121: warning: old-style function definition
2013-03-02 11:30:24 +01:00
Romuald Conty
3aadb45988 Ease diff between both libusb based drivers: acr122_usb and pn53x_usb 2013-03-02 10:59:37 +01:00
Philippe Teuwen
b2b1d2a2a2 make style 2013-03-02 02:52:07 +01:00
Philippe Teuwen
a6c405a5d5 malloc/free: some more cleaning & checking malloc errors 2013-03-02 02:51:33 +01:00
Philippe Teuwen
0708279215 malloc/free: some cleaning & checking malloc errors 2013-03-02 02:25:13 +01:00
Philippe Teuwen
d7e7abb061 Fix mem leak in config file parser (opendir)
This fixes the following leaks:

==30517== 32,808 bytes in 1 blocks are definitely lost in loss record 11 of 12
==30517==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==30517==    by 0x50F4B2A: __alloc_dir (opendir.c:186)
==30517==    by 0x4E34998: conf_devices_load.constprop.1 (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==30517==    by 0x4E36350: nfc_context_new (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==30517==    by 0x4E34D98: nfc_init (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
2013-03-02 01:21:13 +01:00
Philippe Teuwen
3d9ebb5044 Fix mem leak in config file parser
This fixes the following leaks:

==18690== 256 bytes in 1 blocks are definitely lost in loss record 75 of 100
==18690==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==18690==    by 0x511613F: regcomp (regcomp.c:487)
==18690==    by 0x4E34313: conf_parse_file (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==    by 0x4E349F5: conf_devices_load.constprop.1 (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==    by 0x4E362C0: nfc_context_new (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==    by 0x4E34D08: nfc_init (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==
==18690== 32,068 (224 direct, 31,844 indirect) bytes in 1 blocks are definitely lost in loss record 98 of 100
==18690==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==18690==    by 0x4C28D6F: realloc (vg_replace_malloc.c:632)
==18690==    by 0x5115DF3: re_compile_internal (regcomp.c:760)
==18690==    by 0x51161AB: regcomp (regcomp.c:506)
==18690==    by 0x4E34313: conf_parse_file (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==    by 0x4E349F5: conf_devices_load.constprop.1 (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==    by 0x4E362C0: nfc_context_new (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==18690==    by 0x4E34D08: nfc_init (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
2013-03-02 01:09:47 +01:00
Philippe Teuwen
9dcf7378b6 Fix mem leak with libusb by introducing buses/usbbus.c
Now call only once usb_init(); usb_find_busses(); usb_find_devices()
instead of multiple calls in several scan() then open()

This fixes the following leaks:

==1159== 8 bytes in 1 blocks are definitely lost in loss record 9 of 102
==1159==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==1159==    by 0x53D9931: usb_parse_configuration (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==1159==    by 0x53DB8B1: usb_os_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==1159==    by 0x53D8FDC: usb_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==1159==    by 0x4E41D79: pn53x_usb_scan (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==1159==
==1159== 8 bytes in 1 blocks are definitely lost in loss record 10 of 102
==1159==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==1159==    by 0x53D9931: usb_parse_configuration (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==1159==    by 0x53DB8B1: usb_os_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==1159==    by 0x53D8FDC: usb_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==1159==    by 0x4E42CC7: pn53x_usb_open (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
==1159==    by 0x4E351E6: nfc_open (in /usr/lib/x86_64-linux-gnu/libnfc.so.4.0.0)
2013-03-02 01:08:07 +01:00
Eugeny Boger
d9fd9155ea Adding a SPI driver for pn532
The driver seems to work well.
I tested it on Linux with i.mx233-based board using hardware SPI.
I tried to modify the build files as well, but it's probably a little messy.
I'm not sure whether it will work on other *nix OSes,
so it's probably better to limit the driver to Linux only using build system.
2013-02-28 23:24:42 +01:00
Philippe Teuwen
7e3549819e Split --disable-conf into --disable-conffiles & --disable-envvars 2013-02-22 21:53:16 +01:00
Ahti Legonkov
fd6d4db5b7 Make it possible to disable conf.
Now the configure script has --disable-conf command-line argument
that can be used to turn off environment variables and use of
configuration files.
2013-02-22 21:09:46 +01:00
Philippe Teuwen
72b10c5d9b Fix warnings: ignoring return value of 'pipe' & discarding const qualifier 2013-02-21 23:20:28 +01:00
Philippe Teuwen
24e1edd858 make style 2013-02-21 22:39:39 +01:00
Philippe Teuwen
5ced93fcbf Makefile.am: move header files from noinst_HEADERS to _SOURCES
Ensures proper recompilation when a header file is edited.
cf https://www.gnu.org/software/automake/manual/html_node/Headers.html
2013-02-21 22:37:20 +01:00
Philippe Teuwen
9935095a36 Fix stack smash bug in LOG_HEX() macro
Fixes issue 232
2013-02-21 22:31:19 +01:00
Romuald Conty
7e26869b68 Fixes nfc_drivers memory leak 2013-02-21 19:58:40 +01:00
Romuald Conty
1e16795341 'make style' and align some #preprocessor directives 2013-02-19 00:43:20 +01:00
Philippe Teuwen
09ce0e822c nfc_free(): fix related doc 2013-02-16 22:18:00 +01:00
Romuald Conty
f8601886fd Adds nfc_free() function to freed allocated buffers
Fixes issue 228 (Thanks to Alex Lian)
2013-02-16 14:20:37 +01:00
Romuald Conty
360365ca84 Preserves error code while setting parameters
It now returns a more precise error code while using pn53x_set_property_bool() with NP_AUTO_ISO14443_4 flag.
2013-02-15 09:38:26 +01:00
Alex Lian
4487fd768e Windows: Shift files from libnfc/windows to libnfc/contrib/win32
- Fixes the fact files were missed in package
2013-02-14 15:33:47 +01:00
Philippe Teuwen
73992041b4 Merge remote-tracking branch 'ahti/issue-137' into master
* ahti/issue-137:
  Add nfc_register_driver.

Fixes issue 225
Helps issue 137
2013-02-06 15:07:18 +01:00
Romuald Conty
d5b6a7c4d1 Resolves conflict between Alex Lian and master branch 2013-02-04 10:14:34 +01:00
Alex Lian
54e0bdb62f Windows: Build updates
- Generate rc files from version.rc.in + CMake variable information in CMakeLists files
- Add step to generate .lib file for windows developers
- Re-structure tool flag usage, apparently ADD_DEFINTIONS adds them to _ALL_ tools. This is bad for rc files with the windres tool.

Needs other platform testing, as the flags have changed to fix Windows rc file generation.
2013-02-01 10:19:02 -05:00
lego
225094e2c8 Add nfc_register_driver. Issue 137.
The nfc_register_driver allows users of the library to write their
own device drivers without needing to resort to hacking libnfc itself.
2013-02-01 14:40:40 +02:00
Romuald Conty
8127a2ca63 Merge branch 'master' of https://code.google.com/p/libnfc 2013-02-01 11:46:26 +01:00
Romuald Conty
b5f8ce91c7 Uses configurable path for libnfc's configuration files 2013-02-01 11:11:39 +01:00
Romuald Conty
cf9e02879a Enables logging by default when using CMake 2013-02-01 10:32:44 +01:00
Philippe Teuwen
06bfed11b9 Various typos 2013-01-31 21:58:29 +01:00
Romuald Conty
519dd8f8e2 make style 2013-01-31 16:12:14 +01:00
Romuald Conty
acdde1088c Renames contrib/win32/nfc_win32.c to contrib/win32/stdlib.c 2013-01-31 16:09:41 +01:00
Alex Lian
ef33827f04 Fix setenv/unsetenv link errors by implementing a local version using Windows SetEnvironmentVariable.
Untested, and does not comply with the error returns per setenv.
2013-01-31 15:52:39 +01:00
Alex Lian
9f682cc52b Fix enabling of LIBNFC_DEBUG_OUTPUT
- inclusion of log-printf.c didn't align with needed preprocessor definitions
- Added extra #error as well as preprocessor protection
- fixed CMakeList to specify -DLOG as appropriate per the header log.h usage
2013-01-31 15:52:39 +01:00
Alex Lian
eb90c5a8db Add CMake options for Win32 to require PCRE 2013-01-31 15:52:39 +01:00
Philippe Teuwen
8bc7a1c291 call idle() from driver-dependent close() rather than from nfc_close() as some driver still need to do an ack() before 2013-01-31 01:18:23 +01:00
Philippe Teuwen
683505f39b pn53x_idle: call driver-dependent PowerDown & do InRelease first, skip redundant InDeselect 2013-01-31 01:16:37 +01:00
Philippe Teuwen
1682a86166 Add driver-dependent PowerDown 2013-01-31 01:15:03 +01:00
Philippe Teuwen
db8033622a acr122_pcsc: fix log category 2013-01-31 01:08:23 +01:00
Philippe Teuwen
5446242094 acr122_usb: remove pn53x_idle support. Fixes issue #217 2013-01-30 01:27:18 +01:00
Romuald Conty
98948172b4 Fixes pn53x_usb timeout while bulk write.
Thanks to Tredger for reporting.

Fixes issue 223.
2013-01-30 00:57:06 +01:00
Romuald Conty
cd2b03a08a Add timeout parameter to nfc_emulate_target() function.
Fixes issue 219.

Thanks to raidolinja.
2013-01-30 00:10:24 +01:00
Romuald Conty
4b97700352 Removes exit() calls
Fixes issue 220

exit() was used to run abort-driven development while API changed, I forgot to remove them, sorry for that :-)
2013-01-28 13:57:40 +01:00
Ludovic Rousseau
2faa532826 Fix a typo detected by lintian(1)
unkown -> unknown
2013-01-25 14:41:33 +01:00
Philippe Teuwen
5876e33e49 Fix returned value ((res=f()<0)) => ((res=f())<0); this solves a bug in nfc-relay-picc 2013-01-22 00:56:34 +01:00
Philippe Teuwen
edacadbce6 make style 2013-01-20 15:48:32 +01:00
Philippe Teuwen
532b30a2cd Merge branch 'test_user_defined_device_optional'
* test_user_defined_device_optional:
  Fix double malloc
  Allow device.optional=true to tolerate missing device
2013-01-20 15:36:29 +01:00
Philippe Teuwen
bcd53a7cdc Fix double malloc 2013-01-20 15:24:03 +01:00
Philippe Teuwen
4576bad369 Fix ISO14443B' ATS broken by updated API 2013-01-19 00:14:19 +01:00
Philippe Teuwen
04a7d2a3ba Allow device.optional=true to tolerate missing device 2013-01-18 22:54:44 +01:00
Romuald Conty
2d53208082 Fix unit tests
This commit bring tests to life!

New issue
Summary: test_dep_states test fails
When first device is idle, the second one states  "RF Transmission Error" instead of simply not found any available device.
Full cutter log here:

debug   libnfc.chip.pn53x       InJumpForDEP
debug   libnfc.chip.pn53x       Timeout values: 300
debug   libnfc.bus.uart TX: 00  00  ff  05  fb  d4  56  00  00  00  d6  00
debug   libnfc.bus.uart RX: 00  00  ff  00  ff  00
debug   libnfc.chip.pn53x       PN53x ACKed
debug   libnfc.bus.uart Timeout!
debug   libnfc.chip.pn53x       InJumpForDEP
debug   libnfc.chip.pn53x       Timeout values: 300
debug   libnfc.bus.uart TX: 00  00  ff  05  fb  d4  56  00  00  00  d6  00
debug   libnfc.bus.uart RX: 00  00  ff  00  ff  00
debug   libnfc.chip.pn53x       PN53x ACKed
debug   libnfc.bus.uart RX: 00  00  ff  03  fd
debug   libnfc.bus.uart RX: d5  57
debug   libnfc.bus.uart RX: 01
debug   libnfc.bus.uart RX: d3  00
debug   libnfc.chip.pn53x       Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
F
===============================================================================
Failure: test_dep_states
Problem with nfc_idle
<0 == res>
expected: <0>
  actual: <-20>

diff:
? -20

./test_device_modes_as_dep.c:171: initiator_thread(): cut_assert_equal_int(0, res, cut_test_context_set_current_result_user_message( cut_test_context_current_peek(), cut_test_context_take_printf(cut_test_context_current_peek(), "Problem with nfc_idle")))
===============================================================================
2013-01-18 18:28:45 +01:00
Romuald Conty
443f70dd65 Fix wrong condition to display a warning when user disables autoscan 2013-01-18 18:14:59 +01:00
Romuald Conty
f2be582cd5 Fix timeout documentation 2013-01-15 14:22:21 +01:00
Romuald Conty
945e1d140d Bump API version 2013-01-15 13:45:48 +01:00
Romuald Conty
82c41b4fc1 Fixes style: make style 2012-12-09 20:09:55 +01:00
Romuald Conty
8d9d6a5696 Add ttyAMA* to radix list from UART scanning
It allows a PN532 UART connected on raspberry pi to be detected when intrusive scan allowed (e.g. with nfc-scan-device -i)
2012-12-09 19:10:35 +01:00
Romuald Conty
0af58b1cdd Attempt to build libnfc under for Windows target.
This commit fixes some issues related to the new log system, but libnfc can not build on Windows in this stage since regex.h have been introduced for configuration file parsing and regex.h is not available in Windows.

New issue
Summary: Update Windows port
Due to the recent configuration file parsing introduction, libnfc can not be built under Windows: regex.h is missing.
Google says there is a port of PCRE for Windows which contains a compiliant regex.h.
Contribution are welcome as nobody from currently active team use Windows as OS.
2012-12-05 18:22:27 +01:00
Romuald Conty
8f015c4369 Suppress warnings: "ISO C99 requires rest arguments to be used" 2012-12-05 16:53:43 +01:00
Romuald Conty
08f428fbdf Fix CMake build. 2012-12-05 16:47:08 +01:00
Romuald Conty
53349c8c20 Prevent from segfault if user add too many devices in configuration file(s) 2012-12-05 16:41:44 +01:00
Romuald Conty
a3a3fa2848 Enhance messages display 2012-12-05 16:40:52 +01:00
Romuald Conty
dc949c257e Removes nfc_get_default_device() function.
The nfc_get_default_device() is not needed anymore since the first element from returned nfc_connstring list of nfc_list_devices() function.
Plus, nfc_open() can be use with NULL nfc_connstring which will select automatically the first available device (ie. the default one).
2012-12-05 00:51:13 +01:00
Romuald Conty
03e5611d14 New feature: search in a directory for devices configuration files. 2012-12-05 00:51:13 +01:00
Romuald Conty
84dc268781 New feature: user can define a device by conf file. 2012-12-05 00:51:13 +01:00
Philippe Teuwen
cf6d843c18 Fix pseudo-logging API when no logging is used 2012-12-04 19:14:37 +01:00
Philippe Teuwen
2651cdce2e Remove last SVN cruft 2012-11-27 18:56:54 +01:00
Romuald Conty
9b3947b8ed Improves log feature:
* Add --disable-log
  * Add a log level filter, configurable using conf file (ie. /etc/nfc/libnfc.conf) or environment var LIBNFC_LOG_LEVEL
2012-11-26 21:02:03 +01:00
Romuald Conty
4722b7dd97 SVN_REVISION is not relevant anymore, use GIT_REVISION (git describe) instead. 2012-11-24 20:11:12 +01:00
Romuald Conty
7963fdfc3b Import code to load configuration from file.
WARNING: This commit do not contains a fully cleaned code:
 - Only nfc-list have been tested
 - Some -commented- code is not used ATM
 - Some printf-as-debug remain in this commit
... but that a bit usable so... happy hacking ;-)
2012-11-24 13:10:52 +01:00
Romuald Conty
3ee77eb79e Fix *transceive*() calls from examples and utils (bug introduced in previous commit) 2012-11-24 13:00:23 +01:00
Romuald Conty
6650105174 Add some functions parameters documentation. 2012-11-23 16:58:10 +01:00
Romuald Conty
c239873634 Add missing NFC_EMFCAUTHFAIL error string. 2012-11-23 16:55:45 +01:00
Romuald Conty
dd451da4a5 Change *transceive*() API to be closer to *transceive_bytes.
Warning: only prototypes have been changed, implementation does not take care about buffer size.

New issue
Summary: Implement buffer overflow protection on all *transceive*() functions
*transceive*() functions do have an argument for rx buffer but some of them dont use it to protect user from buffer overflow.
2012-11-23 16:54:38 +01:00
Philippe Teuwen
fda8d60ce0 Adapt *transmit_bytes_timed API to be closer to *transmit_bytes 2012-11-12 16:54:03 +01:00
Romuald Conty
9f90a04a84 nfc_initiator_transceive_bytes() returns NFC_EMFCAUTHFAIL when AUTH command failed on a Mifare Classic 2012-11-01 01:27:06 +01:00
Romuald Conty
3629219a3b Caller expect nfc_initiator_deselect_target() to be 0 on success. (Fixes Issue 209)
Thanks to Frank Morgner.
2012-10-30 23:22:22 +01:00
Romuald Conty
d6c97cb974 Fixes CMake build (Fixes Issue 211).
Thanks to Alex Lian
2012-10-30 22:29:13 +01:00
Romuald Conty
397222c33f Removes --enable-serial-autoprobe option at compile and replace this feature by LIBNFC_INTRUSIVE_SCAN environment variable at run time. 2012-10-21 14:11:38 +00:00
Romuald Conty
b5aa91fd62 Use a more appropriated term regarding device detection: from probe to scan
- Rename nfc-probe to nfc-scan-device
 - Rename internal drivers function prototypes: _probe to _scan
 - Revamp _scan function prototype: it now returns device found count
2012-10-21 14:11:17 +00:00
Romuald Conty
6bc9d64fbb Remove unused prototypes in drivers/*.h 2012-10-21 14:10:43 +00:00
Romuald Conty
9afa3c6598 Use copyright format recommended by GNU project.
http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
2012-10-21 14:09:16 +00:00
Romuald Conty
6fd29775b2 acr122_usb: Fix compilation and length offset (bug introduced in r1461) 2012-10-04 15:28:30 +00:00
Romuald Conty
b27f8634d6 acr122_usb: Fixes CCID reply decoding. 2012-10-04 09:35:47 +00:00
Romuald Conty
26dabba7ac Add Touchatag support for experimental acr122_usb driver; Thanks to Gregoire Sage for its contribution. (Fixes Issue 201) 2012-10-03 16:21:11 +00:00
Romuald Conty
88a57a50b3 Fix error code when no reply is not ISO14443B2CT compliant 2012-10-03 16:21:02 +00:00
Romuald Conty
91ce008d62 Removes a FIXME: not relevant anymore 2012-10-03 16:20:50 +00:00
Romuald Conty
1f0ec1b43a Remove unused macro. (Fixes Issue 192) 2012-09-27 07:36:02 +00:00
Romuald Conty
921d64dadc Support FTDI dongle under MacOS 2012-09-27 07:35:55 +00:00
Romuald Conty
310d7eba07 New str_nfc_target() function in API.
This allow to convert a nfc_target struct into allocated string.
2012-09-17 13:47:54 +00:00
Romuald Conty
de827ab583 nfc_device_get_information_about() now allocates returned string.
Note: must be freed by free().
2012-09-17 13:47:30 +00:00
Romuald Conty
2aba0f962a documentation: add missing group description 2012-09-17 13:47:18 +00:00
Romuald Conty
3cd6015c81 minor header cleanup 2012-09-17 13:47:11 +00:00
Ludovic Rousseau
4288cd3c33 Add example path so that doxygen can find the file 2012-09-14 20:08:01 +00:00
Ludovic Rousseau
e40d857ac5 Touchatag PC/SC reader name has changed
CCID driver version >= 1.4.6 has changed the order of the readers.
Unfortunately the Touchatag reader uses the exact same PID (USB Product
ID) as many other ACS readers:
#0x072F:0x90CC:ACS ACR122U (ACR122U.txt)
#0x072F:0x90CC:ACS ACR 38U-CCID (ACR38U-CCID.txt)
#0x072F:0x90CC:ACS ACR100 (ACS_ACR100.txt)
#0x072F:0x90CC:ACS ACR38 plugin (ACS_ACR38_plugin.txt)
#0x072F:0x90CC:ACS AET65 (ACS_AET65.txt)

And the name for the device 0x072F:0x90CC is now "ACS AET65"

Fixes bug #202
2012-07-31 08:45:14 +00:00
Philippe Teuwen
c87eab4958 Add support for OpenPCD2 2012-07-01 11:22:45 +00:00
Romuald Conty
9f38ae715d pn53x: allow more delay for Card Presence command (tested on PN533 and PN532 in various contexts). 2012-06-12 16:51:47 +00:00
Romuald Conty
ab312299d6 pn53x_reset_settings() now resets CRC, parity, easyframing and crypto1.
These settings are quite specifics and should be reset in other functions that call pn53x_reset_settings() too: i.e. nfc_initiator_init_secure_element()
2012-06-12 16:46:20 +00:00
Philippe Teuwen
4b5b45f14a Add "usb" keyword support to connstring to specify all usb drivers at once 2012-06-06 01:10:05 +00:00
Romuald Conty
b4ef1a3a5d New nfc_initiator_init_secure_element() function to set SAM as wired card (only relevant with a PN532 SAM-equipped) 2012-06-04 00:16:28 +00:00
Romuald Conty
6f10d6e321 pn53x: return all errors when NP_ACTIVATE_FIELD failed 2012-06-04 00:16:17 +00:00
Romuald Conty
f47af31fb7 Indent correctly previous commit (make style) 2012-06-03 21:05:26 +00:00
Romuald Conty
c973800164 nfc_device_target_is_present() checks if passed target if the current target before sending Card Presence command 2012-06-03 21:02:47 +00:00
Romuald Conty
2b81baa14f Add documentation related to previous commit (NFC_ETGRELEASED on MFC AUTH failure) 2012-06-03 21:02:38 +00:00
Romuald Conty
b7a74931f6 Returns a NFC_ETGRELEASED error when MIFARE Classic's authentication failed (instead of NFC_ECHIP): a MIFARE Classic is halted on AUTH command failure. 2012-06-03 21:02:31 +00:00
Romuald Conty
c7820c6a77 Log an error when user-Rx buffer is too sort to gain data 2012-06-03 21:02:23 +00:00
Romuald Conty
62c4ffd0b7 Raises up default timeout from 250 to 350ms
PN53x sometimes needs more time to compute usual command (ie. with Diagnose/Card Presence when card become unreachable)
2012-05-30 23:02:56 +00:00
Romuald Conty
13e1e054c2 Minor code fix. 2012-05-30 23:02:48 +00:00
Romuald Conty
d7e7979580 Listing passive targets now quit earlier if szTargets count is reached and in that case, leave with the latest tag selected.
That's quite useful when you need to directly use 1 target because in contrast of nfc_initiator_select_passive_target, you don't need to prepare initiator data by hands
2012-05-30 23:02:41 +00:00
Romuald Conty
b5c634cb07 drivers/pn53x_usb: use default timeout command instead of infinite 2012-05-30 23:02:34 +00:00
Philippe Teuwen
568317929d astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header --align-pointer=name 2012-05-29 15:55:35 +00:00
Philippe Teuwen
01303fab0d astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header 2012-05-29 15:54:36 +00:00
Philippe Teuwen
562205cc14 astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper 2012-05-29 15:54:00 +00:00
Philippe Teuwen
67522bae65 astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux 2012-05-29 15:53:43 +00:00