Skip to content
Snippets Groups Projects
Commit a8dc5a83 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

fix shared library compilation

parent 99296db4
No related branches found
No related tags found
No related merge requests found
......@@ -16,11 +16,12 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <wchar.h>
#include <stdlib.h>
#include <wchar.h>
#include <string.h>
#include <sys/types.h> //ssize_t
#include <stdio.h>
#include <oblibs/sastr.h>
#include <oblibs/log.h>
......@@ -72,18 +73,15 @@ int info_getcols_fd(int fd)
void info_field_align (char buf[][INFO_FIELD_MAXLEN],char fields[][INFO_FIELD_MAXLEN],wchar_t const field_suffix[],size_t buflen)
{
unsigned int i ;
size_t i = 0, maxlen = 0, wlen[buflen] ;
size_t maxlen = 0 ;
int maxcol = 0, wcol[buflen] ;
int maxcol = 0 ;
wchar_t wbuf[buflen][INFO_FIELD_MAXLEN+nb_el(field_suffix)] ;
static wchar_t wbuf[][INFO_FIELD_MAXLEN+nb_el(field_suffix)] = {{ 0 }} ;
size_t wlen[buflen] ;
for(i = 0; i < buflen; i++)
wbuf[i][0] = 0 ;
int wcol[buflen] ;
for(i = 0; i < buflen; i++)
{
wlen[i] = mbstowcs(wbuf[i], buf[i], strlen(buf[i]) + 1) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment