Subversion Repositories SvarDOS

Rev

Rev 989 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 989 Rev 2216
Line 1... Line 1...
1
/* This file is part of the SvarCOM project and is published under the terms
1
/* This file is part of the SvarCOM project and is published under the terms
2
 * of the MIT license.
2
 * of the MIT license.
3
 *
3
 *
4
 * Copyright (C) 2021-2022 Mateusz Viste
4
 * Copyright (C) 2021-2024 Mateusz Viste
5
 *
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a
6
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 * copy of this software and associated documentation files (the "Software"),
7
 * copy of this software and associated documentation files (the "Software"),
8
 * to deal in the Software without restriction, including without limitation
8
 * to deal in the Software without restriction, including without limitation
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Line 46... Line 46...
46
 
46
 
47
  /* otherwise set PROMPT to whatever is passed on command-line */
47
  /* otherwise set PROMPT to whatever is passed on command-line */
48
  {
48
  {
49
    unsigned short i;
49
    unsigned short i;
50
    char *buff = p->BUFFER;
50
    char *buff = p->BUFFER;
51
    strcpy(buff, "PROMPT=");
51
    sv_strcpy(buff, "PROMPT=");
52
    for (i = 0;; i++) {
52
    for (i = 0;; i++) {
53
      buff[i + 7] = p->cmdline[p->argoffset + i];
53
      buff[i + 7] = p->cmdline[p->argoffset + i];
54
      if (buff[i + 7] == 0) break;
54
      if (buff[i + 7] == 0) break;
55
    }
55
    }
56
    env_setvar(p->env_seg, buff);
56
    env_setvar(p->env_seg, buff);