Skip to content

Commit

Permalink
Tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lifenjoiner committed Jul 29, 2024
1 parent f3163c2 commit 7f35bff
Show file tree
Hide file tree
Showing 20 changed files with 142 additions and 142 deletions.
4 changes: 2 additions & 2 deletions cfg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ local-checks-to-skip = \
sc_makefile_at_at_check \
sc_cast_of_argument_to_free \
sc_prohibit_gnu_make_extensions \
\
sc_indent
\
sc_indent

#SHELL=bash -x
show-vc-list-except:
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ if test -n "$WARN_CFLAGS"; then
nw="$nw -Wcast-function-type" # gcc 8, very noisy
nw="$nw -Wabi" # gcc 8, very noisy
nw="$nw -Wunused-macros" # triggers in auto-generated lex css parser, #pragma doesn't work, conflicts with -Werror
nw="$nw -Wchkp" # Deprecated option
nw="$nw -Wchkp" # Deprecated option
nw="$nw -Wswitch-enum" # Too noisy
nw="$nw -Wswitch-default" # TODO: Enable someday. Too noisy for now
nw="$nw -Wpedantic" # GCC 11. Too noisy, will never be supported
Expand Down
8 changes: 4 additions & 4 deletions src/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ connect_to_ip (const ip_address *ip, int port, const char *print)
if (sock >= 0)
{
#ifdef WIN32
/* If the connection timed out, fd_close will hang in Gnulib's
close_fd_maybe_socket, inside the call to WSAEnumNetworkEvents. */
if (errno != ETIMEDOUT)
/* If the connection timed out, fd_close will hang in Gnulib's
close_fd_maybe_socket, inside the call to WSAEnumNetworkEvents. */
if (errno != ETIMEDOUT)
#endif
fd_close (sock);
fd_close (sock);
}
errno = save_errno;
return -1;
Expand Down
152 changes: 76 additions & 76 deletions src/css.l
Original file line number Diff line number Diff line change
Expand Up @@ -61,107 +61,107 @@ as that of the covered work. */

%}

h [0-9a-f]
nonascii [\240-\377]
unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
escape {unicode}|\\[^\r\n\f0-9a-f]
nmstart [_a-z]|{nonascii}|{escape}
nmchar [_a-z0-9-]|{nonascii}|{escape}
string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\'
h [0-9a-f]
nonascii [\240-\377]
unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
escape {unicode}|\\[^\r\n\f0-9a-f]
nmstart [_a-z]|{nonascii}|{escape}
nmchar [_a-z0-9-]|{nonascii}|{escape}
string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\'
badstring1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\\?
badstring2 \'([^\n\r\f\\']|\\{nl}|{escape})*\\?
badcomment1 \/\*[^*]*\*+([^/*][^*]*\*+)*
badcomment2 \/\*[^*]*(\*+[^/*][^*]*)*
baduri1 url\({w}([!#$%&*-\[\]-~]|{nonascii}|{escape})*{w}
baduri2 url\({w}{string}{w}
baduri3 url\({w}{badstring}
comment \/\*[^*]*\*+([^/*][^*]*\*+)*\/
ident -?{nmstart}{nmchar}*
name {nmchar}+
num [0-9]+|[0-9]*"."[0-9]+
string {string1}|{string2}
comment \/\*[^*]*\*+([^/*][^*]*\*+)*\/
ident -?{nmstart}{nmchar}*
name {nmchar}+
num [0-9]+|[0-9]*"."[0-9]+
string {string1}|{string2}
badstring {badstring1}|{badstring2}
badcomment {badcomment1}|{badcomment2}
baduri {baduri1}|{baduri2}|{baduri3}
url ([!#$%&*-~]|{nonascii}|{escape})*
s [ \t\r\n\f]+
w {s}?
nl \n|\r\n|\r|\f

A a|\\0{0,4}(41|61)(\r\n|[ \t\r\n\f])?
C c|\\0{0,4}(43|63)(\r\n|[ \t\r\n\f])?
D d|\\0{0,4}(44|64)(\r\n|[ \t\r\n\f])?
E e|\\0{0,4}(45|65)(\r\n|[ \t\r\n\f])?
G g|\\0{0,4}(47|67)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s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
T t|\\0{0,4}(54|74)(\r\n|[ \t\r\n\f])?|\\t
U u|\\0{0,4}(55|75)(\r\n|[ \t\r\n\f])?|\\u
X x|\\0{0,4}(58|78)(\r\n|[ \t\r\n\f])?|\\x
Z z|\\0{0,4}(5a|7a)(\r\n|[ \t\r\n\f])?|\\z
X x|\\0{0,4}(58|78)(\r\n|[ \t\r\n\f])?|\\x
Z z|\\0{0,4}(5a|7a)(\r\n|[ \t\r\n\f])?|\\z

%%

{s} {return S;}
{s} {return S;}

{comment} {return COMMENT;}
#\/\*[^*]*\*+([^/*][^*]*\*+)*\/ /* ignore comments */
{badcomment} /* unclosed comment at EOF */
{comment} {return COMMENT;}
#\/\*[^*]*\*+([^/*][^*]*\*+)*\/ /* ignore comments */
{badcomment} /* unclosed comment at EOF */

"<!--" {return CDO;}
"-->" {return CDC;}
"~=" {return INCLUDES;}
"|=" {return DASHMATCH;}
"<!--" {return CDO;}
"-->" {return CDC;}
"~=" {return INCLUDES;}
"|=" {return DASHMATCH;}

{string} {return STRING;}
{string} {return STRING;}
{badstring} {return BAD_STRING;}

{ident} {return IDENT;}

"#"{name} {return HASH;}

@{I}{M}{P}{O}{R}{T} {return IMPORT_SYM;}
@{P}{A}{G}{E} {return PAGE_SYM;}
@{M}{E}{D}{I}{A} {return MEDIA_SYM;}
"@charset " {return CHARSET_SYM;}

"!"({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T} {return IMPORTANT_SYM;}

{num}{E}{M} {return EMS;}
{num}{E}{X} {return EXS;}
{num}{P}{X} {return LENGTH;}
{num}{C}{M} {return LENGTH;}
{num}{M}{M} {return LENGTH;}
{num}{I}{N} {return LENGTH;}
{num}{P}{T} {return LENGTH;}
{num}{P}{C} {return LENGTH;}
{num}{D}{E}{G} {return ANGLE;}
{num}{R}{A}{D} {return ANGLE;}
{num}{G}{R}{A}{D} {return ANGLE;}
{num}{M}{S} {return TIME;}
{num}{S} {return TIME;}
{num}{H}{Z} {return FREQ;}
{num}{K}{H}{Z} {return FREQ;}
{num}{ident} {return DIMENSION;}

{num}% {return PERCENTAGE;}
{num} {return NUMBER;}
{ident} {return IDENT;}

"#"{name} {return HASH;}

@{I}{M}{P}{O}{R}{T} {return IMPORT_SYM;}
@{P}{A}{G}{E} {return PAGE_SYM;}
@{M}{E}{D}{I}{A} {return MEDIA_SYM;}
"@charset " {return CHARSET_SYM;}

"!"({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T} {return IMPORTANT_SYM;}

{num}{E}{M} {return EMS;}
{num}{E}{X} {return EXS;}
{num}{P}{X} {return LENGTH;}
{num}{C}{M} {return LENGTH;}
{num}{M}{M} {return LENGTH;}
{num}{I}{N} {return LENGTH;}
{num}{P}{T} {return LENGTH;}
{num}{P}{C} {return LENGTH;}
{num}{D}{E}{G} {return ANGLE;}
{num}{R}{A}{D} {return ANGLE;}
{num}{G}{R}{A}{D} {return ANGLE;}
{num}{M}{S} {return TIME;}
{num}{S} {return TIME;}
{num}{H}{Z} {return FREQ;}
{num}{K}{H}{Z} {return FREQ;}
{num}{ident} {return DIMENSION;}

{num}% {return PERCENTAGE;}
{num} {return NUMBER;}

"url("{w}{string}{w}")" {return URI;}
"url("{w}{url}{w}")" {return URI;}
{baduri} {return BAD_URI;}

{ident}"(" {return FUNCTION;}
{ident}"(" {return FUNCTION;}

. {return *yytext;}
. {return *yytext;}

%%
4 changes: 2 additions & 2 deletions src/ftp-ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ ftp_parse_vms_ls (FILE *fp)
{
/* Date. */
DEBUGP (("Date.\n"));
snprintf(date_str, sizeof(date_str), "%s ", tok);
snprintf(date_str, sizeof(date_str), "%s ", tok);
}
else if ((strlen (tok) < 12) && (strchr( tok, ':') != NULL))
{
Expand Down Expand Up @@ -967,7 +967,7 @@ ftp_parse_vms_ls (FILE *fp)
else
{
cur.prev = l;
cur.next = NULL;
cur.next = NULL;
l->next = xmalloc (sizeof (struct fileinfo));
l = l->next;
memcpy (l, &cur, sizeof (cur));
Expand Down
2 changes: 1 addition & 1 deletion src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -4385,7 +4385,7 @@ http_loop (struct url *u, struct url *original_url, char **newloc,

if (opt.spider && !got_head)
logprintf (LOG_VERBOSE,
_("Spider mode enabled. Check if remote file exists.\n"));
_("Spider mode enabled. Check if remote file exists.\n"));

/* Print fetch message, if opt.verbose. */
#ifdef WINDOWS
Expand Down
4 changes: 2 additions & 2 deletions src/metalink.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work. */
#if ! defined METALINK_H && defined HAVE_METALINK
#define METALINK_H
#define METALINK_H

#include <metalink/metalink_types.h>
#include "dirname.h"
Expand Down Expand Up @@ -72,4 +72,4 @@ const char *find_key_values (const char *start,
char **key,
char **value);

#endif /* METALINK_H */
#endif /* METALINK_H */
8 changes: 4 additions & 4 deletions src/netrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ parse_netrc_fp (const char *path, FILE *fp)
else if (!strcmp (tok, "password") || !strcmp (tok, "passwd"))
last_token = tok_password;

/* GNU extensions 'port' and 'force', not operational
* see https://www.gnu.org/software/emacs/manual/html_node/gnus/NNTP.html#index-nntp_002dauthinfo_002dfunction-2003
* see https://savannah.gnu.org/bugs/index.php?52066
*/
/* GNU extensions 'port' and 'force', not operational
* see https://www.gnu.org/software/emacs/manual/html_node/gnus/NNTP.html#index-nntp_002dauthinfo_002dfunction-2003
* see https://savannah.gnu.org/bugs/index.php?52066
*/
else if (!strcmp (tok, "port"))
last_token = tok_port;

Expand Down
6 changes: 3 additions & 3 deletions src/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ ssl_init (void)
if (!opt.tls_ciphers_string)
{
if (opt.secure_protocol == secure_protocol_auto)
ciphers_string = "HIGH:!aNULL:!RC4:!MD5:!SRP:!PSK";
ciphers_string = "HIGH:!aNULL:!RC4:!MD5:!SRP:!PSK";
else if (opt.secure_protocol == secure_protocol_pfs)
ciphers_string = "HIGH:!aNULL:!RC4:!MD5:!SRP:!PSK:!kRSA";
ciphers_string = "HIGH:!aNULL:!RC4:!MD5:!SRP:!PSK:!kRSA";
}
else
{
Expand Down Expand Up @@ -879,7 +879,7 @@ ssl_connect_wget (int fd, const char *hostname, int *continue_session)
if (init_prng () != 1)
{
logprintf(LOG_NOTQUIET,
_("WARNING: Could not seed PRNG. Consider using --random-file.\n"));
_("WARNING: Could not seed PRNG. Consider using --random-file.\n"));
goto error;
}

Expand Down
4 changes: 2 additions & 2 deletions src/res.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ prune_non_exact (struct robot_specs *specs)
for (i = 0, j = 0; i < specs->count; i++)
if (specs->paths[i].user_agent_exact_p)
newpaths[j++] = specs->paths[i];
else
xfree (specs->paths[i].path);
else
xfree (specs->paths[i].path);
assert (j == cnt);
xfree (specs->paths);
specs->paths = newpaths;
Expand Down
2 changes: 1 addition & 1 deletion src/retr.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ calc_rate (wgint bytes, double secs, int *units)
else {
*units = 4, dlrate /= (bibyte * bibyte * bibyte * bibyte);
if (dlrate > 99.99)
dlrate = 99.99; // upper limit 99.99TB/s
dlrate = 99.99; // upper limit 99.99TB/s
}

return dlrate;
Expand Down
8 changes: 4 additions & 4 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ file_exists_p (const char *filename, file_stats_t *fstats)
struct stat buf;

if (!filename)
return false;
return false;

#if defined(WINDOWS) || defined(__VMS)
int ret = stat (filename, &buf);
Expand Down Expand Up @@ -976,7 +976,7 @@ make_directory (const char *directory)
{
memcpy(buf, directory, len + 1);
dir = buf;
}
}
else
dir = xstrdup(directory);

Expand All @@ -1003,7 +1003,7 @@ make_directory (const char *directory)
}

if (dir != buf)
xfree (dir);
xfree (dir);

return ret;
}
Expand Down Expand Up @@ -2534,7 +2534,7 @@ match_pcre2_regex (const void *regex, const char *str)
pcre2_match_data_free(match_data);
}
else
rc = PCRE2_ERROR_NOMEMORY;
rc = PCRE2_ERROR_NOMEMORY;

if (rc < 0 && rc != PCRE2_ERROR_NOMATCH)
{
Expand Down
Loading

0 comments on commit 7f35bff

Please sign in to comment.