Skip to content

Commit

Permalink
Fixes for issue #2 : 'astcheck' failed to build in current MSVC (rede…
Browse files Browse the repository at this point in the history
…finition of 'snprintf'), and there were a lot of new functions that were not exported in the DLL via 'lunar.def'.
  • Loading branch information
Bill-Gray committed Aug 12, 2018
1 parent 038c33a commit ad537d3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static FILE *get_sof_file( const char *filename)
fprintf( stderr, "Unable to read '%s'\n", filename);
exit( -4);
}
record_length = strlen( buff);
record_length = (int)strlen( buff);
assert( record_length < MAX_SOF_SIZE);
strcpy( sof_header, buff);
fseek( ifile, 0L, SEEK_END);
Expand Down Expand Up @@ -429,7 +429,7 @@ static void show_astcheck_info( void)
printf( "%d objects\n", n_asteroids);
}

#ifdef _MSC_VER
#if defined(_MSC_VER) && _MSC_VER < 1900
/* Microsoft Visual C/C++ has no snprintf. Yes, you read that */
/* correctly. MSVC has an _snprintf which doesn't add a '\0' at the */
/* end if max_len bytes are written. You can't pass a NULL string */
Expand Down
16 changes: 16 additions & 0 deletions lunar.def
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,19 @@ EXPORTS
tdb_minus_tdt @88
split_timel @89
set_day_of_week_name @90
extract_date_from_mpc_report @91
extract_sof_data @92
get_mpc_code_info @93
get_ra_dec_from_mpc_report @94
lat_alt_to_parallax @95
planet_axis_ratio @96
point_to_ellipse @97
is_valid_mpc_code @98
byte_code_to_net_name @99
net_name_to_byte_code @100
create_mpc_packed_desig @101
init_ades2mpc @102
free_ades2mpc_context @103
xlate_ades2mpc @104
xlate_ades2mpc_in_place @105
fgets_with_ades_xlation @106

0 comments on commit ad537d3

Please sign in to comment.