English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Diff of /branches/freewrt_1_0/tools/paxmirabilis/src/pat_rep.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2714 by wbx, Thu Sep 28 10:42:55 2006 UTC revision 2715 by tg, Tue Jun 5 14:52:44 2007 UTC
# Line 34  Line 34 
34   * SUCH DAMAGE.   * SUCH DAMAGE.
35   */   */
36    
37  #ifndef lint  #include <sys/param.h>
 #if 0  
 static const char sccsid[] = "@(#)pat_rep.c     8.2 (Berkeley) 4/18/94";  
 #else  
 static const char rcsid[] = "$OpenBSD: pat_rep.c,v 1.30 2005/08/05 08:30:10 djm Exp $";  
 #endif  
 #endif /* not lint */  
   
 #include <sys/types.h>  
38  #include <sys/time.h>  #include <sys/time.h>
39  #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/param.h>  
40  #include <stdio.h>  #include <stdio.h>
41  #include <string.h>  #include <string.h>
42  #include <unistd.h>  #include <unistd.h>
# Line 56  static const char rcsid[] = "$OpenBSD: p Line 47  static const char rcsid[] = "$OpenBSD: p
47  #include "pat_rep.h"  #include "pat_rep.h"
48  #include "extern.h"  #include "extern.h"
49    
50    __SCCSID("@(#)pat_rep.c 8.2 (Berkeley) 4/18/94");
51    __RCSID("$MirOS: src/bin/pax/pat_rep.c,v 1.2 2007/02/17 04:52:41 tg Exp $");
52    
53  /*  /*
54   * routines to handle pattern matching, name modification (regular expression   * routines to handle pattern matching, name modification (regular expression
55   * substitution and interactive renames), and destination name modification for   * substitution and interactive renames), and destination name modification for
# Line 217  rep_add(char *str) Line 211  rep_add(char *str)
211   */   */
212    
213  int  int
214  pat_add(char *str, char *chdname)  pat_add(char *str, char *chd_name)
215  {  {
216          PATTERN *pt;          PATTERN *pt;
217    
# Line 244  pat_add(char *str, char *chdname) Line 238  pat_add(char *str, char *chdname)
238          pt->plen = strlen(str);          pt->plen = strlen(str);
239          pt->fow = NULL;          pt->fow = NULL;
240          pt->flgs = 0;          pt->flgs = 0;
241          pt->chdname = chdname;          pt->chdname = chd_name;
242    
243          if (pathead == NULL) {          if (pathead == NULL) {
244                  pattail = pathead = pt;                  pattail = pathead = pt;
# Line 750  tty_rename(ARCHD *arcn) Line 744  tty_rename(ARCHD *arcn)
744          tty_prnt("Processing continues, name changed to: %s\n", tmpname);          tty_prnt("Processing continues, name changed to: %s\n", tmpname);
745          res = add_name(arcn->name, arcn->nlen, tmpname);          res = add_name(arcn->name, arcn->nlen, tmpname);
746          arcn->nlen = strlcpy(arcn->name, tmpname, sizeof(arcn->name));          arcn->nlen = strlcpy(arcn->name, tmpname, sizeof(arcn->name));
747          if (arcn->nlen >= sizeof(arcn->name))          if ((size_t)arcn->nlen >= sizeof(arcn->name))
748                  arcn->nlen = sizeof(arcn->name) - 1; /* XXX truncate? */                  arcn->nlen = sizeof(arcn->name) - 1; /* XXX truncate? */
749          if (res < 0)          if (res < 0)
750                  return(-1);                  return(-1);

Legend:
Removed from v.2714  
changed lines
  Added in v.2715

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20