Skip to content

Commit dca11d3

Browse files
committed
Remove trailing whitespace
1 parent 62f7683 commit dca11d3

19 files changed

+212
-219
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ distclean: clean
5151

5252
# FIXME: To fix this, test.sh needs to be able to take ccache from the
5353
# installed prefix, not from the source dir.
54-
installcheck:
54+
installcheck:
5555
@echo "WARNING! This is not really \"installcheck\" yet."
5656
$(MAKE) check
5757

README

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ then read the ccache manual page
2828
Andrew Tridgell
2929
http://samba.org/~tridge/
3030
31-

args.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
convenient routines for argument list handling
33
44
Copyright (C) Andrew Tridgell 2002
5-
5+
66
This program is free software; you can redistribute it and/or modify
77
it under the terms of the GNU General Public License as published by
88
the Free Software Foundation; either version 2 of the License, or
99
(at your option) any later version.
10-
10+
1111
This program is distributed in the hope that it will be useful,
1212
but WITHOUT ANY WARRANTY; without even the implied warranty of
1313
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414
GNU General Public License for more details.
15-
15+
1616
You should have received a copy of the GNU General Public License
1717
along with this program; if not, write to the Free Software
1818
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -57,7 +57,7 @@ void args_pop(ARGS *args, int n)
5757
void args_remove_first(ARGS *args)
5858
{
5959
free(args->argv[0]);
60-
memmove(&args->argv[0],
60+
memmove(&args->argv[0],
6161
&args->argv[1],
6262
args->argc * sizeof(args->argv[0]));
6363
args->argc--;
@@ -67,7 +67,7 @@ void args_remove_first(ARGS *args)
6767
void args_add_prefix(ARGS *args, const char *s)
6868
{
6969
args->argv = (char**)x_realloc(args->argv, (args->argc + 2) * sizeof(char *));
70-
memmove(&args->argv[1], &args->argv[0],
70+
memmove(&args->argv[1], &args->argv[0],
7171
(args->argc+1) * sizeof(args->argv[0]));
7272
args->argv[0] = x_strdup(s);
7373
args->argc++;
@@ -80,8 +80,8 @@ void args_strip(ARGS *args, const char *prefix)
8080
for (i=0; i<args->argc; ) {
8181
if (strncmp(args->argv[i], prefix, strlen(prefix)) == 0) {
8282
free(args->argv[i]);
83-
memmove(&args->argv[i],
84-
&args->argv[i+1],
83+
memmove(&args->argv[i],
84+
&args->argv[i+1],
8585
args->argc * sizeof(args->argv[i]));
8686
args->argc--;
8787
} else {

ccache.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
66
Copyright (C) Andrew Tridgell 2002
77
Copyright (C) Martin Pool 2003
8-
8+
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License as published by
1111
the Free Software Foundation; either version 2 of the License, or
1212
(at your option) any later version.
13-
13+
1414
This program is distributed in the hope that it will be useful,
1515
but WITHOUT ANY WARRANTY; without even the implied warranty of
1616
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1717
GNU General Public License for more details.
18-
18+
1919
You should have received a copy of the GNU General Public License
2020
along with this program; if not, write to the Free Software
2121
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -130,8 +130,8 @@ static void failed(void)
130130
}
131131

132132

133-
/* return a string to be used to distinguish temporary files
134-
this also tries to cope with NFS by adding the local hostname
133+
/* return a string to be used to distinguish temporary files
134+
this also tries to cope with NFS by adding the local hostname
135135
*/
136136
static const char *tmp_string(void)
137137
{
@@ -175,7 +175,7 @@ static void to_cache(ARGS *args)
175175
*
176176
* unsetenv() is on BSD and Linux but not portable. */
177177
putenv("DEPENDENCIES_OUTPUT");
178-
178+
179179
if (getenv("CCACHE_CPP2")) {
180180
args_add(args, input_file);
181181
} else {
@@ -225,7 +225,7 @@ static void to_cache(ARGS *args)
225225
exit(status);
226226
}
227227
}
228-
228+
229229
unlink(tmp_stderr);
230230
unlink(tmp_hashname);
231231
failed();
@@ -275,7 +275,7 @@ static void find_hash(ARGS *args)
275275
int nlevels = 2;
276276
char *input_base;
277277
char *tmp;
278-
278+
279279
if ((s = getenv("CCACHE_NLEVELS"))) {
280280
nlevels = atoi(s);
281281
if (nlevels < 1) nlevels = 1;
@@ -361,7 +361,7 @@ static void find_hash(ARGS *args)
361361
}
362362
}
363363

364-
/* ~/hello.c -> tmp.hello.123.i
364+
/* ~/hello.c -> tmp.hello.123.i
365365
limit the basename to 10
366366
characters in order to cope with filesystem with small
367367
maximum filename length limits */
@@ -376,7 +376,7 @@ static void find_hash(ARGS *args)
376376

377377
/* now the run */
378378
x_asprintf(&path_stdout, "%s/%s.tmp.%s.%s", temp_dir,
379-
input_base, tmp_string(),
379+
input_base, tmp_string(),
380380
i_extension);
381381
x_asprintf(&path_stderr, "%s/tmp.cpp_stderr.%s", temp_dir, tmp_string());
382382

@@ -412,7 +412,7 @@ static void find_hash(ARGS *args)
412412
/* if the compilation is with -g then we have to include the whole of the
413413
preprocessor output, which means we are sensitive to line number
414414
information. Otherwise we can discard line number info, which makes
415-
us less sensitive to reformatting changes
415+
us less sensitive to reformatting changes
416416
417417
Note! I have now disabled the unification code by default
418418
as it gives the wrong line numbers for warnings. Pity.
@@ -434,7 +434,7 @@ static void find_hash(ARGS *args)
434434
data and output it just before the main stderr from the compiler
435435
pass */
436436
cpp_stderr = path_stderr;
437-
} else {
437+
} else {
438438
unlink(path_stderr);
439439
free(path_stderr);
440440
}
@@ -464,7 +464,7 @@ static void find_hash(ARGS *args)
464464
}
465465

466466

467-
/*
467+
/*
468468
try to return the compile result from cache. If we can return from
469469
cache then this function exits with the correct status code,
470470
otherwise it returns */
@@ -541,7 +541,7 @@ static void from_cache(int first)
541541
if (ret == -1) {
542542
ret = copy_file(hashname, output_file);
543543
if (ret == -1) {
544-
cc_log("failed to copy %s -> %s (%s)\n",
544+
cc_log("failed to copy %s -> %s (%s)\n",
545545
hashname, output_file, strerror(errno));
546546
stats_update(STATS_ERROR);
547547
failed();
@@ -580,7 +580,7 @@ static void from_cache(int first)
580580
exit(0);
581581
}
582582

583-
/* find the real compiler. We just search the PATH to find a executable of the
583+
/* find the real compiler. We just search the PATH to find a executable of the
584584
same name that isn't a link to ourselves */
585585
static void find_compiler(int argc, char **argv)
586586
{
@@ -646,8 +646,8 @@ static const char *check_extension(const char *fname, int *direct_i)
646646
}
647647

648648

649-
/*
650-
process the compiler options to form the correct set of options
649+
/*
650+
process the compiler options to form the correct set of options
651651
for obtaining the preprocessor output
652652
*/
653653
static void process_args(int argc, char **argv)
@@ -701,7 +701,7 @@ static void process_args(int argc, char **argv)
701701
found_S_opt = 1;
702702
continue;
703703
}
704-
704+
705705
/* we need to work out where the output was meant to go */
706706
if (strcmp(argv[i], "-o") == 0) {
707707
if (i == argc-1) {
@@ -713,15 +713,15 @@ static void process_args(int argc, char **argv)
713713
i++;
714714
continue;
715715
}
716-
716+
717717
/* alternate form of -o, with no space */
718718
if (strncmp(argv[i], "-o", 2) == 0) {
719719
output_file = &argv[i][2];
720720
continue;
721721
}
722722

723723
/* debugging is handled specially, so that we know if we
724-
can strip line number info
724+
can strip line number info
725725
*/
726726
if (strncmp(argv[i], "-g", 2) == 0) {
727727
args_add(stripped_args, argv[i]);
@@ -757,21 +757,21 @@ static void process_args(int argc, char **argv)
757757
{
758758
const char *opts[] = {"-I", "-include", "-imacros", "-iprefix",
759759
"-iwithprefix", "-iwithprefixbefore",
760-
"-L", "-D", "-U", "-x", "-MF",
760+
"-L", "-D", "-U", "-x", "-MF",
761761
"-MT", "-MQ", "-isystem", "-aux-info",
762762
"--param", "-A", "-Xlinker", "-u",
763-
"-idirafter",
763+
"-idirafter",
764764
NULL};
765765
int j;
766766
for (j=0;opts[j];j++) {
767767
if (strcmp(argv[i], opts[j]) == 0) {
768768
if (i == argc-1) {
769-
cc_log("missing argument to %s\n",
769+
cc_log("missing argument to %s\n",
770770
argv[i]);
771771
stats_update(STATS_ARGS);
772772
failed();
773773
}
774-
774+
775775
args_add(stripped_args, argv[i]);
776776
args_add(stripped_args, argv[i+1]);
777777
i++;
@@ -792,7 +792,7 @@ static void process_args(int argc, char **argv)
792792
cope better with unusual compiler options */
793793
if (stat(argv[i], &st) != 0 || !S_ISREG(st.st_mode)) {
794794
args_add(stripped_args, argv[i]);
795-
continue;
795+
continue;
796796
}
797797

798798
if (input_file) {
@@ -882,7 +882,7 @@ static void process_args(int argc, char **argv)
882882
}
883883
else {
884884
int len = p - default_depfile_name;
885-
885+
886886
p = x_malloc(len + 3);
887887
strncpy(default_depfile_name, p, len - 1);
888888
free(default_depfile_name);
@@ -922,7 +922,7 @@ static void ccache(int argc, char *argv[])
922922
cc_log("ccache is disabled\n");
923923
failed();
924924
}
925-
925+
926926
/* we might be disabled */
927927
if (getenv("CCACHE_DISABLE")) {
928928
cc_log("ccache is disabled\n");
@@ -946,7 +946,7 @@ static void ccache(int argc, char *argv[])
946946
cc_log("read-only set - doing real compile\n");
947947
failed();
948948
}
949-
949+
950950
prefix = getenv("CCACHE_PREFIX");
951951
if (prefix) {
952952
char *p = find_executable(prefix, MYNAME);
@@ -974,7 +974,7 @@ static void usage(void)
974974
{
975975
printf("ccache, a compiler cache. Version %s\n", CCACHE_VERSION);
976976
printf("Copyright Andrew Tridgell, 2002\n\n");
977-
977+
978978
printf("Usage:\n");
979979
printf("\tccache [options]\n");
980980
printf("\tccache compiler [compile options]\n");
@@ -1028,7 +1028,7 @@ static int ccache_main(int argc, char *argv[])
10281028
case 'h':
10291029
usage();
10301030
exit(0);
1031-
1031+
10321032
case 's':
10331033
check_cache_dir();
10341034
stats_summary();
@@ -1090,7 +1090,7 @@ static void setup_uncached_err(void)
10901090
{
10911091
char *buf;
10921092
int uncached_fd;
1093-
1093+
10941094
uncached_fd = dup(2);
10951095
if (uncached_fd == -1) {
10961096
cc_log("dup(2) failed\n");
@@ -1127,7 +1127,7 @@ int main(int argc, char *argv[])
11271127
cache_logfile = getenv("CCACHE_LOGFILE");
11281128

11291129
setup_uncached_err();
1130-
1130+
11311131

11321132
/* the user might have set CCACHE_UMASK */
11331133
p = getenv("CCACHE_UMASK");
@@ -1157,7 +1157,7 @@ int main(int argc, char *argv[])
11571157

11581158
/* make sure the cache dir exists */
11591159
if (cache_dir && (create_dir(cache_dir) != 0)) {
1160-
fprintf(stderr,"ccache: failed to create %s (%s)\n",
1160+
fprintf(stderr,"ccache: failed to create %s (%s)\n",
11611161
cache_dir, strerror(errno));
11621162
exit(1);
11631163
}

ccache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize);
146146
void cleanup_all(const char *dir);
147147
void wipe_all(const char *dir);
148148

149-
int execute(char **argv,
149+
int execute(char **argv,
150150
const char *path_stdout,
151151
const char *path_stderr);
152152
char *find_executable(const char *name, const char *exclude_name);

0 commit comments

Comments
 (0)