Force all indent to spaces
This commit is contained in:
parent
c45896f612
commit
567efee6a3
4 changed files with 148 additions and 146 deletions
|
@ -103,7 +103,7 @@ replace_block(r'```',
|
|||
|
||||
# src/CMakeLists.txt
|
||||
repl = src_files + device_files
|
||||
repl = '\n\t' + ('\n\t'.join(repl)) + '\n'
|
||||
repl = '\n ' + ('\n '.join(repl)) + '\n'
|
||||
replace_block(r'add_executable\(rtl_433$',
|
||||
r'^\)', repl, 'src/CMakeLists.txt')
|
||||
|
||||
|
|
|
@ -2,163 +2,163 @@
|
|||
# Build libraries and executables
|
||||
########################################################################
|
||||
add_executable(rtl_433
|
||||
abuf.c
|
||||
am_analyze.c
|
||||
baseband.c
|
||||
bitbuffer.c
|
||||
compat_paths.c
|
||||
compat_time.c
|
||||
confparse.c
|
||||
data.c
|
||||
decoder_util.c
|
||||
fileformat.c
|
||||
list.c
|
||||
mongoose.c
|
||||
optparse.c
|
||||
output_mqtt.c
|
||||
pulse_demod.c
|
||||
pulse_detect.c
|
||||
r_api.c
|
||||
r_util.c
|
||||
rtl_433.c
|
||||
samp_grab.c
|
||||
sdr.c
|
||||
term_ctl.c
|
||||
util.c
|
||||
devices/acurite.c
|
||||
devices/akhan_100F14.c
|
||||
devices/alecto.c
|
||||
devices/ambient_weather.c
|
||||
devices/ambientweather_tx8300.c
|
||||
devices/ambientweather_wh31e.c
|
||||
devices/blyss.c
|
||||
devices/brennenstuhl_rcs_2044.c
|
||||
devices/bresser_3ch.c
|
||||
devices/bresser_5in1.c
|
||||
devices/bt_rain.c
|
||||
devices/calibeur.c
|
||||
devices/cardin.c
|
||||
devices/chuango.c
|
||||
devices/companion_wtr001.c
|
||||
devices/current_cost.c
|
||||
devices/danfoss.c
|
||||
devices/digitech_xc0324.c
|
||||
devices/directv.c
|
||||
devices/dish_remote_6_3.c
|
||||
devices/dsc.c
|
||||
devices/ecowitt.c
|
||||
devices/efergy_e2_classic.c
|
||||
devices/efergy_optical.c
|
||||
devices/elro_db286a.c
|
||||
devices/elv.c
|
||||
devices/emontx.c
|
||||
devices/esa.c
|
||||
devices/esperanza_ews.c
|
||||
devices/eurochron.c
|
||||
devices/fineoffset.c
|
||||
devices/fineoffset_wh1050.c
|
||||
devices/fineoffset_wh1080.c
|
||||
devices/flex.c
|
||||
devices/fordremote.c
|
||||
devices/fs20.c
|
||||
devices/ft004b.c
|
||||
devices/ge_coloreffects.c
|
||||
devices/generic_motion.c
|
||||
devices/generic_remote.c
|
||||
devices/generic_temperature_sensor.c
|
||||
devices/gt_wt_02.c
|
||||
devices/hcs200.c
|
||||
devices/hideki.c
|
||||
devices/holman_ws5029.c
|
||||
devices/hondaremote.c
|
||||
devices/honeywell.c
|
||||
devices/honeywell_wdb.c
|
||||
devices/ht680.c
|
||||
devices/ibis_beacon.c
|
||||
devices/ikea_sparsnas.c
|
||||
devices/infactory.c
|
||||
devices/inovalley-kw9015b.c
|
||||
devices/interlogix.c
|
||||
devices/intertechno.c
|
||||
devices/kedsum.c
|
||||
devices/kerui.c
|
||||
devices/lacrosse.c
|
||||
devices/lacrosse_TX141TH_Bv2.c
|
||||
devices/lacrosse_tx35.c
|
||||
devices/lacrosse_ws7000.c
|
||||
devices/lacrossews.c
|
||||
devices/lightwave_rf.c
|
||||
devices/m_bus.c
|
||||
devices/maverick_et73.c
|
||||
devices/maverick_et73x.c
|
||||
devices/mebus.c
|
||||
devices/new_template.c
|
||||
devices/newkaku.c
|
||||
devices/nexa.c
|
||||
devices/nexus.c
|
||||
devices/oil_standard.c
|
||||
devices/oil_watchman.c
|
||||
devices/opus_xt300.c
|
||||
devices/oregon_scientific.c
|
||||
devices/oregon_scientific_sl109h.c
|
||||
devices/oregon_scientific_v1.c
|
||||
devices/philips.c
|
||||
devices/prologue.c
|
||||
devices/proove.c
|
||||
devices/quhwa.c
|
||||
devices/radiohead_ask.c
|
||||
devices/rftech.c
|
||||
devices/rubicson.c
|
||||
devices/rubicson_48659.c
|
||||
devices/s3318p.c
|
||||
devices/schraeder.c
|
||||
devices/silvercrest.c
|
||||
devices/simplisafe.c
|
||||
devices/smoke_gs558.c
|
||||
devices/solight_te44.c
|
||||
devices/springfield.c
|
||||
devices/steelmate.c
|
||||
devices/tfa_30_3196.c
|
||||
devices/tfa_pool_thermometer.c
|
||||
devices/tfa_twin_plus_30.3049.c
|
||||
devices/thermopro_tp11.c
|
||||
devices/thermopro_tp12.c
|
||||
devices/tpms_citroen.c
|
||||
devices/tpms_ford.c
|
||||
devices/tpms_jansite.c
|
||||
devices/tpms_pmv107j.c
|
||||
devices/tpms_renault.c
|
||||
devices/tpms_toyota.c
|
||||
devices/ts_ft002.c
|
||||
devices/ttx201.c
|
||||
devices/vaillant_vrt340f.c
|
||||
devices/waveman.c
|
||||
devices/wg_pb12v1.c
|
||||
devices/wssensor.c
|
||||
devices/wt0124.c
|
||||
devices/wt450.c
|
||||
devices/x10_rf.c
|
||||
devices/x10_sec.c
|
||||
abuf.c
|
||||
am_analyze.c
|
||||
baseband.c
|
||||
bitbuffer.c
|
||||
compat_paths.c
|
||||
compat_time.c
|
||||
confparse.c
|
||||
data.c
|
||||
decoder_util.c
|
||||
fileformat.c
|
||||
list.c
|
||||
mongoose.c
|
||||
optparse.c
|
||||
output_mqtt.c
|
||||
pulse_demod.c
|
||||
pulse_detect.c
|
||||
r_api.c
|
||||
r_util.c
|
||||
rtl_433.c
|
||||
samp_grab.c
|
||||
sdr.c
|
||||
term_ctl.c
|
||||
util.c
|
||||
devices/acurite.c
|
||||
devices/akhan_100F14.c
|
||||
devices/alecto.c
|
||||
devices/ambient_weather.c
|
||||
devices/ambientweather_tx8300.c
|
||||
devices/ambientweather_wh31e.c
|
||||
devices/blyss.c
|
||||
devices/brennenstuhl_rcs_2044.c
|
||||
devices/bresser_3ch.c
|
||||
devices/bresser_5in1.c
|
||||
devices/bt_rain.c
|
||||
devices/calibeur.c
|
||||
devices/cardin.c
|
||||
devices/chuango.c
|
||||
devices/companion_wtr001.c
|
||||
devices/current_cost.c
|
||||
devices/danfoss.c
|
||||
devices/digitech_xc0324.c
|
||||
devices/directv.c
|
||||
devices/dish_remote_6_3.c
|
||||
devices/dsc.c
|
||||
devices/ecowitt.c
|
||||
devices/efergy_e2_classic.c
|
||||
devices/efergy_optical.c
|
||||
devices/elro_db286a.c
|
||||
devices/elv.c
|
||||
devices/emontx.c
|
||||
devices/esa.c
|
||||
devices/esperanza_ews.c
|
||||
devices/eurochron.c
|
||||
devices/fineoffset.c
|
||||
devices/fineoffset_wh1050.c
|
||||
devices/fineoffset_wh1080.c
|
||||
devices/flex.c
|
||||
devices/fordremote.c
|
||||
devices/fs20.c
|
||||
devices/ft004b.c
|
||||
devices/ge_coloreffects.c
|
||||
devices/generic_motion.c
|
||||
devices/generic_remote.c
|
||||
devices/generic_temperature_sensor.c
|
||||
devices/gt_wt_02.c
|
||||
devices/hcs200.c
|
||||
devices/hideki.c
|
||||
devices/holman_ws5029.c
|
||||
devices/hondaremote.c
|
||||
devices/honeywell.c
|
||||
devices/honeywell_wdb.c
|
||||
devices/ht680.c
|
||||
devices/ibis_beacon.c
|
||||
devices/ikea_sparsnas.c
|
||||
devices/infactory.c
|
||||
devices/inovalley-kw9015b.c
|
||||
devices/interlogix.c
|
||||
devices/intertechno.c
|
||||
devices/kedsum.c
|
||||
devices/kerui.c
|
||||
devices/lacrosse.c
|
||||
devices/lacrosse_TX141TH_Bv2.c
|
||||
devices/lacrosse_tx35.c
|
||||
devices/lacrosse_ws7000.c
|
||||
devices/lacrossews.c
|
||||
devices/lightwave_rf.c
|
||||
devices/m_bus.c
|
||||
devices/maverick_et73.c
|
||||
devices/maverick_et73x.c
|
||||
devices/mebus.c
|
||||
devices/new_template.c
|
||||
devices/newkaku.c
|
||||
devices/nexa.c
|
||||
devices/nexus.c
|
||||
devices/oil_standard.c
|
||||
devices/oil_watchman.c
|
||||
devices/opus_xt300.c
|
||||
devices/oregon_scientific.c
|
||||
devices/oregon_scientific_sl109h.c
|
||||
devices/oregon_scientific_v1.c
|
||||
devices/philips.c
|
||||
devices/prologue.c
|
||||
devices/proove.c
|
||||
devices/quhwa.c
|
||||
devices/radiohead_ask.c
|
||||
devices/rftech.c
|
||||
devices/rubicson.c
|
||||
devices/rubicson_48659.c
|
||||
devices/s3318p.c
|
||||
devices/schraeder.c
|
||||
devices/silvercrest.c
|
||||
devices/simplisafe.c
|
||||
devices/smoke_gs558.c
|
||||
devices/solight_te44.c
|
||||
devices/springfield.c
|
||||
devices/steelmate.c
|
||||
devices/tfa_30_3196.c
|
||||
devices/tfa_pool_thermometer.c
|
||||
devices/tfa_twin_plus_30.3049.c
|
||||
devices/thermopro_tp11.c
|
||||
devices/thermopro_tp12.c
|
||||
devices/tpms_citroen.c
|
||||
devices/tpms_ford.c
|
||||
devices/tpms_jansite.c
|
||||
devices/tpms_pmv107j.c
|
||||
devices/tpms_renault.c
|
||||
devices/tpms_toyota.c
|
||||
devices/ts_ft002.c
|
||||
devices/ttx201.c
|
||||
devices/vaillant_vrt340f.c
|
||||
devices/waveman.c
|
||||
devices/wg_pb12v1.c
|
||||
devices/wssensor.c
|
||||
devices/wt0124.c
|
||||
devices/wt450.c
|
||||
devices/x10_rf.c
|
||||
devices/x10_sec.c
|
||||
)
|
||||
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_SOURCE_FILES_PROPERTIES(mongoose.c PROPERTIES COMPILE_FLAGS "-Wno-format")
|
||||
SET_SOURCE_FILES_PROPERTIES(mongoose.c PROPERTIES COMPILE_FLAGS "-Wno-format")
|
||||
endif()
|
||||
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
||||
SET_SOURCE_FILES_PROPERTIES(mongoose.c PROPERTIES COMPILE_FLAGS "-Wno-format-pedantic -Wno-large-by-value-copy")
|
||||
SET_SOURCE_FILES_PROPERTIES(mongoose.c PROPERTIES COMPILE_FLAGS "-Wno-format-pedantic -Wno-large-by-value-copy")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# needs CMake 3.1 but Windows builds should have that
|
||||
target_sources(rtl_433 PRIVATE getopt/getopt.c)
|
||||
# needs CMake 3.1 but Windows builds should have that
|
||||
target_sources(rtl_433 PRIVATE getopt/getopt.c)
|
||||
endif()
|
||||
|
||||
add_library(data data.c abuf.c term_ctl.c mongoose.c)
|
||||
target_link_libraries(data ${NET_LIBRARIES})
|
||||
|
||||
target_link_libraries(rtl_433
|
||||
${SDR_LIBRARIES}
|
||||
${NET_LIBRARIES}
|
||||
${SDR_LIBRARIES}
|
||||
${NET_LIBRARIES}
|
||||
)
|
||||
|
||||
set(INSTALL_TARGETS rtl_433)
|
||||
|
|
|
@ -37,7 +37,7 @@ add_test(rtl_433_help ../src/rtl_433 -h)
|
|||
# Define style checks
|
||||
########################################################################
|
||||
add_executable(style-check style-check.c)
|
||||
file(GLOB STYLE_CHECK_FILES ../include/*.h ../src/*.c ../src/devices/*.c)
|
||||
file(GLOB STYLE_CHECK_FILES ../include/*.h ../src/*.c ../src/devices/*.c ../CMakeLists.txt ../*/CMakeLists.txt)
|
||||
list(REMOVE_ITEM STYLE_CHECK_FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../include/mongoose.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../src/mongoose.c")
|
||||
|
|
|
@ -70,8 +70,10 @@ static int style_check(char *path)
|
|||
printf("File \"%s\" has %d CRLF errors.\n", path, crlf_errors);
|
||||
if (tabs_errors)
|
||||
printf("File \"%s\" has %d MIXED tab/spaces errors.\n", path, tabs_errors);
|
||||
if (leading_tabs)
|
||||
printf("File \"%s\" has %d TAB indented lines.\n", path, leading_tabs);
|
||||
|
||||
return read_errors + long_errors + crlf_errors + tabs_errors;
|
||||
return read_errors + long_errors + crlf_errors + tabs_errors + leading_tabs;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
|
Loading…
Add table
Reference in a new issue