Microchip compiler license server
1
Name:
Anonymous
2013-05-16 9:06
/*****************************************************************************
*
* xclm.c - A replacement license server for Microchip embedded compilers
*
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
enum
{
LICENSE_FREE,
LICENSE_STANDARD,
LICENSE_PRO,
LICENSE_NULL,
LICENSE_NOCPP,
LICENSE_CPPFREE,
LICENSE_CPPFULL
};
/* Padded keystring for XC8 compiler */
const char XC8_KEY[] = "120205690315959428539973816151144999076498629234049888"
"179227155534183820578631309018645587360933525814619915"
"779526071941849199599867328321377639683720790016145394"
"178294936006671919157552224249424396156390966410329115"
"909578096551465127991840510571525598801543710978110203"
"982753256678760352233698494166181105701471577863949973"
"752378527793703095602570185318279000307654710756304884"
"332086971157374238079344503160762531771453544441183117"
"818224971852635709182448998796203508335756172022603393"
"785870328131267807990054177348691152537065623705744096"
"622171290262732073236149224291304052855537234103307757"
"779806424202430488281521000914602653822069627155202082"
"274335001015294801198690117625951676366998171835575234"
"880703719555742347294083595208861666202572853755813079"
"282586487282173705566196898952662018776810629200817792"
"338135876828426412432431480282173674506720693507626895"
"304345939375032966363775750624733239923482883107733905"
"27680200757984356120205690";
int main(int argc, char *argv[])
{
int license = LICENSE_FREE;
int ii;
for (ii = 0; ii < argc; ++ii)
{
if (!strcmp(argv[ii], "swxc32") ||
!strcmp(argv[ii], "swxc16") ||
!strcmp(argv[ii], "swxc8"))
{
license = LICENSE_PRO;
}
else if (!strcmp(argv[ii], "swxcpp32"))
{
license = LICENSE_CPPFULL;
}
else if (!strcmp(argv[ii], "-hash"))
{
int index = atoi(argv[ii+1]);
printf("%.10s", &XC8_KEY[index]);
}
}
return license;
}
2
Name:
Anonymous
2013-05-16 9:15
Why would you want that sort of overhead on a very limited resource system?
3
Name:
Anonymous
2013-05-16 9:19
ii
what the fuck man!
4
Name:
Anonymous
2013-05-16 9:28
>>3
Makes loop variables easier to find with an editor's "search"
5
Name:
Anonymous
2013-05-16 9:42
>>4
Are you fucking retarded? Use regexps or tick the "whole word search" checkbox.
6
Name:
Anonymous
2013-05-16 9:55
>>5
As a coding standard, it is portable across all editors.
7
Name:
Anonymous
2013-05-16 10:12
>>5
While that works, the
ii unique ID is quick and convenient.
8
Name:
Anonymous
2013-05-16 17:48
9
Name:
Anonymous
2013-05-16 19:14
>>6
If it hasn't regex, it's notepad.
Notepad is shit.
10
Name:
Anonymous
2013-05-16 19:20
>>9
Why the fuck do you use notepad for C is something I really want to know.
11
Name:
Anonymous
2013-05-16 19:23
>>10
ultimate windoze hax0r tool .. you cant program in msdos now can u, plus notepad requires less resources than a console. so its pretty efficunt. u can install addon to get colored syntax so its bretty gud bro
12
Name:
Anonymous
2013-05-16 21:05
'
>2013
>not writing all your code in the reply box on shiichan
>mfw lelling
I seriously hope you /g/ews don't do this.
13
Name:
Anonymous
2013-05-16 21:32
>>12
your post was truly e/g/in, /g/roski XD lel
le upboats lel ;)
14
Name:
Anonymous
2013-05-16 22:56
Usually, variable name length is proportional to its scope. If it's as short as a single letter, it should be unnecessary to use a search function to find all of its instances.
15
Name:
Anonymous
2013-05-17 11:18
>>12-13
I sincerely wish for both of you to die.
16
Name:
Anonymous
2013-05-27 4:35
Thx OP !
Now I can optimize my PIC32 code to the max without paying > 1000$ !
My company and I would like to thank you.
17
Name:
Anonymous
2013-05-27 4:36
18
Name:
Anonymous
2013-05-27 5:54
>>11
you cant program in msdos now can u
Incorrect, MS-DOS came with QBASIC and a text editor installed.
19
Name:
Anonymous
2013-05-27 9:00
Qbasic
The basis of enterprise ides today
20
Name:
Anonymous
2013-05-27 10:48
>>16
If your company had any programming talent you could already have done that by recompiling from sources.