From: Robert Dickenson Date: Sun, 8 Dec 2002 16:26:52 +0000 (+0000) Subject: minor format modifications to reduce diffs with latest wine sources to simplify updating. X-Git-Tag: ReactOS-0.1.0~251 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=f2a2cbc0d9335e3d24684aeddfac98caf095233b minor format modifications to reduce diffs with latest wine sources to simplify updating. mainly just updated with LGPL license in headers. svn path=/trunk/; revision=3837 --- diff --git a/reactos/tools/wmc/lang.c b/reactos/tools/wmc/lang.c index 796ffd98ceb..734173b8b66 100644 --- a/reactos/tools/wmc/lang.c +++ b/reactos/tools/wmc/lang.c @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include diff --git a/reactos/tools/wmc/lang.h b/reactos/tools/wmc/lang.h index f6a17f1085c..b4d25dc10e5 100644 --- a/reactos/tools/wmc/lang.h +++ b/reactos/tools/wmc/lang.h @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __WMC_LANG_H diff --git a/reactos/tools/wmc/mcl.c b/reactos/tools/wmc/mcl.c index d0da3769ab4..41dd4abdf2f 100644 --- a/reactos/tools/wmc/mcl.c +++ b/reactos/tools/wmc/mcl.c @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include diff --git a/reactos/tools/wmc/mcy.y b/reactos/tools/wmc/mcy.y index b9dd71db152..3a8ad14b05a 100644 --- a/reactos/tools/wmc/mcy.y +++ b/reactos/tools/wmc/mcy.y @@ -3,6 +3,22 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES: + * * The basic grammar of the file is yet another example of, humpf, * design. There is is mix of context-insensitive and -sentitive * stuff, which makes it rather complicated. diff --git a/reactos/tools/wmc/utils.c b/reactos/tools/wmc/utils.c index 1725ffd732b..125aa64e983 100644 --- a/reactos/tools/wmc/utils.c +++ b/reactos/tools/wmc/utils.c @@ -3,6 +3,19 @@ * * Copyright 1998,2000 Bertho A. Stultiens * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" diff --git a/reactos/tools/wmc/utils.h b/reactos/tools/wmc/utils.h index 03944874e5a..deaeacb5aab 100644 --- a/reactos/tools/wmc/utils.h +++ b/reactos/tools/wmc/utils.h @@ -3,6 +3,19 @@ * * Copyright 1998,2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __WMC_UTILS_H diff --git a/reactos/tools/wmc/wmc.c b/reactos/tools/wmc/wmc.c index 6535d671cd3..f4780db3d41 100644 --- a/reactos/tools/wmc/wmc.c +++ b/reactos/tools/wmc/wmc.c @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include diff --git a/reactos/tools/wmc/wmc.h b/reactos/tools/wmc/wmc.h index 9ac5ad61083..288a90b016e 100644 --- a/reactos/tools/wmc/wmc.h +++ b/reactos/tools/wmc/wmc.h @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __WMC_WMC_H @@ -71,6 +84,15 @@ void add_token(tok_e type, const WCHAR *name, int tok, int cp, const WCHAR *alia token_t *lookup_token(const WCHAR *s); void get_tokentable(token_t **tab, int *len); + +#ifdef __GNUC__ #define _alloca alloca +//#define alloca __builtin_alloca +#else /* not GNU C. */ +//#define alloca __builtin_alloca + +#pragma warning (disable:4305) // 'initializing' : truncation from 'const int ' to 'const char ' + +#endif /*__GNUC__*/ #endif diff --git a/reactos/tools/wmc/wmctypes.h b/reactos/tools/wmc/wmctypes.h index 6ce69561c07..1692eed41a2 100644 --- a/reactos/tools/wmc/wmctypes.h +++ b/reactos/tools/wmc/wmctypes.h @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __WMC_WMCTYPES_H diff --git a/reactos/tools/wmc/write.c b/reactos/tools/wmc/write.c index 1dc7c1d199c..57371a5c9ee 100644 --- a/reactos/tools/wmc/write.c +++ b/reactos/tools/wmc/write.c @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -88,7 +101,8 @@ static char *dup_u2c(int cp, const WCHAR *uc) // if(!cpdef) // internal_error(__FILE__, __LINE__, "Codepage %d not found (vanished?)", cp); // if((len = cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, cptr, len+1, NULL, NULL)) < 0) - if((len = WideCharToMultiByte(cp, 0, uc, unistrlen(uc)+1, cptr, len+1, NULL, NULL)) < 0) + if((len = WideCharToMultiByte(cp, 0, uc, unistrlen(uc)+1, cptr, len+1, NULL, NULL)) < 0) + internal_error(__FILE__, __LINE__, "Buffer overflow? code %d.", len); return cptr; } @@ -378,7 +392,8 @@ static char *make_string(WCHAR *uc, int len, int codepage) // assert(cpdef != NULL); // if((i = cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, tmp, 2*len+1, NULL, NULL)) < 0) - if((i = WideCharToMultiByte(codepage, 0, uc, unistrlen(uc)+1, tmp, 2*len+1, NULL, NULL)) < 0) + if((i = WideCharToMultiByte(codepage, 0, uc, unistrlen(uc)+1, tmp, 2*len+1, NULL, NULL)) < 0) + internal_error(__FILE__, __LINE__, "Buffer overflow? code %d.", i); *cptr++ = ' '; *cptr++ = '"'; @@ -435,7 +450,8 @@ static char *make_string(WCHAR *uc, int len, int codepage) } -static char *make_bin_string(WCHAR *uc, int len, int *retlen, int codepage) +static char *make_bin_string(WCHAR *uc, int len, int *retlen, int codepage) + { char *str = xmalloc(7 * len + 1); int i; diff --git a/reactos/tools/wmc/write.h b/reactos/tools/wmc/write.h index 2d627d6816e..1797a68de08 100644 --- a/reactos/tools/wmc/write.h +++ b/reactos/tools/wmc/write.h @@ -3,6 +3,19 @@ * * Copyright 2000 Bertho A. Stultiens (BS) * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __WMC_WRITE_H #define __WMC_WRITE_H