00001 /* 00002 * Copyright (C) 2002 by Martin Pool 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #include "rsync.h" 00020 00021 /* These are to make syscall.o shut up. */ 00022 int dry_run = 0; 00023 int read_only = 1; 00024 int list_only = 0; 00025 int preserve_perms = 0; 00026 00027 /** 00028 * @file trimslash.c 00029 * 00030 * Test harness; not linked into release. 00031 **/ 00032 int 00033 main(int argc, char **argv) 00034 { 00035 int i; 00036 00037 if (argc <= 1) { 00038 fprintf(stderr, "trimslash: needs at least one argument\n"); 00039 return 1; 00040 } 00041 00042 for (i = 1; i < argc; i++) { 00043 trim_trailing_slashes(argv[i]); /* modify in place */ 00044 printf("%s\n", argv[i]); 00045 } 00046 return 0; 00047 }