Browse Source

language: Tidy up loose ends (C #)

edi-0.8
Alastair Poole 2 years ago
parent
commit
b3b6933c9a
  1. 1
      NEWS
  2. 9
      src/bin/language/edi_language_provider.c
  3. 43
      src/bin/language/edi_language_provider_csharp.c

1
NEWS

@ -27,6 +27,7 @@ Bug fixes:
* Many stability fixes.
* Improvements to the EFL code widget.
* Improve file save behaviour.
* Fix welcome content black hole (Escape).
=======
Edi 0.7

9
src/bin/language/edi_language_provider.c

@ -12,6 +12,7 @@
#include "edi_language_provider_python.c"
#include "edi_language_provider_rust.c"
#include "edi_language_provider_go.c"
#include "edi_language_provider_csharp.c"
static Edi_Language_Provider _edi_language_provider_registry[] =
{
@ -35,6 +36,12 @@ static Edi_Language_Provider _edi_language_provider_registry[] =
_edi_language_go_mime_name, _edi_language_go_snippet_get,
NULL, NULL
},
{
"csharp", _edi_language_csharp_add, _edi_language_csharp_refresh, _edi_language_csharp_del,
_edi_language_csharp_mime_name, _edi_language_csharp_snippet_get,
NULL, NULL
},
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
};
@ -71,7 +78,7 @@ Edi_Language_Provider *edi_language_provider_for_mime_get(const char *mime)
provider = _edi_language_provider_registry;
while (provider != NULL && provider->id != NULL)
{
if (!strncmp(id, provider->id, strlen(provider->id)))
if (!strcmp(id, provider->id))
return provider;
provider++;

43
src/bin/language/edi_language_provider_csharp.c

@ -0,0 +1,43 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Eina.h>
#include "edi_language_provider.h"
#include "edi_config.h"
#include "edi_private.h"
void
_edi_language_csharp_add(Edi_Editor *editor EINA_UNUSED)
{
}
void
_edi_language_csharp_refresh(Edi_Editor *editor EINA_UNUSED)
{
}
void
_edi_language_csharp_del(Edi_Editor *editor EINA_UNUSED)
{
}
const char *
_edi_language_csharp_mime_name(const char *mime)
{
if (!strcasecmp(mime, "text/x-csharp"))
return _("C# source");
return NULL;
}
const char *
_edi_language_csharp_snippet_get(const char *key)
{
(void) key;
return NULL;
}
Loading…
Cancel
Save