Re: independent string functions



Cartoper <cartoper@xxxxxxxxx> writes:

There is one little static C library to manage the serial number and
unlock key for my application. Today it is compiled with Microsoft
VC6 and linked into both VC6 modules and VS2005 modules. It is not a
lot of code, but obviously it is very important code that is used all
over:

VS2005: used in a C++/CLI module for .Net
VS2005: Apache module
VC6: DLL that is called by the installation program

There are two things I need to do:

1: Upgrade the VC6 module to VS2005.
2: Prepare this static library to go cross platform.

As it stands now the ONLY functions the library is using from the CRT
are string manipulation functions, the library does not allocate any
memory right now and is pure C. I am looking for an alternative to
the standard string functions, something I can simply include in this
library so that it is 100% self contains and won’t run into issues
when I compile it with VS2005 (later VS2008) nor with the Linux and
Mac C/C++ compilers.

I must be missing something obvious, but why can't you just keep using
C's string functions? Your library is in C, so obviously you can link
C code into all the desired targets. I can't see why you can't also
just link against the C library.

Anyway, if you list the ones that the library uses, I am sure people
here can post versions written in portable C. The only hard ones are
the scanf and printf family. You might want to say what formats you
actually use since that can make a difference as to how hard a
re-write it is.

Obviously, there are open-source versions available, so you'll also
have to say what licences are acceptable.

--
Ben.
.



Relevant Pages

  • Re: independent string functions
    ... VC6 and linked into both VC6 modules and VS2005 modules. ... are string manipulation functions, the library does not allocate any ... when I compile it with VS2005 nor with the Linux and ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • independent string functions
    ... VC6 and linked into both VC6 modules and VS2005 modules. ... are string manipulation functions, the library does not allocate any ... when I compile it with VS2005 nor with the Linux and ...
    (comp.lang.c)
  • Re: removing all dependency on MSVCR*.DLL
    ... linked into both VC6 modules and VS2005 modules. ... have the VS2005 runtime installed simply to run the installer. ... Linux and Mac version of the software and want to keep the source code ... string functions that are NOT proprietary Microsoft string functions ...
    (microsoft.public.vc.language)
  • Re: [2.6 patch] re-add -ffreestanding
    ... kernel 2.6.18-rc4-mm2 for m68k: ... If anything then -ffreestanding needs to be added to arch/m68k/Makefile ... (assuming it doesn't compile at all right now) ... on our string functions in linux/string.h. ...
    (Linux-Kernel)
  • Re: What does const char *s mean? is s a constant or *s?
    ... >I've been looking at some code for string functions (certain ... >implementation of them) and the non modified string is usually declared ... To see that "*s" does indeed change, compile and run the following ... Reading email is like searching for food in the garbage, ...
    (comp.lang.c)

Loading