/[gnokii]/gnokii/gnokii/gnokii.c
ViewVC logotype

Diff of /gnokii/gnokii/gnokii.c

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

revision 1.425 by pkot, Sun Jul 31 21:36:26 2005 UTC revision 1.426 by pkot, Thu Aug 11 19:56:00 2005 UTC
# Line 4932  static int getfilelist(char *path) Line 4932  static int getfilelist(char *path)
4932                  fprintf(stderr, _("Failed to get info for %s: %s\n"), path, gn_error_print(error));                  fprintf(stderr, _("Failed to get info for %s: %s\n"), path, gn_error_print(error));
4933          else {          else {
4934                  fprintf(stdout, _("Filelist for path %s:\n"), path);                  fprintf(stdout, _("Filelist for path %s:\n"), path);
4935                  for(i=0;i<fi.file_count;i++) {                  for(i = 0; i < fi.file_count; i++) {
4936                          fprintf(stdout, _("  %s\n"), fi.files[i]->name);                          fprintf(stdout, _("  %s\n"), fi.files[i]->name);
4937                          free(fi.files[i]);                          free(fi.files[i]);
4938                  }                  }
# Line 4988  static int getfile(int nargc, char *narg Line 4988  static int getfile(int nargc, char *narg
4988          FILE *f;          FILE *f;
4989          char filename2[512];          char filename2[512];
4990    
4991          if (nargc<1) usage(stderr, -1);          if (nargc < 1)
4992                    usage(stderr, -1);
4993    
4994          memset(&fi, 0, sizeof(fi));          memset(&fi, 0, sizeof(fi));
4995          snprintf(fi.name, 512, "%s", nargv[0]);          snprintf(fi.name, 512, "%s", nargv[0]);
# Line 5049  static int getallfiles(char *path) Line 5050  static int getallfiles(char *path)
5050          if ((error = gn_sm_functions(GN_OP_GetFileList, &data, &state)) != GN_ERR_NONE)          if ((error = gn_sm_functions(GN_OP_GetFileList, &data, &state)) != GN_ERR_NONE)
5051                  fprintf(stderr, _("Failed to get info for %s: %s\n"), path, gn_error_print(error));                  fprintf(stderr, _("Failed to get info for %s: %s\n"), path, gn_error_print(error));
5052          else {          else {
5053                  *(strrchr(path,'/')+1)=0;                  *(strrchr(path,'/')+1) = 0;
5054                  for(i=0; i<fi.file_count; i++) {                  for(i = 0; i < fi.file_count; i++) {
5055                          data.file = fi.files[i];                          data.file = fi.files[i];
5056                          strncpy(filename2, fi.files[i]->name, 512);                          strncpy(filename2, fi.files[i]->name, 512);
5057                          snprintf(fi.files[i]->name, 512, "%s%s", path, filename2);                          snprintf(fi.files[i]->name, 512, "%s%s", path, filename2);

Legend:
Removed from v.1.425  
changed lines
  Added in v.1.426

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