File: os_test.cpp

package info (click to toggle)
libtexttools 2.0.3-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,188 kB
  • ctags: 635
  • sloc: ada: 13,120; cpp: 1,679; ansic: 777; makefile: 156; sh: 2
file content (48 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <stdio.h>
#include <assert.h>
#include "common.h"
#include "string.h"
#include "os.h"

int main( int argc, char **argv ) {
  c_string s;
  float f;
  int i,j;
  int b;
  str255list_list sl = str255list_null;
  str255 s255;
  str255list_a_list_index li;
  a_file_system fs;
  a_pathname path1;
  a_pathname path2;

  printf( "Starting Ada run-time...\n" );
  adainit();
  printf( "Success\n\n" );

  startup_common( "test suite", "test" );
  startup_os();

  strcpy( path1.chars, "test.txt" );
  path1.length = strlen( path1.chars );
  validate_pathname( unixfs,
&path1,
&path2,
&s255 );
  path2.chars[ path2.length ] = 0;
  s255.chars[ s255.length ] = 0;
  printf( "%s validated to %s\n", path1.chars, path2.chars );
  if (s255.length > 0 ) {
     printf( "Error message: %s\n", s255.chars );
  }

  printf( "%s\n", "Done!" );

  shutdown_os();
  shutdown_common();
  adafinal();

  return 0;

}