<commit_before>/* $Header$ */

/* OpenGL function entries -- based on xwindow/xforeign.c */

#include <dlfcn.h>

#include <GL/gl.h>
#include "util.h"

#pragma init (init_object_module)

pointer glpkg;

extern pointer sysmod;

#if BUG_dl
static void *xlib_handle;
#endif

pointer defoglforeign(ctx,xentry)
register context *ctx;
char *xentry;
{ pointer fc, xsym;
  integer_t entry; int i, len;
  char lname[100];
  len=strlen(xentry);
  for (i=0; i<len; i++) lname[i]=toupper(xentry[i]);
  lname[i]=0;
#if Cygwin /* dlopen libGL.dll and libGLU.dll */
  integer_t dlhandle;
  dlhandle=(integer_t)dlopen("libGL.dll", RTLD_LAZY);
  entry=(integer_t)dlsym(dlhandle, xentry);
  if ( !entry ) {
    dlhandle=(integer_t)dlopen("libGLU.dll", RTLD_LAZY);
    entry=(integer_t)dlsym(dlhandle, xentry);}
  if ( !entry ) {
    dlhandle=(integer_t)dlopen(0, RTLD_LAZY);
    entry=(integer_t)dlsym(dlhandle, xentry);}
#else
  entry=(integer_t)dlsym((void *)((integer_t)(sysmod->c.ldmod.handle) & ~3), xentry);
#endif
  if (!entry) {
    fprintf(stderr, "defoglforeign: dlsym() failed for %s\n", xentry);
  }<commit_msg>dlopen cygGL-1.dll, cygGLU-1.dll <- libGL.dll, libGLU.dll<commit_after>/* $Header$ */

/* OpenGL function entries -- based on xwindow/xforeign.c */

#include <dlfcn.h>

#include <GL/gl.h>
#include "util.h"

#pragma init (init_object_module)

pointer glpkg;

extern pointer sysmod;

#if BUG_dl
static void *xlib_handle;
#endif

pointer defoglforeign(ctx,xentry)
register context *ctx;
char *xentry;
{ pointer fc, xsym;
  integer_t entry; int i, len;
  char lname[100];
  len=strlen(xentry);
  for (i=0; i<len; i++) lname[i]=toupper(xentry[i]);
  lname[i]=0;
#if Cygwin /* dlopen libGL.dll and libGLU.dll */
  integer_t dlhandle;
  dlhandle=(integer_t)dlopen("cygGL-1.dll", RTLD_LAZY);
  entry=(integer_t)dlsym((integer_t)dlhandle, xentry);
  if ( !entry ) {
    dlhandle=(integer_t)dlopen("cygGLU-1.dll", RTLD_LAZY);
    entry=(integer_t)dlsym(dlhandle, xentry);}
  if ( !entry ) {
    dlhandle=(integer_t)dlopen(0, RTLD_LAZY);
    entry=(integer_t)dlsym(dlhandle, xentry);}
#else
  entry=(integer_t)dlsym((void *)((integer_t)(sysmod->c.ldmod.handle) & ~3), xentry);
#endif
  if (!entry) {
    fprintf(stderr, "defoglforeign: dlsym() failed for %s\n", xentry);
  }
{'fraction_non_alphanumeric': 0.17026907807675343, 'fraction_numerical': 0.007940008822232024, 'mean_word_length': 4.984168865435357, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5300121', 'n_tokens_mistral': 978, 'n_tokens_neox': 947, 'n_words': 186}