Subversion Repositories SvarDOS

Rev

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

Rev 964 Rev 2214
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 129... Line 129...
129
 
129
 
130
  /* read bat file line by line until label is found or EOF */
130
  /* read bat file line by line until label is found or EOF */
131
  for (;;) {
131
  for (;;) {
132
 
132
 
133
    /* move any existing data to the start of the buffer */
133
    /* move any existing data to the start of the buffer */
134
    if (bufflen > 0) memmove(p->BUFFER, buff, bufflen);
134
    if (bufflen > 0) memcpy_ltr(p->BUFFER, buff, bufflen);
135
 
135
 
136
    buff = p->BUFFER; /* assumption: must be big enough to hold 2 sectors (2 * 512) */
136
    buff = p->BUFFER; /* assumption: must be big enough to hold 2 sectors (2 * 512) */
137
 
137
 
138
    /* if buffer has less than 512b then load it with another sector (unless eof) */
138
    /* if buffer has less than 512b then load it with another sector (unless eof) */
139
    if ((eof_reached == 0) && (bufflen < 512)) {
139
    if ((eof_reached == 0) && (bufflen < 512)) {