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 00026 /** 00027 * @file trimslash.c 00028 * 00029 * Test harness; not linked into release. 00030 **/ 00031 int main(int argc, char **argv) 00032 { 00033 int i; 00034 00035 if (argc <= 1) { 00036 fprintf(stderr, "trimslash: needs at least one argument\n"); 00037 return 1; 00038 } 00039 00040 for (i = 1; i < argc; i++) { 00041 trim_trailing_slashes(argv[i]); /* modify in place */ 00042 printf("%s\n", argv[i]); 00043 } 00044 return 0; 00045 }