From b801b453af6de75838c3298137628f05e94ffb48 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 23 Sep 2018 22:24:02 +0000 Subject: whitespace fixes - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037 --- docs/examples/Makefile.am | 2 +- docs/examples/Makefile.netware | 220 ++++++++++++++++++++--------------------- docs/examples/curlgtk.c | 1 - docs/examples/makefile.dj | 1 - docs/examples/version-check.pl | 2 - 5 files changed, 111 insertions(+), 115 deletions(-) (limited to 'docs/examples') diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am index e5ed222ef..ce2e924d7 100644 --- a/docs/examples/Makefile.am +++ b/docs/examples/Makefile.am @@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = foreign nostdinc EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \ - Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES) + Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES) # Specify our include paths here, and do it relative to $(top_srcdir) and # $(top_builddir), to ensure that these paths which belong to the library diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware index 8aca32558..9b6c69b8f 100644 --- a/docs/examples/Makefile.netware +++ b/docs/examples/Makefile.netware @@ -9,7 +9,7 @@ # Edit the path below to point to the base of your Novell NDK. ifndef NDKBASE -NDKBASE = c:/novell +NDKBASE = c:/novell endif # Edit the path below to point to the base of your Zlib sources. @@ -53,17 +53,17 @@ LIBCARES_PATH = ../../ares endif ifndef INSTDIR -INSTDIR = ..$(DS)..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw +INSTDIR = ..$(DS)..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw endif # Edit the vars below to change NLM target settings. TARGET = examples -VERSION = $(LIBCURL_VERSION) -COPYR = Copyright (C) $(LIBCURL_COPYRIGHT_STR) -DESCR = curl ($(LIBARCH)) -MTSAFE = YES -STACK = 8192 -SCREEN = Example Program +VERSION = $(LIBCURL_VERSION) +COPYR = Copyright (C) $(LIBCURL_COPYRIGHT_STR) +DESCR = curl ($(LIBARCH)) +MTSAFE = YES +STACK = 8192 +SCREEN = Example Program # Comment the line below if you don't want to load protected automatically. # LDRING = 3 @@ -77,39 +77,39 @@ endif # must be equal to NDEBUG or DEBUG, CURLDEBUG ifndef DB -DB = NDEBUG +DB = NDEBUG endif # Optimization: -O or debugging: -g ifeq ($(DB),NDEBUG) - OPT = -O2 - OBJDIR = release + OPT = -O2 + OBJDIR = release else - OPT = -g - OBJDIR = debug + OPT = -g + OBJDIR = debug endif # The following lines defines your compiler. ifdef CWFolder - METROWERKS = $(CWFolder) + METROWERKS = $(CWFolder) endif ifdef METROWERKS - # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support - MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support - CC = mwccnlm + # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support + MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support + CC = mwccnlm else - CC = gcc + CC = gcc endif -PERL = perl +PERL = perl # Here you can find a native Win32 binary of the original awk: # http://www.gknw.net/development/prgtools/awk-20100523.zip -AWK = awk -CP = cp -afv -MKDIR = mkdir -# RM = rm -f +AWK = awk +CP = cp -afv +MKDIR = mkdir +# RM = rm -f # If you want to mark the target as MTSAFE you will need a tool for # generating the xdc data for the linker; here's a minimal tool: # http://www.gknw.net/development/prgtools/mkxdc.zip -MPKXDC = mkxdc +MPKXDC = mkxdc # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH)) LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH)) @@ -118,52 +118,52 @@ LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH)) -include $(OBJDIR)/version.inc # Global flags for all compilers -CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc +CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc ifeq ($(CC),mwccnlm) -LD = mwldnlm -LDFLAGS = -nostdlib $< $(PRELUDE) $(LDLIBS) -o $@ -commandfile -LIBEXT = lib -CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586 -CFLAGS += -relax_pointers -#CFLAGS += -w on -ifeq ($(LIBARCH),LIBC) -ifeq ($(POSIXFL),1) - PRELUDE = $(NDK_LIBC)/imports/posixpre.o -else - PRELUDE = $(NDK_LIBC)/imports/libcpre.o -endif - CFLAGS += -align 4 + LD = mwldnlm + LDFLAGS = -nostdlib $< $(PRELUDE) $(LDLIBS) -o $@ -commandfile + LIBEXT = lib + CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586 + CFLAGS += -relax_pointers + #CFLAGS += -w on + ifeq ($(LIBARCH),LIBC) + ifeq ($(POSIXFL),1) + PRELUDE = $(NDK_LIBC)/imports/posixpre.o + else + PRELUDE = $(NDK_LIBC)/imports/libcpre.o + endif + CFLAGS += -align 4 + else + # PRELUDE = $(NDK_CLIB)/imports/clibpre.o + # to avoid the __init_* / __deinit_* woes don't use prelude from NDK + PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" + # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" + CFLAGS += -align 1 + endif else - # PRELUDE = $(NDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* woes don't use prelude from NDK - PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" - # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" - CFLAGS += -align 1 -endif -else -LD = nlmconv -LDFLAGS = -T -LIBEXT = a -CFLAGS += -m32 -CFLAGS += -fno-builtin -fno-strict-aliasing -ifeq ($(findstring gcc,$(CC)),gcc) -CFLAGS += -fpcc-struct-return -endif -CFLAGS += -Wall # -pedantic -ifeq ($(LIBARCH),LIBC) -ifeq ($(POSIXFL),1) - PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o -else - PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o -endif -else - # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* woes don't use prelude from NDK - # http://www.gknw.net/development/mk_nlm/gcc_pre.zip - PRELUDE = $(NDK_ROOT)/pre/prelude.o - CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h -endif + LD = nlmconv + LDFLAGS = -T + LIBEXT = a + CFLAGS += -m32 + CFLAGS += -fno-builtin -fno-strict-aliasing + ifeq ($(findstring gcc,$(CC)),gcc) + CFLAGS += -fpcc-struct-return + endif + CFLAGS += -Wall # -pedantic + ifeq ($(LIBARCH),LIBC) + ifeq ($(POSIXFL),1) + PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o + else + PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o + endif + else + # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o + # to avoid the __init_* / __deinit_* woes don't use prelude from NDK + # http://www.gknw.net/development/mk_nlm/gcc_pre.zip + PRELUDE = $(NDK_ROOT)/pre/prelude.o + CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h + endif endif NDK_ROOT = $(NDKBASE)/ndk @@ -216,91 +216,91 @@ ENABLE_IPV6 = 1 endif ifdef LINK_STATIC - LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT) + LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT) ifdef WITH_ARES - LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT) + LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT) endif else - MODULES = libcurl.nlm - IMPORTS = @$(CURL_LIB)/libcurl.imp + MODULES = libcurl.nlm + IMPORTS = @$(CURL_LIB)/libcurl.imp endif ifdef WITH_SSH2 - # INCLUDES += -I$(LIBSSH2_PATH)/include -ifdef LINK_STATIC - LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT) -else - MODULES += libssh2.nlm - IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp -endif + # INCLUDES += -I$(LIBSSH2_PATH)/include + ifdef LINK_STATIC + LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT) + else + MODULES += libssh2.nlm + IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp + endif endif ifdef WITH_RTMP - # INCLUDES += -I$(LIBRTMP_PATH) + # INCLUDES += -I$(LIBRTMP_PATH) ifdef LINK_STATIC - LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT) + LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT) endif endif ifdef WITH_SSL - INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) - LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT) - LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) - IMPORTS += GetProcessSwitchCount RunningProcess + INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) + LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT) + LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) + IMPORTS += GetProcessSwitchCount RunningProcess else ifdef WITH_AXTLS - INCLUDES += -I$(AXTLS_PATH)/inc + INCLUDES += -I$(AXTLS_PATH)/inc ifdef LINK_STATIC - LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT) + LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT) else - MODULES += libaxtls.nlm - IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp + MODULES += libaxtls.nlm + IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp endif endif endif ifdef WITH_ZLIB - # INCLUDES += -I$(ZLIB_PATH) + # INCLUDES += -I$(ZLIB_PATH) ifdef LINK_STATIC - LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) + LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) else - MODULES += libz.nlm - IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp + MODULES += libz.nlm + IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp endif endif ifdef WITH_IDN - # INCLUDES += -I$(LIBIDN_PATH)/include - LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT) + # INCLUDES += -I$(LIBIDN_PATH)/include + LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT) endif ifeq ($(LIBARCH),LIBC) - INCLUDES += -I$(NDK_LIBC)/include - # INCLUDES += -I$(NDK_LIBC)/include/nks - # INCLUDES += -I$(NDK_LIBC)/include/winsock - CFLAGS += -D_POSIX_SOURCE + INCLUDES += -I$(NDK_LIBC)/include + # INCLUDES += -I$(NDK_LIBC)/include/nks + # INCLUDES += -I$(NDK_LIBC)/include/winsock + CFLAGS += -D_POSIX_SOURCE else - INCLUDES += -I$(NDK_CLIB)/include/nlm - # INCLUDES += -I$(NDK_CLIB)/include + INCLUDES += -I$(NDK_CLIB)/include/nlm + # INCLUDES += -I$(NDK_CLIB)/include endif ifndef DISABLE_LDAP - # INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc + # INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc endif -CFLAGS += $(INCLUDES) +CFLAGS += $(INCLUDES) ifeq ($(MTSAFE),YES) - XDCOPT = -n + XDCOPT = -n endif ifeq ($(MTSAFE),NO) - XDCOPT = -u + XDCOPT = -u endif ifdef XDCOPT - XDCDATA = $(OBJDIR)/$(TARGET).xdc + XDCDATA = $(OBJDIR)/$(TARGET).xdc endif ifeq ($(findstring /sh,$(SHELL)),/sh) -DL = ' -DS = / -PCT = % +DL = ' +DS = / +PCT = % #-include $(NDKBASE)/nlmconv/ncpfs.inc else -DS = \\ -PCT = %% +DS = \\ +PCT = %% endif # Makefile.inc provides the CSOURCES and HHEADERS defines diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c index c3129c198..79e89acc6 100644 --- a/docs/examples/curlgtk.c +++ b/docs/examples/curlgtk.c @@ -106,4 +106,3 @@ int main(int argc, char **argv) gdk_threads_leave(); return 0; } - diff --git a/docs/examples/makefile.dj b/docs/examples/makefile.dj index af761130c..17d93ab89 100644 --- a/docs/examples/makefile.dj +++ b/docs/examples/makefile.dj @@ -53,4 +53,3 @@ clean vclean realclean: - rm -f $(PROGRAMS) depend.dj -include depend.dj - diff --git a/docs/examples/version-check.pl b/docs/examples/version-check.pl index 074e50d8c..8f734fc75 100755 --- a/docs/examples/version-check.pl +++ b/docs/examples/version-check.pl @@ -101,5 +101,3 @@ for my $w (@recent) { } last; } - - -- cgit v1.2.3