Remove extern declarations from .cpp files...

... Require the declarations to be in .h files, to be sure graph.pl detects the
dependencies.

Only one more #include was needed in Nyquist.cpp.   This doesn't reveal any
more hidden cycles.
This commit is contained in:
Paul Licameli 2020-05-26 19:37:11 -04:00
parent 0eafcd112b
commit f3d91f488e
10 changed files with 10 additions and 22 deletions

View File

@ -80,8 +80,6 @@ static const auto ProgramName =
//XO("Audacity");
Verbatim("Audacity");
extern wxString FormatHtmlText( const wxString & Text );
void AboutDialog::CreateCreditsList()
{
const auto sysAdminFormat =

View File

@ -1040,6 +1040,8 @@ struct streamContext
using Scs = ArrayOf<std::unique_ptr<streamContext>>;
using ScsPtr = std::shared_ptr<Scs>;
extern FFmpegLibs *FFmpegLibsInst();
#endif // USE_FFMPEG
#endif // __AUDACITY_FFMPEG__

View File

@ -20,5 +20,6 @@ TranslatableString TitleText( const wxString & Key );
extern const wxString VerCheckArgs();
extern const wxString VerCheckUrl();
extern const wxString VerCheckHtml();
extern wxString FormatHtmlText( const wxString & Text );
#endif

View File

@ -89,11 +89,6 @@ void ScriptCommandRelay::StartScriptServer(tpRegScriptServerFunc scriptFn)
std::thread(server, scriptFn).detach();
}
// The void * return is actually a Lisp LVAL and will be cast to such as needed.
extern void * ExecForLisp( char * pIn );
extern void * nyq_make_opaque_string( int size, unsigned char *src );
extern void * nyq_reformat_aud_do_response(const wxString & Str);
void * ExecForLisp( char * pIn )
{
wxString Str1(pIn);

View File

@ -31,4 +31,9 @@ public:
static void StartScriptServer(tpRegScriptServerFunc scriptFn);
};
// The void * return is actually a Lisp LVAL and will be cast to such as needed.
extern void * ExecForLisp( char * pIn );
extern void * nyq_make_opaque_string( int size, unsigned char *src );
extern void * nyq_reformat_aud_do_response(const wxString & Str);
#endif /* End of include guard: __SCRIPT_COMMAND_RELAY__ */

View File

@ -3384,12 +3384,6 @@ static LVAL ngettextc()
#endif
}
/*--------------------Audacity Automation -------------------------*/
/* These functions may later move to their own source file. */
extern void * ExecForLisp( char * pIn );
extern void * nyq_make_opaque_string( int size, unsigned char *src );
extern void * nyq_reformat_aud_do_response(const wxString & Str);
void * nyq_make_opaque_string( int size, unsigned char *src ){
LVAL dst;
unsigned char * dstp;
@ -3416,6 +3410,8 @@ void * nyq_reformat_aud_do_response(const wxString & Str) {
return (void *)dst;
}
#include "../../commands/ScriptCommandRelay.h"
/* xlc_aud_do -- interface to C routine aud_do */
/**/

View File

@ -55,8 +55,6 @@ function.
// Define this to automatically resample audio to the nearest supported sample rate
#define FFMPEG_AUTO_RESAMPLE 1
extern FFmpegLibs *FFmpegLibsInst();
static bool CheckFFmpegPresence(bool quiet = false)
{
bool result = true;

View File

@ -70,8 +70,6 @@
#if defined(USE_FFMPEG)
extern FFmpegLibs *FFmpegLibsInst();
/// This construction defines a enumeration of UI element IDs, and a static
/// array of their string representations (this way they're always synchronized).
/// Do not store the enumerated values in external files, as they may change;

View File

@ -163,8 +163,6 @@ static const auto exts = {
#include "../ondemand/ODDecodeFFmpegTask.h"
#endif
extern FFmpegLibs *FFmpegLibsInst();
class FFmpegImportFileHandle;
/// A representative of FFmpeg loader in

View File

@ -32,9 +32,6 @@
#include "../FFmpeg.h" // which brings in avcodec.h, avformat.h
extern FFmpegLibs *FFmpegLibsInst();
#define ODFFMPEG_SEEKING_TEST_UNKNOWN 0
#define ODFFMPEG_SEEKING_TEST_FAILED -1
#define ODFFMPEG_SEEKING_TEST_SUCCESS 1