/[global]/global/htags/htags.c
ViewVC logotype

Diff of /global/htags/htags.c

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

revision 1.33 by shigio, Thu Feb 24 01:33:48 2005 UTC revision 1.34 by shigio, Sat Feb 26 02:24:05 2005 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004   * Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
3   *      Tama Communications Corporation   *      Tama Communications Corporation
4   *   *
5   * This file is part of GNU GLOBAL.   * This file is part of GNU GLOBAL.
# Line 102  int dynamic;                           /* --dynamic(-D) option Line 102  int dynamic;                           /* --dynamic(-D) option
102  int symbol;                             /* --symbol(-s) option          */  int symbol;                             /* --symbol(-s) option          */
103  int statistics;                         /* --statistics option          */  int statistics;                         /* --statistics option          */
104    
105    int copy_files;                         /* 1: copy tag files            */
106  int no_map_file;                        /* 1: doesn't make map file     */  int no_map_file;                        /* 1: doesn't make map file     */
107  int no_order_list;                      /* 1: doesn't use order list    */  int no_order_list;                      /* 1: doesn't use order list    */
108  int other_files;                        /* 1: list other files          */  int other_files;                        /* 1: list other files          */
# Line 790  copyfile(from, to) Line 791  copyfile(from, to)
791          close(ip);          close(ip);
792  }  }
793  /*  /*
794   * duplicate file. if possible, link it without making a copy.   * duplicate file.
795     * By default, htags uses link system call without making a copy.
796   */   */
797  static void  static void
798  duplicatefile(file, from, to)  duplicatefile(file, from, to)
# Line 803  duplicatefile(file, from, to) Line 805  duplicatefile(file, from, to)
805    
806          snprintf(from_path, sizeof(from_path), "%s/%s", from, file);          snprintf(from_path, sizeof(from_path), "%s/%s", from, file);
807          snprintf(to_path, sizeof(to_path), "%s/%s", to, file);          snprintf(to_path, sizeof(to_path), "%s/%s", to, file);
808          if (w32) {          if (copy_files) {
809                  copyfile(from_path, to_path);                  copyfile(from_path, to_path);
810          } else {          } else {
811                  if (link(from_path, to_path) < 0)                  if (link(from_path, to_path) < 0)
# Line 1048  configuration(argc, argv) Line 1050  configuration(argc, argv)
1050                  table_list = 1;                  table_list = 1;
1051          if (getconfb("no_order_list"))          if (getconfb("no_order_list"))
1052                  no_order_list = 1;                  no_order_list = 1;
1053            if (getconfb("copy_files"))
1054                    copy_files = 1;
1055          if (getconfb("no_map_file"))          if (getconfb("no_map_file"))
1056                  no_map_file = 1;                  no_map_file = 1;
1057          strbuf_reset(sb);          strbuf_reset(sb);
# Line 1437  main(argc, argv) Line 1441  main(argc, argv)
1441          if (htags_options)          if (htags_options)
1442                  argv = append_options(&argc, argv);                  argv = append_options(&argc, argv);
1443    
1444          while ((optchar = getopt_long(argc, argv, "acDd:fFgm:noqsS:t:vw", long_options, &option_index)) != EOF) {          while ((optchar = getopt_long(argc, argv, "acd:DfFgm:noqsS:t:vw", long_options, &option_index)) != EOF) {
1445                  switch (optchar) {                  switch (optchar) {
1446                  case 0:                  case 0:
1447                  case 1:                  case 1:
# Line 1526  main(argc, argv) Line 1530  main(argc, argv)
1530                  setquiet();                  setquiet();
1531                  vflag = 0;                  vflag = 0;
1532          }          }
1533            /*
1534             * If copy_files is true then htags copy tag files instead of linking.
1535             * Since Windows 32 environment doesn't have link system call
1536             * we set copy_files true.
1537             */
1538            if (w32)
1539                    copy_files = 1;
1540          if (show_version)          if (show_version)
1541                  version(av, vflag);                  version(av, vflag);
1542          if (show_help)          if (show_help)

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26