/[rdesktop]/sourceforge.net/trunk/rdesktop/rdesktop.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdesktop.c

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

revision 58 by jsorg71, Sun Jul 14 00:34:21 2002 UTC revision 64 by astrand, Thu Jul 18 16:38:31 2002 UTC
# Line 81  main(int argc, char *argv[]) Line 81  main(int argc, char *argv[])
81          int c;          int c;
82    
83          printf("rdesktop: A Remote Desktop Protocol client.\n");          printf("rdesktop: A Remote Desktop Protocol client.\n");
84          printf("Version " VERSION ". Copyright (C) 1999-2001 Matt Chapman.\n");          printf("Version " VERSION
85                   ". Copyright (C) 1999-2001 Matt Chapman.\n");
86          printf("See http://www.rdesktop.org/ for more information.\n\n");          printf("See http://www.rdesktop.org/ for more information.\n\n");
87    
88          flags = RDP_LOGON_NORMAL;          flags = RDP_LOGON_NORMAL;
# Line 118  main(int argc, char *argv[]) Line 119  main(int argc, char *argv[])
119                                  break;                                  break;
120    
121                          case 'k':                          case 'k':
122                                  STRNCPY(keymapname, optarg, sizeof(keymapname));                                  STRNCPY(keymapname, optarg,
123                                            sizeof(keymapname));
124                                  break;                                  break;
125    
126                          case 'g':                          case 'g':
127                                  width = strtol(optarg, &p, 10);                                  width = strtol(optarg, &p, 10);
128                                  if (*p == 'x')                                  if (*p == 'x')
129                                          height = strtol(p+1, NULL, 10);                                          height = strtol(p + 1, NULL, 10);
130    
131                                  if ((width == 0) || (height == 0))                                  if ((width == 0) || (height == 0))
132                                  {                                  {
# Line 238  main(int argc, char *argv[]) Line 240  main(int argc, char *argv[])
240    
241  /* Generate a 32-byte random for the secure transport code. */  /* Generate a 32-byte random for the secure transport code. */
242  void  void
243  generate_random(uint8 *random)  generate_random(uint8 * random)
244  {  {
245          struct stat st;          struct stat st;
246          struct tms tmsbuf;          struct tms tmsbuf;
# Line 343  hexdump(unsigned char *p, unsigned int l Line 345  hexdump(unsigned char *p, unsigned int l
345                          printf("%02x ", line[i]);                          printf("%02x ", line[i]);
346    
347                  for (; i < 16; i++)                  for (; i < 16; i++)
348                                  printf("   ");                          printf("   ");
349    
350                  for (i = 0; i < thisline; i++)                  for (i = 0; i < thisline; i++)
351                          printf("%c",                          printf("%c",
# Line 369  load_licence(unsigned char **data) Line 371  load_licence(unsigned char **data)
371                  return -1;                  return -1;
372    
373          STRNCPY(path, home, sizeof(path));          STRNCPY(path, home, sizeof(path));
374          strncat(path, "/.rdesktop/licence", sizeof(path)-strlen(path)-1);          strncat(path, "/.rdesktop/licence", sizeof(path) - strlen(path) - 1);
375    
376          fd = open(path, O_RDONLY);          fd = open(path, O_RDONLY);
377          if (fd == -1)          if (fd == -1)
# Line 394  save_licence(unsigned char *data, int le Line 396  save_licence(unsigned char *data, int le
396                  return;                  return;
397    
398          STRNCPY(path, home, sizeof(path));          STRNCPY(path, home, sizeof(path));
399          strncat(path, "/.rdesktop", sizeof(path)-strlen(path)-1);          strncat(path, "/.rdesktop", sizeof(path) - strlen(path) - 1);
400          mkdir(path, 0700);          mkdir(path, 0700);
401    
402          strncat(path, "/licence", sizeof(path)-strlen(path)-1);          strncat(path, "/licence", sizeof(path) - strlen(path) - 1);
403    
404          fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0600);          fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
405          if (fd == -1)          if (fd == -1)
406          {          {
407                  perror("open");                  perror("open");
# Line 409  save_licence(unsigned char *data, int le Line 411  save_licence(unsigned char *data, int le
411          write(fd, data, length);          write(fd, data, length);
412          close(fd);          close(fd);
413  }  }
   

Legend:
Removed from v.58  
changed lines
  Added in v.64

  ViewVC Help
Powered by ViewVC 1.1.26