/[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.419 by pkot, Wed Apr 20 20:18:51 2005 UTC revision 1.420 by pkot, Tue May 3 22:51:50 2005 UTC
# Line 4976  static int getfile(int nargc, char *narg Line 4976  static int getfile(int nargc, char *narg
4976          if ((error = gn_sm_functions(GN_OP_GetFile, &data, &state)) != GN_ERR_NONE)          if ((error = gn_sm_functions(GN_OP_GetFile, &data, &state)) != GN_ERR_NONE)
4977                  fprintf(stderr, _("Failed to get file %s: %s\n"), nargv[0], gn_error_print(error));                  fprintf(stderr, _("Failed to get file %s: %s\n"), nargv[0], gn_error_print(error));
4978          else {          else {
4979                  if (nargc==1) {                  if (nargc == 1) {
4980                          strncpy(filename2, strrchr(nargv[0], '/') + 1, 512);                          if (strrchr(nargv[0], '/'))
4981                                    strncpy(filename2, strrchr(nargv[0], '/') + 1, 512);
4982                            else if (strrchr(nargv[0], '\\'))
4983                                    strncpy(filename2, strrchr(nargv[0], '\\') + 1, 512);
4984                            else
4985                                    strcpy(filename2, "default.dat");
4986                          fprintf(stdout, _("Got file %s.  Save to [%s]: "), nargv[0], filename2);                          fprintf(stdout, _("Got file %s.  Save to [%s]: "), nargv[0], filename2);
4987                          gn_line_get(stdin, filename2, 512);                          gn_line_get(stdin, filename2, 512);
4988                          if (filename2[0]==0) strncpy(filename2, strrchr(nargv[0], '/') + 1, 512);                          if (filename2[0] == 0) {
4989                                    if (strrchr(nargv[0], '/'))
4990                                            strncpy(filename2, strrchr(nargv[0], '/') + 1, 512);
4991                                    else if (strrchr(nargv[0], '\\'))
4992                                            strncpy(filename2, strrchr(nargv[0], '\\') + 1, 512);
4993                                    else
4994                                            strcpy(filename2, "default.dat");
4995                            }
4996                          f = fopen(filename2, "w");                          f = fopen(filename2, "w");
4997                  } else {                  } else {
4998                          f = fopen(nargv[1], "w");                          f = fopen(nargv[1], "w");

Legend:
Removed from v.1.419  
changed lines
  Added in v.1.420

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